CSCI6268L17
CSCI6268L17
Computer Security
John Black
javascript executes as if
from bank; tokens stolen
Typically called
“reflected” XSS
Demo on moxie
• Visit stateful.php to establish highly
valuable session ID
• View xss.php behavior
• Look at ~drevil on moxie
– Note the warm innocent feel of the page
– View source on this page (note the
encodings)
• Examine steal.php
• Click on link on drevil’s homepage
– Look in /tmp/stolen.txt
Stored XSS
• Stored XSS is very similar
– Instead of using a reflection bug, the attacker
stores javascript in a place where the victim is
likely to read it (and thereby execute it)
– It’s usually the server’s responsibility to sanitize
user input before storing it
• Consider a public forum where various users post their
thoughts
– And their exploit code…
– Stored XSS is usually considered more serious
• No need to induce the user to establish a session then
visit drevil’s site, which can be hard some times
Note proper
domain name