Apa Itu IDOR?
Insecure Direct Object Reference (IDOR) terjadi ketika aplikasi mengekspos referensi langsung ke objek internal (ID, nomor, nama file) yang bisa dimanipulasi user untuk mengakses data milik orang lain.
Contoh Klasik
# Akses profil sendiri
GET /api/users/1234/profile
Authorization: Bearer token_kamu
# IDOR: ganti ID ke user lain
GET /api/users/1235/profile
Authorization: Bearer token_kamu
→ Jika berhasil = IDOR!
Tipe IDOR
| Tipe | Contoh | Severity |
| Horizontal | User A akses data User B (level sama) | Medium-High |
| Vertical | User biasa akses data admin | Critical |
| Write IDOR | Edit/hapus data milik orang lain | High-Critical |
Metodologi Testing
# Setup: buat 2 akun
Account A: token_A, user_id=100
Account B: token_B, user_id=200
# Test dengan Burp Suite:
# 1. Login sebagai A, intercept request ke /api/orders/ORDER-A-001
# 2. Ganti Authorization header dengan token_B
# 3. Jika response 200 dengan data A = IDOR!
Di Mana Mencari IDOR
- GET endpoints dengan ID di URL atau parameter
- POST/PUT untuk update profil, pengaturan, password
- DELETE untuk hapus data
- Download file:
/download?file=invoice_123.pdf
- API endpoints:
/api/v1/orders/{id}
- Referensi tersembunyi di dalam response JSON
Pro tip: Jangan hanya test ID numerik. UUID juga bisa vulnerable jika bisa didapat dari endpoint lain. Cari ID di dalam response JSON — sering ada ID objek lain yang bisa langsung dicoba.
// CEK PEMAHAMAN
Apa yang dimaksud dengan "vertical IDOR"?
AUser biasa mengakses data user lain yang satu level
BUser biasa berhasil mengakses resource admin (privilege escalation)
CMengakses file di direktori yang lebih tinggi
DMengakses database secara langsung