Broken Access Control: IDOR & Cookie Tampering
Access controls fail when the server trusts the client. Read another user's private data by changing an id, then forge a cookie to walk into the admin panel and steal its API key.
- Intermediate
- 45 min
- Security
- Access control
- IDOR
- OWASP
Overview
Broken access control is the #1 risk on the OWASP Top 10 — and it usually comes down to one mistake: the server trusting something the client controls. This lab shows two flavours on VulnShop (http://localhost:5000).
First you'll exploit an IDOR (Insecure Direct Object Reference): the notes endpoint serves any record by id without checking who's asking, so changing the number in the URL reveals the admin's private note. Then you'll defeat a broken authorization check by forging the role cookie the server naïvely trusts — strolling into the admin panel and lifting its API key. Each win is a captured FLAG{...}.
What you will learn
- Exploit an IDOR by manipulating an object id
- Recognise authorization that trusts client-supplied state
- Forge a cookie to escalate privileges
- Reach a protected resource you were never granted
- Understand why access checks must happen server-side
Before you start
- Comfortable with
curl, including cookies (-b) - Basic understanding of HTTP requests and responses
- Authorised-target rule: only against your own private lab
Tasks
- 01Walk an IDOR
- 02Forge your way into /admin
- 03Steal the admin API key