From: dhurst@spidynamics.com Sent: Tuesday, November 27, 2001 9:34 AM To: auto125268@hushmail.com; Mark Curphey Cc: webappsec@securityfocus.com Subject: RE: OWASP - WebSleuth - Cross Site Scripting Mark, I thought you might find this chunk of code handy. It allows you access to the PostData when an HTTP Post is made. I got the code from Microsoft a few months ago and it's come in pretty handy. I just added it to your wb_BeforeNavigate2 event. '* '* Start of code '* Private Sub wb_BeforeNavigate2(ByVal pDisp As Object, url As Variant, Flags As Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant, Cancel As Boolean) If mnuEditLink.Checked Then If mnuBlockServers.Checked Then For i = 0 To UBound(blockServers) If LCase(blockServers(i)) Like LCase(url) Then Cancel = True: Exit Sub Next End If 'this wont modify link browser requests though :( url = frmAnalyze.AnlyzeUrlAndWait(url) & " " If url = -1 Then Cancel = True End If '* '* Code added by Dennis Hurst (dhurst@spidynamics.com) '* 'url will contain the URL with parameters 'PostData has the PostData in a strange format 'the following will convert it to a string that 'contains the raw post data Dim lLen As Long Dim strPostData As String lLen = LenB(PostData) ' Use LenB to get the byte count If lLen > 0 Then ' If it's a post form, lLen will be > 0 For lCount = 1 To lLen - 1 strPostData = strPostData & Chr(AscB(MidB(PostData, lCount, 1))) ' Use MidB to get 1 byte at a time Next Debug.Print strPostData End If End Sub '* '* End of code '* God Bless & Have a great day, Dennis Hurst dhurst@spidynamics.com -----Original Message----- From: auto125268@hushmail.com [mailto:auto125268@hushmail.com] Sent: Tuesday, November 27, 2001 3:16 AM To: Mark Curphey Cc: webappsec@securityfocus.com Subject: Re: OWASP - WebSleuth - Cross Site Scripting As you already capture the form, you could check for cross site scripting by automatically sending in a payload to a form field target. How cool woukd that be....oh yeah. And you could have a drop down maybe of the known payload variants like