how I found a critical bug using response manipulation
The login page relied on a client-side check of the server's JSON response to decide whether to grant access. An attacker could change a 404 response to 200 OK and set the body to a success status, bypassing authentication and accessing the admin panel.
Published on matrixm0x1.medium.com
Hello everyone! It’s been a while since my last writeup.
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 made an access-control decision based on a client-side check of the server's response status and body, rather than enforcing authentication on the server.
Impact
An attacker could bypass the login page and access the admin panel, potentially gaining full control of the application.
What the attacker needed
Access to the login page; ability to intercept and modify responses
How it was found
- Find a login page on a subdomain.
- Try common username and password combinations.
- Capture the login request and notice it uses JSON.
- Change the response status from 404 to 200 and set the body to a success status.
- Access the panel.
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.
When you log in, the website asks a server if your details are correct. Here, the website trusted whatever answer came back and only looked at a simple 'yes' or 'no' in the reply. By intercepting that reply and changing it to 'yes', the attacker tricked the website into letting them in without a real password.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.