Posts
337
Comments
125
Trackbacks
5
“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
Gratis Casinos
2/13/2010 7:44 AM
CAT.NET is a binary code analysis tool that helps identify common variants of certain prevailing vulnerabilities that can give rise to common attack vectors such as Cross-Site Scripting (XSS), SQL Injection and XPath Injection.

Post Comment

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