Privilege Escalation with simple recon
A normal user could access an administrator menu page that allowed updating and removing any user's address. By injecting an XSS payload into an address, an attacker could steal cookies from other users, including administrators.
Published on medium.com
Today I want to share with you a Privilege Escalation chain with Blind XSS which I found in private site. In this write-up, I will explain how I found Privilege Escalation and methodologies.
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 admin page lacked proper access control, allowing any logged-in user to access it, and user-supplied address fields were not sanitised before being displayed.
Impact
An attacker could steal cookies from any user, including administrators, potentially leading to account takeover.
What the attacker needed
A normal user account; victim views the injected address
How it was found
- Perform directory search and find cAdmin.asp with a 301 status code.
- Open cAdmin.asp while logged in as a normal user and see a forbidden message with four buttons.
- Click the addresses.asp button to enter the administrator menu.
- Go to 'view addresses' to see and edit any user's address.
- Update an address with an XSS payload and log in as the other user to trigger it.
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 normal user account could reach a hidden admin page that let them change other people's addresses. They could put a small script in an address, and when an admin viewed it, the script ran and could steal the admin's login cookie. This is called cross-site scripting (XSS), where harmful code runs in someone else's browser.
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.