githubEdit

Insecure Direct Object Reference (IDOR)

Insecure Direct Object Reference (IDOR)

Locations:

1: URL

2: JS Files

3: Content loaded via an AJAX request

Use parameter mining attack to uncover sensitive to IDOR parameters.

IDs

1: Encoded (Base64)

2: Hashed (MD5)

3: Unpredictable (Create 2 accounts and swap ID numbers between them)

IDOR

Identify IDORS

  • In URL parameters & APIs

  • In AJAX Calls

  • By understanding reference hashing/encoding

  • By comparing user roles

Command

Description

md5sum

MD5 hash a string

base64

Base64 encode a string

Steps

  1. Create two accounts if possible or else enumerate users first.

  2. Check if the endpoint is private or public and does it contains any kind of id param.

  3. Try changing the param value to some other user and see if does anything to their account.

  4. Done !!

Examples:

1) Image profile [ ] delete account [ ] information account [ ] VIEW & DELETE & Create api_key [ ] allows to read any comment [ ] change price [ ] change the coin from dollar to uaro [ ] Try to decode the ID, if the ID is encoded using md5,base64, etc

2) Change HTTP method

3) Try replacing parameter names

Instead of this:

Try This:

Tip: There is a Burp extension called Paramalyzer which will help with this by remembering all the parameters you have passed to a host.

4) Path Traversal

5) Change request content-type

6) Swap non-numeric with numeric ID

7) Missing Function Level Access Control

8) Send wildcard instead of an ID

9) Never ignore encoded/hashed ID

For a hashed ID, create multiple accounts and understand the pattern application users to allot an ID

10) Google Dorking/public form

Search all the endpoints having ID which the search engine may have already indexed

11) Bruteforce Hidden HTTP parameters

Tools: arjun, paramminer

12) Bypass object level authorization. Add parameter onto the endpoint if not present by default

13) HTTP Parameter Pollution gives multiple values for the same parameter

14) Change file type

15) JSON parameter pollution

16) Wrap the ID with an array in the body

17) Wrap the ID with a JSON object

18) Test an outdated API version

19) Find IDOR using GraphQL if the website uses GraphQL

Last updated