June 2017
Intermediate to advanced
258 pages
6h 9m
English
When we talked about cross-site scripting in the last section, I had the inserted script just output an alert message. But, technically you could add the script to other things. One option is for retrieving other user session information by having the script grab the current session ID, and send it off to the hacker. This way, they are grabbing all the session IDs as users are logging into the application.
In my example, I will just be outputting the session ID to the screen via an alert box so that we can verify that the session ID is there, but with some slight modification, you could have it sent to the hacker.
To accomplish this, I will use the following to access that session ID information:
<script>alert(document.cookie)</script> ...
Read now
Unlock full access