XSS Exploits: Cross Site Scripting Exploits and Defense

Learning about cross-site scripting attacks, how they work, and how they can be abused by an attacker takes more than just an explanation of a theory with a stripped down example. As the clich goes, "A picture is worth a 1000 words," so consider this next chapter to be your own Cross Site Scripting (XSS) photo gallery.
In this chapter, we look at examples of real exploits of vulnerable Web sites and applications. At the time of writing this book, all of these examples still existed; however, not all of these illustrations have fixes. As such, buyers beware!
As you will see, XSS attacks are not to be ignored. Whether stealing user/password data from Firefox, getting airpwned at the local hotspot, or finding a vulnerable application where you can insert a persistent XSS to own anyone who visits a site, JavaScript malicious software (malware) is a force to be reckoned with.
On August 21, 2006, RSnake posted a fairly innocuous post on ha.ckers.org that discussed the dangers of automated form fields that magically fill in with information saved by the browser. While this post outlined the threat of having your name, address, credit card numbers, and so forth stolen, the concept quickly sparked a lot of creative thought in the Web application community.
One of the first responses occurred on the sla.ckers.org forum where a person by the handle of White Acid turned the concept into a working example. However, instead of focusing...