XSS cookie stealing
Weaponizing XSS
get.php
To store cookie on machine.
Using the PHP file above, if we make a GET request with the following param below, the hereismydata
value gets stored in the jar.txt
defined above
Using this, we can weaponize the XSS by crafting a payload to send the victim's cookies into the website. And then navigating to attacker.site/jar.txt
we will see anyone who has cookies stolen.
If a victim triggers the XSS payload, the private cookies would be stolen and sent to the jar.txt file.
We can then use the cookies and impersonate as the user to login.
Last updated