Lately I’ve been performing a few web application assessments. I’m sure that like many of you, if you get time to work through an application, it’s probably not much. In order to make use of as much time as possible I’ve employed automation in areas where it makes sense, one such area being code injection and input validation testing.
Everyone knows I’m fond of using Burp Suite and I’ve been rocking it with the fuzzdb project as an additional step of my testing. After using this more than a few times I’ve noticed there are a few minor annoyances I’ve run into as well as a couple of areas that I think might possibly be improved, I’ll explain.
The first item is that when using the fuzzdb as-is with Burp we load the file and it’s imported with all the comments. Now we have to either go through and cleanup the payload list or send a wasted request containing “# credit to rsnake’ or the like each time we come to it. We have similar choices of writing ignore logic or not when scripting the file. Neither is a huge deal, but why? My feeling is to pull comments that are unnecessary. Credit is being given in the _readme.txt file and I think that’s probably where it should live, out and away from the data.
The second item is an issue that I see with the XSS payloads. There are currently 73 pattern lines in the rsnake-xss.txt file. Almost all of these result in the same payload being executed if the attack is successful. The majority of the time this results in an alert box containing the string ‘XSS’. 
Our attempts to inject these attack patterns may result in three alert boxes triggered for a given browser. It may be of some value to be able to communicate which ones bypassed filtering or encoding functionality and triggered the events, but now all we know is that of the 73 we have 3 in that pile that made it happen.
My solution to this was to tag every payload uniquely by scripting a replacement of all XSS values to a naming convention of rs1, rs2, etc. (rs as a tip of the hat to rsnake who contributed the list). Additionally there are external payloads that make multiple references to non-unique js/xml/css files and of course result in a smaller, but similar issue of the ‘XSS’ tag. Here I have created a unique js/xml/css file for each attack pattern and a payload inside of these files should indicate which pattern was referenced. These files are named rsx# to indicate rsnake external file execution.
examples:
- http://www.l1pht.com/rsx1.js
- http://www.l1pht.com/rsx2.js
- …
- http://www.l1pht.com/rsx11.html
- http://www.l1pht.com/rsx12.css
- http://www.l1pht.com/rsx16.xml
- http://www.l1pht.com/rsx17.jpg
That just nearly solved what I wanted to do, leaving only the encoded payloads. I’m toying with this as you can see with the String.fromCharCode() example, in which I’ve changed the XSS char codes to the char codes for the string ‘CharCode’, an indicator to me of what attack pattern might be triggering the alert box. Depending on how this works out, there may be more to come.
There are likely leeter ways to do what I’ve done, feel free to let me know. If you’d like to get a better idea of what I’ve done check it out @ http://www.l1pht.com/code/misc/fuzzdbnaked-0.2.tar.gz
I’m not sure just how maintained I’m going to try to keep my version or if I’ll just let it rot and copy over my rsnake-xss.txt each time I svn up fuzzdb, but we’ll see. I guess it depends on how much stripping I do
Code fuzzdb, web appsec, xss