Level 5
Link:
https://xss-game.appspot.com/level5
Solution
In the "signup" page assign the following value to the next query parameter and click the Next button in the page.
?next=javascript:alert('XSS');
Result
Analysis
The vulnerability can be easily detected if the "Next" link in the "signup" page is inspected.
|
The "next" URL parameter's value is "confirm" |
|
The href of the "Next" link is also "confirm" |
The href attribute value of the "Next" link is "confirm", which is exactly the value of the "next" URL query parameter.
Conclusion
This means, using the "next" query parameter can be used to inject a Javascript code to the href attribute of the "Next" link. Following is the best way to do it. As soon as the user clicks on the link, the script triggers.
javascript:alert('XSS');
lo
ReplyDelete