From Lockdown to Payday: Hacking a Porn Site for $1,500
A test log page exposed submitted form data, and the referrer parameter was reflected without encoding, allowing stored cross-site scripting. An attacker could inject script that executes when the log page is viewed.
Published on stevenfloresca.medium.com
Way back in 2020, I was an Offensive Security Officer at one of the biggest banking companies in the Philippines. Then the pandemic hit, and like everyone else, I was stuck at home, working remotely.
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
Impact
An attacker could execute arbitrary script in the browser of anyone viewing the log page, though the text does not describe further consequences.
What the attacker needed
Access to the comments form; ability to intercept and modify requests; victim views the test.php log page
How it was found
- Find the comments form endpoint and send a test POST request.
- Discover the test.php log page that displays submitted data.
- Send a new POST request with an XSS payload in the referrer parameter.
- Reload the test.php page and observe the alert box.
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.
A website had a hidden page that showed a log of everything people submitted through a contact form. One of those fields, the referrer, was displayed without being made safe, so a script typed into it would run in the browser of anyone who opened the log page. This is called stored cross-site scripting because the harmful script is saved and then shown to others.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.