This lab contains a DOM-based cross-site scripting (XSS) vulnerability on the home page.
It uses jQuery's $() selector function to auto-scroll to a given post, whose title is passed via the location.hash property.
Deliver an exploit to the victim that calls the print() function in their browser.
location.hash.Example of normal usage:
<https://vulnerable-website.com/#post1>
Replace the post ID with a malicious payload:
<https://vulnerable-website.com/#><img src=print()>
โ This demonstrates injection, but it is not enough for solving the lab.
Since the lab requires delivering the exploit via the exploit server, we must embed the payload in an iframe.