Two parts to this question.
- Let's say there is a site which accepts my input and sends it in XML format to server. When I enter the input as shown here: https://ghostbin.com/paste/hc5n6
The reason I put the code at above link is because I cannot insert the code here. It does not format properly.
It adds a new line in the HTML page response:
- Now, I want to steal the admin cookie (this is part of an exercise where the server is remote). It is not a Local area network.
I constructed my payload as shown below:
Here, ip_address is my local IP address (as returned by ifconfig).
I run socat on my local machine as shown below:
socat TCP-LISTEN:80,reuseaddr,fork -
Now, my question is, how can I receive the admin cookie using above method?
Because the server is remote. When the administrator visits the page with persistent XSS, how will the cookie of administrator be transmitted to me?
Do I need to supply my public IP address in above image URL instead of the local IP address?