Solving Portswigger Academy: Exploiting cross-site scripting to capture passwords

Vishal
Oct 13, 2024

This lab contains a stored XSS vulnerability in the blog comments function. A simulated victim user views all comments after they are posted. To solve the lab, exploit the vulnerability to exfiltrate the victim’s username and password then use these credentials to log in to the victim’s account.

As soon as we login, we saw a blogging site where customer leave their comments. So as usual will first test XSS in comment section using <img src=x onerror=prompt()> and I received a prompt.

XSS prompt

Now we need a code that will send a required data to us or server controlled by us.

Now use this username and password to login into the application.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response