Paid Advertising
web application security lab

XSS Locator Updated

Normally I make changes without telling anyone, because well, hell, no one notices generally. But last night I made a change that at least two people noticed because I inadvertently broke the xssAttacks.xml version of the XSS Cheat Sheet (which is getting more and more out of date unfortunately). I fixed the issue that broke the XML file (thanks to WhiteAcid and Nick for pointing it out). But I should probably explain one of the changes, since I think it’s worth noting.

I made a modification to the XSS Locater. Where it previously had said: </SCRIPT>!– I modified it to say: –></SCRIPT>">'>

These are very deliberately placed because the end comment tag is part of the most strict JavaScript convention which uses comments to made script invisible for readers that don’t gracefully ignore script if they can’t read it. I found a real example of this yesterday.

Then after the end SCRIPT tag which closes any JavaScript tag that it possibly can at that point I have the quote and the end angle bracket as well as the single quote and the end angle bracket to jump out of any HTML entities you are in. Surprisingly this small change makes it significantly more effective. I still don’t use the Locater personally, but it’s a great crutch if you are a) in a hurry or b) want to do a thorough test of some of the most common issues. It still doesn’t include CSS, so I’ll probably eventually add another one in there to pull out some of the most common CSS issues as well. That’s for another day.

Anyway, sorry for breaking the XML file. I’ll try to be better about that one. That’ll teach me to drink beer and author XML by hand at the same time!

3 Responses to “XSS Locator Updated”

  1. Edward Z. Yang Says:

    Perhaps the HTML page should be generated from the XML?

  2. RSnake Says:

    I’ve thought of that, except the US-ASCII encoding vector on the HTML page doesn’t render properly in XML from what I can tell.

  3. Nick Night Says:

    Well, I like the XSS cheat sheet very much and I use it very often since it is a great way not only to evaluate our sites but it is also a valuable means for us noobs to learn more about the secrets of XSSing. Great job!

Respond here or Discuss On the Forums