Insecure Direct Object References (IDOR) are among the most common vulnerabilities found in web applications and can potentially yield substantial rewards in bug bounty programs. This guide will briefly introduce IDOR vulnerabilities and provide some bypass techniques.
What is IDOR?
IDOR occurs when an attacker can manipulate input that is used to access objects or data within the application, often leading to unauthorized access to resources.
Learning about IDOR:
To learn more about IDOR vulnerabilities and how to identify them, you can refer to resources like PortSwigger's Web Security Academy - Access Control - IDOR.
IDOR Bypass Techniques:
-
Encoded IDs and Hashed IDs:
Applications sometimes use encoded or hashed IDs in URLs. For example:
https://example.com/messages?user_id=MTIzNg
-
Check for Leaked IDs:
It's possible that an application may inadvertently leak user IDs through other API endpoints or public pages.
-
Offer an Application ID:
You can try offering an application-specific user ID in the requests to access data or resources.
Example:
GET /api_v1/messages Host: example.com Cookies: session=YOUR_SESSION_COOKIE
Try accessing data of another user:
GET /api_v1/messages?user_id=ANOTHER_USERS_ID
-
Keep Checking for Blind IDORs:
Sometimes, you may not receive a direct response or see changes on the webpage, but the request might trigger in the background. Keep monitoring.
-
Change the Request Method:
Experiment by changing the request method from
GET
toPOST
or vice versa, as some IDOR defenses may rely on request methods. -
Change the Requested File Type:
Alter the file type in the request to check if the application handles different content types differently.
Example:
GET /get_receipt?receipt_id=2983
Try with a different file type:
GET /get_receipt?receipt_id=2983.json
-
Use Burp Suite Extensions:
After getting familiar with IDOR vulnerabilities, consider using Burp Suite extensions like Autorize, Automatrix, and Autorepeater to automate and streamline your testing and exploration.
IDOR vulnerabilities can be lucrative for bug hunters, but it's crucial to responsibly disclose and report these issues to protect the application's security. Proper understanding and responsible disclosure are key factors in the bug bounty process.