What I learnt from reading 220* IDOR bug reports.

2 years ago 140
BOOK THIS SPACE FOR AD
ARTICLE AD

Sm9l

idor banner

banner

IDOR — Insecure Direct Object Reference, abuse of the lack of authentication at every stage.

A while ago, I curled up in bed, with my laptop and a coffee, and scraped every single IDOR report from hackerone. A week or so later, I had compiled notes and findings from my reading and I’m here to show you what I’ve learnt, and how my understanding of a seemingly simple bug has changed massivley.

For reference, throughout the article I will refer to various bug reports via numbers, these numbers correlate to bug reports, which can be found by replacing XXXXXX in the url: https://hackerone.com/reports/XXXXXX

That subheading was pretty dramatic, realisitcally, it should be “Your understanding of IDOR is too narrow”. Typically people think an IDOR is just finding a parameter called “ID” (or similar) and replacing the number with another, like report 797685.

idor demo part 1

https://hackerone.com/reports/797685

Then receiving Status 200, saying an operation from a different user has been complete.

idor demo part 2

idor demo part 2

https://hackerone.com/reports/797685

IDOR is wider than this. IDOR does not have to apply to accounts. It doesnt not have to apply to IDs. It is not just found in basic formats. We will discuss this misunderstanding in a bit more detail.

When reading these reports, I counted where I found the various weakness emerged and here are the results:

Graph showing where IDORs are found

Graph showing where IDORs are commonly foundREST APIs 31.8%GET parameters 25.8%POST request bodies 21.2%graphQL endpoints 9.1%PUT parameters 4.5%IDs in the request header 3.0%IDs in the cookies 3.0%Misc Query langauges 1.5%

This is often an idea which I hear propagated; it is a fairly reductionist way of thinking about this bug. Although it may be more technically simple than most other bugs, there are still concepts you can learn to increase your success with them. And it is still the bug which yeilds higher bounties, than Privesc, SQLi and Code Injection.

Here are some points to keep in mind:

Can you find IDs that arent incremental? Sometimes an ID can be found by visiting a page or an asset.

https://hackerone.com/reports/404797

https://hackerone.com/reports/404797

https://hackerone.com/reports/404797

An ID can be found in the source code on a page in a twitter:

https://hackerone.com/reports/181748

https://hackerone.com/reports/181748

https://hackerone.com/reports/181748Is the ID encoded or not in plaintext? (291721)Can a file/resource be accessed directly from the url, without needing prior authentication? (94790, 258260, 230328, 230870, 126861)

Images are commonly vulnerable to this kind of vulnerability, as seen in report 258260:

GIF showing IDOR on image

GIF showing IDOR on image

https://hackerone.com/reports/258260Are there bypasses, like finding similar sites with less protection (876300, 715054, 271393)

Some alternate sites of the main one may contain vulnerabilities which were patched in the main one. Try different regional top level domains, or APIs on different

https://hackerone.com/reports/876300 payout

https://hackerone.com/reports/876300 payout

https://hackerone.com/reports/876300Can you get an IDOR by changing the request method, or does the exploit involve using a different method? (204984, 199321, 297751)

https://hackerone.com/reports/199321

https://hackerone.com/reports/199321

https://hackerone.com/reports/199321Are IDs not actually numbers but strings? Sometimes the IDOR can be exploited via a username or email change instead of an ID. (262661, 152407, 587687)

IDOR showing manipulation with a string instead of ID number

IDOR showing manipulation with a string instead of ID number

https://hackerone.com/reports/152407

IDOR is probably the easiest way to get a high priority account takeover. However, tunnel vision-ing this objective can stop you from spotting IDORs which results in different, or lower priority IDORs. Instead, think about:

Does it leak PII (293490, 980511, 723461, 668439, 783708, 439729, 152407)

293490 Shows us how an IDOR can result in leaking emails of all users in a response. Leaking PII.

PII leak

PII leak

https://hackerone.com/reports/293490Can you bypass payment (391092)

Payment bypass

Payment bypass

https://hackerone.com/reports/391092

payment bypass payout

payment bypass payout

https://hackerone.com/reports/391092Can you do actions on other’s behalfs (1005020, 725569, 258260)Can you destroy or damage any assets or info? (156537, 264754, 153905, 120115)
IDOR bugs are broader than most people think.Almost 80% of IDORs are found in REST APIs, GET parameters or POST request bodies, although you should still search in the other 20%.Success in finding IDORs comes from creative ways of finding them.Your goal is not always to get P1 Account takeovers.

If you thought any of this information was useful, following would be a free and easy way to support me, my goal is to reach 100 followers, and we’re already 60% of the way there! I look forward to posting more informational content.

PS I see when people tweet my articles and I always really appreciate it. 💙

*DISCLAIMER: I take no responsibility for any actions committed by readers. Only perform enumeration on targets you have permission for. Always read and check the scope of a program for guidance. These reports were scraped and read on 10th of March 2021, and some of them were not fully disclosed or in different langauges.

Read Entire Article