Skip to content
XSS Write-up Beginner

How I Discovered Account Takeover (ATO) via Cross-Site Scripting (XSS)

A reflected cross-site scripting flaw existed in a parameter on a subdomain, allowing an attacker to run script in a victim's browser. The author escalated this to steal session cookies, which could lead to account takeover.

osintteam.blog

Published on osintteam.blog

Free Article

JEETPAL, on osintteam.blog

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the application reflected user input from the 's' parameter into the page without proper output encoding or sanitisation.

Impact

An attacker could steal a victim's session cookies, potentially leading to account takeover, though the text does not detail any defence that limited the exploit.

What the attacker needed

Victim clicks a crafted link; attacker can host a server to receive cookies

How it was found

  1. Enumerate subdomains of the target and find jp.redacted.com.
  2. Use Param Spider to list parameters on that subdomain.
  3. Identify the 's' parameter as reflecting input.
  4. Inject a script payload to confirm reflected XSS.
  5. Try an image onerror payload to send document.cookie to an external server, which failed.
  6. Encode the payload in Base64, which then executed and captured victim cookies.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Cross-site scripting (XSS) is when a website takes input from a user and puts it into a page without cleaning it, so an attacker can make the site run their own JavaScript. Here, a search-like parameter reflected a script tag, and the attacker then used a script to read the victim's cookies (small pieces of data that keep you logged in) and send them to a server they control. With those cookies, someone could log in as the victim.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.