How I Got Access to an Admin Portal by Response Manipulation
The application trusted client-side response fields (status and userDetails) to determine admin access, so an attacker could intercept the login response and change those fields to gain admin privileges. This allowed access to an admin portal with functionalities like viewing server info and modifying roles.
Published on medium.com
In the vast world of cybersecurity, response manipulation is an intriguing yet often overlooked attack vector. During a recent penetration test, I encountered a vulnerability that allowed me to gain access to an admin portal by cleverly altering server responses.
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
The attacker could view server configuration, modify roles or credentials, and delete critical records, potentially affecting multiple stores.
What the attacker needed
Ability to intercept and modify HTTP responses
The fix
The application should validate user roles on the server side using session tokens or signed tokens, not trust client-provided response fields.
How it was found
- Intercept the login response in Burp Suite.
- Modify the userDetails field to 'admin' and status to 'true'.
- Forward the modified response to the browser and turn off interception.
- Access the admin portal with elevated privileges.
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 server sends back a message saying whether you are an admin. This application believed that message without checking with its own records. An attacker could change the message to say they are an admin, and the app would let them in.
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.