EXAMPLES FROM code.google.com/doctype/wiki
- 1 ---------------------------------------------------------------------
ATTACK:
http://www.mysite.com/search?q=flowers+%3Cscript%3Eevil_script()%3C/script%3E
RESULTING HTML:
Your search for 'flowers '
returned the following results:
- 2 ---------------------------------------------------------------------
- 3 ---------------------------------------------------------------------
ATTACK: supply targetURL foo");evil_script("
RESULTING HTML: GotoUrl("foo");evil_script("");
- 4 ---------------------------------------------------------------------
ATTACK: supply query of blah">
RESULTING HTML:
- 5 ---------------------------------------------------------------------
...
ATTACK: get color to contain
green; background-image: url(javascript:evil_script())
RESULTING HTML:
...
- 6 ---------------------------------------------------------------------
Two different ways to edit an error message on a page:
- http://myapp.com/error.php?message=Sorry%2c+an+error+occured
-
# this one extracts msg param from URL and inserts into page