Post a comment with a random alphanumeric string in the "Website" input, then use Burp Suite to intercept the request and send it to Burp Repeater.
Make a second request in the browser to view the post and use Burp Suite to intercept the request and send it to Burp Repeater.
Observe that the random string in the second Repeater tab has been reflected inside an onclick event handler attribute.
Repeat the process again but this time modify your input to inject a JavaScript URL that calls alert, using the following payload:
http://foo?'-alert(1)-'
Verify the technique worked by right-clicking, selecting "Copy URL", and pasting the URL in the browser. Clicking the name above your comment should trigger an alert.
Community solutions
Michael Sommer
Want to track your progress and have a more personalized learning experience? (It's free!)