You are on page 1of 2

CENG 325 – Principles of Information Security and Privacy

XSS ATTACK

PART II
Deadline: 23:59, Thursday Dec 30, 2021
Individual Submission

Grading:
• 30 points are for tasks mentioned in Part 2-A
• 60 points are for the answers to the questions given in Part 2-B.

Part 2-A:
Complete the following steps in the WebGoat Application
(http://localhost:8080/WebGoat/). Use the WebGoat User Account.
Username: guest Password: guest

In the menu along the left-hand side of the screen, select “Cross Site Scripting (XSS)” to
expand the submenu for XSS. The Stage # and Name shown in bold below correspond to
the “Stages” listed in the XSS submenu.

Select “Stage 1 – Stored XSS”


a. Storing a script to Tom Cat:
1. You will see a login page for “Goat Hills Financial,” login with ‘Tom Cat’ as
Employee and password as tom
2. Click on View Profile.
3. Click on Edit Profile.
4. Change the text in the street field to <script>alert(“XSS”);</script>
5. Click on update profile.
6. Observe what happens and note this in your write-up for this activity, include
a screenshot as well.
b. Infecting Jerry Mouse with the script:
1. Login with ‘Jerry Mouse (hr)’ as employee and password as jerry
2. Click on Tom in left pane and then click on view profile in the right pane.
3. Include your observations on what happens in your write-up for this
activity and include a screenshot as well.

Select “Stage 3 – Stored XSS Revisited”

1. Login with ‘David Glambi (manager)’ as Employee and password as david.


2. Click on Bruce from the list and then click on view profile.
3. Include your observations on what happens in your write-up for this
activity and include a screenshot as well.
Select “Stage 5 – Reflected XSS”

1. Login with ‘Jerry Mouse’ as Employee and password as jerry.


2. Click on search staff.
3. Type “><script>alert(“Test”);</script> in the input field.
4. Click on find and include your observations on what happens in your
write-up for this activity and include a screenshot as well.

Part 2-B:

Please answer the questions below based on the activity.

1. What happens in a stored XSS attack? Explain using an example from activity.
2. What are some measures that can be taken to block a stored XSS attack?
3. Explain your observation and understanding about the vulnerability from Part 2A:
Stage 5 – Reflected XSS.
4. Mention an input validation example that can be implemented to prevent a stored
XSS attack.
5. List some languages that are particularly vulnerable to cross-site scripting.
6. Describe the types of data that are typically listed in cookies on Firefox and Chrome
browsers.
Submit your answers for Part 2-A and 2-B in AYBUZEM.

You might also like