मुख्य सामग्री पर जाएँ
Skillpedia
सिक्योरिटी6.5k · #13959

idor

यह क्या करती है

यह स्किल असुरक्षित डायरेक्ट ऑब्जेक्ट रेफ़रेंस खोजने की प्लेबुक है, जहाँ किसी आइटम की ID मालिकाना हक जाँचे बिना इस्तेमाल होती है। यह उन डेवलपर्स और परीक्षकों के लिए है जो अपने ऐप या अधिकृत कोड की जाँच करते हैं।

कब इस्तेमाल करें

  • ✓जब डेवलपर पूछता है कि क्या URL या अनुरोध में ID बदलने से किसी और यूज़र का डेटा दिखता है।
  • ✓जब एजेंट ऐसे REST, GraphQL या क्वेरी-स्ट्रिंग एंडपॉइंट की समीक्षा करता है जो ऑब्जेक्ट ID लेते हैं।
  • ✓जब टीम ऐसे एंडपॉइंट की सूची चाहती है जिन्हें मालिकाना हक जाँच की ज़रूरत है।

Skill का लिंक

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/analyst/idor/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/analyst/idor/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“क्या आप जाँच सकते हैं कि हमारे API में ऑर्डर नंबर बदलने से कोई यूज़र दूसरे व्यक्ति का इनवॉइस देख सकता है?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट ऐसे एंडपॉइंट खोजता है जो ऑब्जेक्ट ID लेते हैं, फिर हर एक के लिए तीन सवाल पूछता है: कॉलर पहचाना जाता है या नहीं, ऑब्जेक्ट उसी का है या नहीं, और उसकी भूमिका को अनुमति है या नहीं।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

IDOR Hunting Playbook

IDOR is the #1 source of bug bounty payouts because it's simple, ubiquitous, and scanners can't find it (authorization is business logic). Every endpoint that takes an object ID is a candidate.

1. Sources

  • URL path segments: /api/users/123/invoices/456
  • Query string: ?user_id=123
  • JSON body fields: {"orderId": 123}
  • Headers used as auth scope: X-Tenant-ID, X-Customer-Id
  • JWT claims that downstream handlers trust: sub, tenant, role
  • WebSocket subscription filters
  • GraphQL arguments (user(id: 123))

2. Audit workflow

Step 1 — enumerate object-handling endpoints

# REST
grep -rE '@(Get|Post|Put|Delete|Patch)Mapping.*\{[a-zA-Z]+Id\}' /workspace/src   # Spring
grep -rE 'router\.(get|post|put|delete)\([^)]*:id' /workspace/src                # Express
grep -rE '@app\.route\([^)]*<[a-z]+:' /workspace/src                             # Flask
grep -rE 'resources?\s+:[a-z]+' /workspace/src                                   # Rails

# GraphQL
grep -rE 'type Query|type Mutation' /workspace/src
grep -rE '\w+\(id: ID' /workspace/src

Step 2 — for each endpoint, answer three questions

  1. Does it check who the caller is? (auth middleware / decorator)
  2. Does it check whether the object belongs to the caller? (ownership check / tenant filter in the query)
  3. Does it check whether the caller's role permits the action? (RBAC / policy engine)

