Insecure Direct Object Reference (IDOR)
Introduction
IDOR stands for Insecure Direct Object Reference is a security vulnerability in which a user is able to access and make changes to data of any other user present in the system.
Where to find
Usually it can be found in APIs.
Check the HTTP request that contain unique ID, for example
user_idorid
How to exploit
Add parameters onto the endpoints for example, if there was
GET /api/v1/getuser HTTP/1.1
Host: example.com
...Try this to bypass
GET /api/v1/getuser?id=1234 HTTP/1.1
Host: example.com
...HTTP Parameter pollution
Add .json to the endpoint
Try this to bypass
Test on outdated API Versions
Try this to bypass
Wrap the ID with an array.
Try this to bypass
Wrap the ID with a JSON object
Try this to bypass
JSON Parameter Pollution
Try decode the ID, if the ID encoded using md5,base64,etc
dmljdGltQG1haWwuY29t => victim@mail.com
If the website using GraphQL, try to find IDOR using GraphQL
MFLAC (Missing Function Level Access Control)
Try this to bypass
Try to swap uuid with number
Try this to bypass
Change HTTP Method
Try this to bypass
Path traversal
Try this to bypass
Change request
Content-Type
Try this to bypass
Send wildcard instead of ID
Try this to bypass
Try google dorking to find new endpoint
References
@swaysThinking and other medium writeup
Last updated