Lab 2 Cross Site Scripting
Lab 2 Cross Site Scripting
Objectives:
You will perform XSS attacks on an intentionally vulnerable target website.
Tasks:
1. Start the CSF 4103 Azure VM, and logon.
3. On the desktop of your Azure VM, go to Resources/GETIP/get_win10vm_ip and run it. Wait
until you see the “press any key to continue message…..”
4. Open the result excel sheet on the same folder to find the IP address for the windows 10
VM.
172.17.233.42
5. Start your browser and ensure the browser is not using any proxy settings (done in lab 1)
6. Visit http://IP address/cisweb/ws/xss.php
7. Type your name in the textbox or text area and notice the results page
8. Go back to the XSS page and type your name inside the <b> tag
<b>Name here</b>
9. What difference do you see in the result? Difference
The data (or code) you entered was sent to the server and got saved there. In this page all
injected code is displayed back in the client.
The data (or code) you entered was sent to the server and is now back in the client.
The website is allowing us to input more than just data. We can input code. Let’s test to
see if we can do more.
15. Try to input the following html code in the textbox of xss.php page:
<img src=" http:// IP address/cisweb/resources/images/wsLogo.png"/>
16. What does the code above do? Answer
The data (or code) you entered was sent to the server and got saved there. In this page all
injected code is displayed back in the client.
1|Page
<script>alert(document.cookie)</script>
22. Redirect the webpage to another website of your choice (in the same window/tab)
<meta http-equiv="refresh" content="0; url=http://example.com/" />
The http-equiv attribute pf the <meta> element can be used to simulate an HTTP
response header. Using the “refresh” as a value, we can simulate a continuous refresh
every interval of time. For example: <meta http-equiv="refresh" content="1">
2|Page