I stumbled upon this simple XSS labs, and I decided to upload the solutions. This is the first time I am posting something on a blog, so any feedbacks are more than helpful.

To check for an injection point I have used tipsy as an input parameter.
Level 1
Vulnerable Code
Now as you can see, this is simply reflecting the input, and thus we can use our most basic payload.
Payload
Level 2
Vulnerable Code
Now as you can see, the input is being loaded inside the input tag. So naturally, we can try to skip over the input tag using the following payload.
Payload
Level 3
Vulnerable Code
Now as you can see, the input is being loaded inside the input tag, but along with a ‘ “ ‘ . So naturally, we can try to skip over the input tag using the following payload.
Payload
Level 4
Vulnerable Code
This one is a slight modification over the last one in a way that “ was replaced with ‘. we can bypass this and create our payload in the same way.
Payload
Level 5
Vulnerable Code
In this one, as we can see tipsy occurs inside a script tag. hence we will need to close the script tag first and then inject our basic payload.
Payload
Level 6
Vulnerable Code
This is just a slight modification over the last one, and hence the payload is easier to write.
Payload
Level 7
Vulnerable Code
This one again looks like a basic one, but this time when we try to inject it with
'></input><script> alert(document.URL)</script> , it doesn't work, and the source code shows
<input type="text" name="name" value=''</input<script document.URL </script'></input>
This means that we need to exploit some functionality used by input tag.
After some research , on change can be added to inject the payload.
Payload
Level 8
Vulnerable Code
In this the input is being tokenized, and trying out all the previous payloads doesn’t work.
So always remember to check all the parameters,
In this case, let’s see the request that is being sent.
and we have already seen that name parameter is not vulnerable.
Let’s try to change the value of `submit`` parameter and check if it is reflecting !
New request -
Final vulnerable code -
Now let’s try to build the payload with mouseonover
Payload
And we are done :
