Skip to content

LAB 27 - Reflected XSS with event handlers and href attributes blocked

Initial instructions

This lab contains a reflected XSS vulnerability with some whitelisted tags, but all events and anchor href attributes are blocked.

To solve the lab, perform a cross-site scripting attack that injects a vector that, when clicked, calls the alert function.

Note that you need to label your vector with the word "Click" in order to induce the simulated lab user to click your vector. For example: Click me

To solve this lab I used the following XSS payload.

<svg><a><animate attributeName=href values=javascript:alert(1) /><text x=20 y=20>Click me</text></a>

So I entered this payload into the search bar and clicked Search.

alt text

If we do hovering we will see that in the Click me button will pop up an alert.

alt text

And it successfully get triggered.

alt text

Congratulations, you solved the lab!