A "no" to question 2 = horizontal IDOR (read/write other users' data). A "no" to question 3 = vertical IDOR (regular user → admin action).

Step 3 — ownership-check grep patterns

# Django: should have .filter(user=request.user) on the queryset
grep -rE 'Model\.objects\.get\(pk=' /workspace/src | grep -v 'user=request\.user'

# Rails: should have current_user.posts.find(params[:id])
grep -rE 'Post\.find\(params\[:id\]\)' /workspace/src

# Spring: should have @PreAuthorize("#id == principal.id")
grep -rE 'findById\(id\)' /workspace/src | xargs -I{} grep -L '@PreAuthorize\|@PostAuthorize'

3. High-yield patterns

GraphQL IDOR via introspection

curl -X POST https://target.com/graphql \
  -H 'Content-Type: application/json' \
  -d '{"query":"{ __schema { types { name fields { name args { name type { name } } } } } }"}'

Any query field that takes an id arg and lacks a custom directive (@auth(requires: OWNER)) is a candidate. Mutations are even higher value — they often forget ownership checks.

JWT claim trust

If the handler pulls user_id from request.user.id but also accepts a user_id query param as override for "admin features", check whether the override path enforces the admin claim. Frequently broken.

Mass assignment via hidden fields

User.objects.create(**request.POST.dict())
# allows POST'ing is_staff=true

4. PoC workflow

Two-account diff:

  1. Create account A, note sessionA cookie and objectA ID.
  2. Create account B, note sessionB cookie and objectB ID.
  3. curl -b sessionA /api/objects/<objectB> — should 403.
  4. If it returns 200 with objectB data → confirmed IDOR.

For vertical escalation:

  1. Normal user cookie sessionU.
  2. Call admin endpoint: curl -b sessionU -X POST /api/admin/users/<victim>/role -d '{"role":"admin"}'.
  3. Watch the response code + subsequent GET /api/users/<victim>.

5. UUID vs integer

Sequential integer IDs make IDOR trivial. UUIDv4 makes it harder but:

  • UUIDs leak in logs, emails, public URLs, support tickets
  • Many apps use UUIDv1 (time-based) which is partially predictable
  • Enumeration through a listing endpoint still works
  • Some APIs accept both UUID and numeric ID (dual primary key)

Always test UUID endpoints — the "it's a UUID so it's safe" assumption is one of the richest hunting grounds.

6. Success signals

  • HTTP 200 where you expected 403/404
  • Response body contains PII/data belonging to the other account
  • Role field changed on victim account
  • Subsequent admin action now permitted for low-priv session

Negative control: same request with your own account's ID. Should return 200 with identical shape. Anything that returns 404 for your own account but 200 for someone else's is a confirmation signal.

7. Default CVSS

Variant Vector Score
Horizontal read (other user PII) AV:N/AC:L/PR:L/UI
अक्सर पूछे जाने वाले सवाल

असुरक्षित डायरेक्ट ऑब्जेक्ट रेफ़रेंस क्या है?

जब ऐप अनुरोध की ID से कोई आइटम लाता है और यह नहीं जाँचता कि यूज़र उसे देखने का अधिकारी है या नहीं।

ये ID आम तौर पर कहाँ दिखती हैं?

स्किल URL पाथ, क्वेरी स्ट्रिंग, JSON बॉडी, हेडर, JWT क्लेम और GraphQL आर्गुमेंट बताती है।

स्वचालित स्कैनर के लिए यह मुश्किल क्यों है?

स्किल कहती है कि अनुमति व्यावसायिक नियमों पर निर्भर है, इसलिए स्कैनर अक्सर नहीं बता पाता कि पहुँच सही है या नहीं।

जानकारी

लेखक का मूल विवरण

Hunt Insecure Direct Object Reference (CWE-639) — missing authorization checks on object IDs. Covers horizontal vs vertical privilege escalation, UUID vs integer guessing, and GraphQL introspection-driven IDOR discovery.

repo: BitterSecurity/Decepticon

लोकप्रियता

GitHub स्टार
6.5k
रैंकिंग में स्थान
#13959
लाइसेंस
Apache-2.0
अपडेट की गई
1/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

detector-overview

6.5k

यह आपके एजेंट को स्कैनर से चिह्नित कोड पढ़ने और तय करने में मदद करती है कि कौन सी जगहें असली सुरक्षा बग हैं और कौन सी गलत चेतावनी।

कोडिंगसिक्योरिटी

exploiter-overview

6.5k

यह आपके एजेंट को कई पक्की सुरक्षा कमज़ोरियों को एक परीक्षण श्रृंखला में जोड़ने और जाँचने में मदद करती है कि वह श्रृंखला कितनी दूर तक पहुँच सकती है।

कोडिंगसिक्योरिटी

llm-redteam-overview

6.5k

यह आपके एजेंट को परीक्षण के लिए सही AI रेड-टीम गाइड खोजने में मदद करती है, प्रॉम्प्ट इंजेक्शन से लेकर मॉडल के दुरुपयोग तक 15 रणनीति समूहों में।

कोडिंगसिक्योरिटी

aatmf-t01-prompt-injection

6.5k

समझाती है कि प्रॉम्प्ट इंजेक्शन क्या है, जिसमें छिपे निर्देश AI सिस्टम के नियम बदलने की कोशिश करते हैं, ताकि सुरक्षा परीक्षक उसकी जाँच कर सकें।

कोडिंगसिक्योरिटी

मिलती-जुलती skills