How I Hacked an Entrepreneur
An admin login page relied on a 302 redirect to block unauthenticated users, and changing the response to 200 OK let the author through. The author then changed the admin password and gained access to the portal.
infosecwriteups.com
Published on infosecwriteups.com
I was searching for a bug bounty programme using google dorks when I found a private vdp. It was a bit old but I thought why not give it a try
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 server decided access by the redirect response alone rather than checking authorisation on the admin actions themselves, so altering the status code in the response let the request through.
Impact
An attacker could reach the admin portal without valid credentials and change the admin password, taking over the administrative account.
What the attacker needed
Access to the admin login page; ability to intercept responses
How it was found
- Run directory brute forcing against the target and find the admin path.
- Open the admin login page.
- Intercept the response and change the 302 status code to 200 OK.
- Use the resulting access to change the admin password.
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, a website often sends your browser a redirect (a 302 status) to the login page if you are not allowed in. The author used a tool to intercept that response and changed the status code to 200 OK, which the site apparently treated as success. That let them reach the admin area and reset the admin 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.