XSS: Demonstrating Impact Without Credentials
The login page accepted a destination parameter that was not validated, allowing a javascript: URI to be used as the redirect target. By intercepting the login request and changing the server's 401 response to 200, the attacker could trigger the XSS without valid credentials, and the password was stored in a non-HttpOnly cookie.
infosecwriteups.com
Published on infosecwriteups.com
Hello, fellow hackers and tech enthusiasts. In this write-up, I will demonstrate how I used a Layer 1 authentication bypass to showcase the impact of an XSS vulnerability, even when the program did not provide credentials for testing.
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 failed to validate the destination parameter before using it in a redirect, and it also stored the password in a cookie without the HttpOnly flag.
Impact
An attacker could execute arbitrary JavaScript in a victim's browser after they log in, and because the password was stored in a non-HttpOnly cookie, the attacker could steal it and take over the account.
What the attacker needed
Victim clicks a link; victim logs in with correct credentials; attacker can intercept and modify responses
How it was found
- Access the login URL with a destination parameter containing a javascript: URI.
- Enter random credentials and capture the login request in Burp.
- Change the server's 401 response to 200.
- Observe the XSS executing.
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 login page had a redirect feature that did not check where it sent people. An attacker could make it run malicious JavaScript in the victim's browser. The attacker also found that the password was saved in a cookie that JavaScript could read, so they could steal it.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.