Posts
349
Comments
104
Trackbacks
4
“Code analysis tool” von Microsoft: CAT.NET

Microsoft hat unter der folgenden Adresse als CTP-Version ein Tool für die Code-Analyse zur Verfügung gestellt:
http://www.microsoft.com/downloads/details.aspx?FamilyId=0178e2ef-9da8-445e-9348-c93f24cc9f9d&displaylang=en

Dieses Tool überprüft den Quellcode auf mögliche Schwachstellen in Richtung:
- Cross Site Scripting
- SQL Injection
- Process Command Injection
- File Canonicalization
- Exception Information
- LDAP Injection
- XPATH Injection
- Redirection to User Controlled Site

Nach der Installation steht das Tool im Hauptmenü Tools von Visual Studio zur Verfügung.

Hier ein kleines ASP.NET Quellcode-Beispiel:

<%@ Page Language="C#" ValidateRequest="false" %>

 

<script runat="server">  

    protected void Button1_Click(object sender, EventArgs e)

    {

        string eingabe = TextBox1.Text;

        Label1.Text = eingabe;

    }

</script>

 

<html>

<head id="Head1" runat="server">

    <title>Untitled Page</title>

</head>

<body>

    <form id="Form1" runat="server">

    <div>

        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

        <asp:Button ID="Button1" runat="server" Text="speichern"

            onclick="Button1_Click" />

        <br />

        <asp:Label runat="server" id="Label1"></asp:Label>

    </div>

    </form>

</body>

</html>

 

Eine Analyse mit CAT.NET bringt das folgende Ergebnis:

Bild2

Dieses weist uns darauf hin, dass die Zeilen:

        string eingabe = TextBox1.Text;

        Label1.Text = eingabe;

gegen Cross-Site Scripting nicht geschützt ist!

Durch den Einsatz von Anti-XSS Libary lassen sich dann solche Lücken schliessen.

posted on Tuesday, November 17, 2009 7:47 AM Print
Comments
Gravatar
# Trackback
12/24/2009 4:56 PM
bei: http://community.bamboosolutions.com/blogs/german/archive/2009/11/17/code-analysis-tool-von-microsoft-cat-net.aspx
Gravatar
# re: “Code analysis tool” von Microsoft: CAT.NET
Adjustable bed mattress
8/30/2010 12:18 AM

Happy to see your blog as it is just what I’ve looking for and excited to read all the posts. I am looking forward to another great article from you. After skimming through your website

Post Comment

Title *
Name *
Email
Url
Comment *  
Please add 3 and 8 and type the answer here: