The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
Haven't really tested it, but it's interesting nonetheless:
http://support.microsoft.com/kb/954476<
http://support.microsoft.com/kb/954476<
Posted
looks pretty good, I tried it against a file I knew was vunerable and it found the problem.
I then ran it against the base forum files which were ALL ok<
I then ran it against the base forum files which were ALL ok<
Posted
Yeah, it may help with the recent batch of SQL Injection attacks.
The info about the forum files is reassuring, even more so because it confirms my own findings on the 2 or 3 times I ran a manual analysis
.<
Posted
I haven't had a chance to read the directions in-depth, but it looks like it only checks one page at a time. Did you guys set up a batch file or some other automation script to run it through all the files?<
Posted
no, I did it by hand
you don't need to do the inc_xxxxx files as it does that for you<
Posted
Bummer. I just have dotnet 1.1 at work. Have to wait until I get home to try it.<
Podge.
The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)
My Mods: CAPTCHA Mod | GateKeeper Mod Tutorial: Enable subscriptions on your board
Warning: The post above or below may contain nuts.
My Mods: CAPTCHA Mod | GateKeeper Mod Tutorial: Enable subscriptions on your board
Warning: The post above or below may contain nuts.
Posted
it is definately the best one I have tried so far, the last ones I tried were worse than useless.<
Posted
Looks like they posted some VBScript to run through a directory - from http://blogs.msdn.com/sqlsecurity/archive/2008/06/27/getting-started-with-microsoft-source-code-analyzer-for-sql-injection.aspx
Code:
ON ERROR RESUME NEXT
If WScript.Arguments.Count = 0 Then
WScript.Echo "Usage: " + WScript.ScriptName + " sourcedirectory"
WScript.Quit(0)
End If
ProcessFolder WScript.Arguments(0)
Sub ProcessFolder(ByVal folderspec)
Dim fso, f, f1, fc, s, sf
Dim strInputFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(folderspec)
Set fc = f.Files
For Each f1 in fc
If StrComp(LCase(Mid (f1,Len(f1)-3,4)), ".asp") = 0 Then
strInputFile = f1.Path 'f.Path + "\" + f1
ASPScan (strInputFile)
End If
Next
Set sf = f.SubFolders
For Each f2 in sf
ProcessFolder f2.Path
Next
End Sub
Sub ASPScan (ByVal strInputFile)
ON ERROR RESUME NEXT
Err.Clear
Dim WshShell, oExec
Dim strCommand
Dim sTime, strBinary
GenerateSQLInjectionFile = true
Set WshShell = CreateObject("WScript.Shell")
strBinary = GetShortFolderName (GetScriptPath()) + "\" + GetShortFileName ("msscasi_asp.exe")
strCommand = "cmd.exe /c " + strBinary + " /input=""" + strInputFile + """ /Nologo >>" + GetShortFolderName (GetScriptPath()) + "\output.txt"
Set oExec = WshShell.Exec(strCommand)
sTime = Now
Do While (oExec.Status = 0)
WScript.Sleep 1000
Loop
Set oExec = Nothing
Set WshShell = Nothing
End Sub
Function GetScriptPath ()
Dim strPath
strPath = WScript.ScriptFullName
strPath = Mid (strPath, 1, InstrRev(strPath,"\")-1)
GetScriptPath = strPath
End Function
Function GetShortFolderName(ByVal filespec)
Dim fso, f, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(filespec)
GetShortFolderName = f.ShortPath
End Function
Function GetShortFileName(ByVal filespec)
Dim fso, f, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile(filespec)
GetShortFileName = f.ShortName
End Function
Create a VBScript file (.vbs) with the above content, place it in the folder where the tool is located and execute the script providing absolute path of the folder containing ASP code. The script will generate the file output.txt with the concatenated tool output in the folder where the tool and script files are located. Please modify the script according to your needs, for example, if your ASP code uses virtual file includes or if you have a global.asa then you will need to pass /IncludePaths and /GlobalAsaPaths parameters to the tool in ASPScan function.<
Last edited by AnonJr on 01 July 2008, 11:18
Posted
cool, although it didn't take very long to run through the forum files by hand, without the inc_xxxxx files and the admin files there are only about 30 files that need testing<
Posted
This tool and Microsoft's support for it are looking pretty good. This can really make a difference in protecting ASP files against SQL Injection.<
Posted
yes, seems to work spot on too.<
Email Member
Message Member
Post Moderation
FileUpload
If you're having problems uploading, try choosing a smaller image.
Preview post
Send Topic
Loading...