ineedcodes 1.6.1 → 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 +6 -3
  217. package/src/skills.js +30 -6
  218. package/src/ui.js +1 -1
@@ -0,0 +1,711 @@
1
+ ---
2
+ name: business-logic-vulnerabilities
3
+ description: >-
4
+ Business logic vulnerability playbook. Use when reasoning about workflows, race conditions, price manipulation, coupon abuse, state machines, and multi-step authorization gaps.gated: true
5
+ ---
6
+
7
+ # SKILL: Business Logic Vulnerabilities — Expert Attack Playbook
8
+
9
+ > **AI LOAD INSTRUCTION**: Business logic flaws are scanner-invisible and high-reward on bug bounty. This skill covers race conditions, price manipulation, workflow bypass, coupon/referral abuse, negative values, and state machine attacks. These require human reasoning, not automation. For specific exploitation techniques (payment precision/overflow, captcha bypass, password reset flaws, user enumeration), load the companion [SCENARIOS.md](./SCENARIOS.md). For the workflow approach itself (modeling → state machine → attack-surface matrix → human judgement) load [METHODOLOGY.md](./METHODOLOGY.md). For the per-module check items load [CHECKLIST.md](./CHECKLIST.md).
10
+
11
+ ### Companion files
12
+
13
+ | File | When to load |
14
+ |---|---|
15
+ | [METHODOLOGY.md](./METHODOLOGY.md) | Need the 5-phase workflow, attack-surface 5×N matrix, human-judgement decision tree |
16
+ | [CHECKLIST.md](./CHECKLIST.md) | Going through a target module-by-module (login / register / payment / IDOR / privacy) and want every line item with why+verify |
17
+ | [SCENARIOS.md](./SCENARIOS.md) | Drilling deeper into payment precision/overflow, captcha bypass, password reset, enumeration, frontend bypass |
18
+
19
+ ### Extended Scenarios
20
+
21
+ Also load [SCENARIOS.md](./SCENARIOS.md) when you need:
22
+ - Payment precision & integer overflow attacks — 32-bit overflow to negative, decimal rounding exploitation, negative shipping fees
23
+ - Payment parameter tampering checklist — price, discount, currency, gateway, return_url fields
24
+ - Condition race practical patterns — parallel coupon application, gift card double-spend with Burp group send
25
+ - Captcha bypass techniques — drop verification request, remove parameter, clear cookies to reset counter, OCR with tesseract
26
+ - Arbitrary password reset — predictable tokens (`md5(username)`), session replacement attack, registration overwrite
27
+ - User information enumeration — login error message difference, masked data reconstruction across endpoints, base64 uid cookie manipulation
28
+ - Frontend restriction bypass — array parameters for multiple coupons (`couponid[0]`/`couponid[1]`), remove `disabled`/`readonly` attributes
29
+ - Application-layer DoS patterns — regex backtracking, WebSocket abuse
30
+
31
+ ---
32
+
33
+ ## 1. PRICE AND VALUE MANIPULATION
34
+
35
+ ### Negative Quantity / Price
36
+ Many applications validate "amount > 0" but not for currency:
37
+ ```
38
+ Add to cart with quantity: -1
39
+ Update quantity to: -100
40
+ {
41
+ "quantity": -5,
42
+ "price": -99.99 ← may be accepted
43
+ }
44
+ ```
45
+ **Impact**: Receive credit to account, items for free, bank transfers in reverse.
46
+
47
+ ### Decimal Quantity — "0元购" Case
48
+ Real instructor-led case: an e-commerce app accepted **fractional `quantity`** because backend trusted client float values:
49
+ ```json
50
+ // Cart item:
51
+ {"id": 114016, "skuQty": 0.02}
52
+ // Original price ¥500 → final price ¥10
53
+ // Variant on a food delivery app:
54
+ // FoodNum=0.01 → 68元 商品 实付 0.68元
55
+ ```
56
+ Why it works: server multiplies `unit_price * quantity` without enforcing `quantity ∈ Z+`, so a 2% sliver order pays 2% price but ships the full item. Reproduce by intercepting the cart submit → setting `skuQty` / `FoodNum` to `0.02` → finishing checkout.
57
+
58
+ ### Drop a Required Field — Free Tier Coercion
59
+ Sport activity registration: when paid prizes are involved server returns `"payType": "paid"`; if the client request is **edited to omit `prizeIdList` entirely**, the server falls back to `"payType": "free"` and creates a successful registration that should have cost money.
60
+ ```json
61
+ // Original
62
+ {"prizeIdList": ["6264e6948fe587000113e2d9"], ...}
63
+ // Modified — array removed entirely
64
+ {"prizeIdList": [], ...}
65
+ // Server response:
66
+ {"ok": true, "payType": "free"}
67
+ ```
68
+ This is a parameter-existence trust bug — backend treats "field absent" as "no paid item to enforce", so fix is to require the field and validate its content server-side.
69
+
70
+ ### Integer Overflow
71
+ ```
72
+ quantity: 2147483648 ← INT_MAX + 1 overflows to negative in 32-bit
73
+ price: 9999999999999 ← exceeds float precision → rounds to 0
74
+ ```
75
+ Real case: setting `amount=999999999` triggered an overflow path where the system stored `0` as final payable. **Always coordinate before triggering overflow tests** — they sometimes crash payment services.
76
+
77
+ ### Rounding Manipulation
78
+ ```
79
+ Item price: $0.001
80
+ Order 1000 items → each rounds down → total = $0.00
81
+ ```
82
+ Real "half-price recharge" bug: input `¥0.019` to top-up. The pay gateway charges only `¥0.01` (rounded down to the cent), but the wallet credits `¥0.02` (rounded up). Net gain per cycle is `¥0.01`, repeat for free balance growth.
83
+
84
+ ### Currency Exchange Rate Lag
85
+ ```
86
+ 1. Deposit using currency A at rate X
87
+ 2. Rate changes
88
+ 3. Withdraw using currency A at new rate → profit from rate difference
89
+ ```
90
+
91
+ ### Free Upgrade via Promo Stacking
92
+ Test combining discount codes, referral credits, welcome bonuses:
93
+ ```
94
+ Apply promo: FREE50 → 50% off
95
+ Apply promo: REFER10 → additional 10%
96
+ Apply loyalty points → additional discount
97
+ Total: -$5 (free + credit)
98
+ ```
99
+
100
+ ---
101
+
102
+ ## 2. RACE CONDITIONS
103
+
104
+ **Concept**: Two operations run simultaneously before the first completes its check-update cycle.
105
+
106
+ ### Double-Spend / Double-Redeem
107
+ ```bash
108
+ # Send same request simultaneously (~millisecond apart):
109
+ # Use Burp Repeater "Send to Group" or Race Conditions tool:
110
+
111
+ POST /api/use-coupon ← send 20 parallel requests
112
+ POST /api/redeem-gift ← same coupon code, parallel
113
+ POST /api/withdraw-funds ← same balance, parallel
114
+
115
+ # If check and update are non-atomic:
116
+ # Thread 1: check(balance >= 100) → TRUE
117
+ # Thread 2: check(balance >= 100) → TRUE (before Thread 1 deducted)
118
+ # Thread 1: balance -= 100
119
+ # Thread 2: balance -= 100 → BOTH succeed → double-spend
120
+ ```
121
+
122
+ ### Race Condition Test with Burp Suite
123
+ ```
124
+ 1. Capture request
125
+ 2. Send to Repeater → duplicate 20+ times
126
+ 3. "Send group in parallel" (Burp 2023+)
127
+ 4. Check: did any duplicate succeed?
128
+ ```
129
+
130
+ ### Turbo Intruder — Bypassing Per-Number SMS Rate Limit
131
+ Real case: when a normal request returns `"该号码短时间内申请发送短信次数过多,拒绝发送"`, sending the **same payload** with high concurrency through Turbo Intruder defeats the simple counter:
132
+ ```python
133
+ def queueRequests(target, wordlists):
134
+ engine = RequestEngine(endpoint=target.endpoint,
135
+ concurrentConnections=30,
136
+ requestsPerConnection=10,
137
+ pipeline=False)
138
+ for i in range(30):
139
+ engine.queue(target.req, target.baseInput, gate='race1')
140
+ engine.openGate('race1')
141
+ ```
142
+ Result: the per-phone limiter races and many requests slip through, generating multiple distinct verification codes (a real SMS-bombing case). Root cause: counter increment is non-atomic vs. the read.
143
+
144
+ ### Multi-Device Concurrent VIP Subscription
145
+ Real case: a service offers **first-month-only discount**. Open the pay sheet on multiple devices (A, B, C) before any payment finishes, then complete each in sequence. Server only checks "is new user?" at the **first** request, so all subsequent requests inherit the discount AND the VIP duration stacks.
146
+ ```
147
+ Normal: 下单 → 支付 → 充值会员 → 第二次下单 → 服务端校验 "已是新人" → 拒绝
148
+ Bypass: 设备A: 进入支付页 (锁定优惠资格)
149
+ 设备B: 进入支付页 (并发锁定)
150
+ 设备A: 完成支付 → VIP +1月 (优惠价)
151
+ 设备B: 完成支付 → VIP +1月 (仍按优惠价)
152
+ ```
153
+ Same trick works on "补差价升级会员" — concurrent top-ups duplicate the duration credit.
154
+
155
+ ### Account Registration Race
156
+ ```
157
+ Register with same email simultaneously → two accounts created → data isolation broken
158
+ Password reset token race → reuse same token twice
159
+ Email verification race → verify multiple email addresses
160
+ ```
161
+
162
+ ### Limit Bypass via Race
163
+ ```
164
+ "Claim once" discounts, freebies, "first order" bonus:
165
+ → Send 10 parallel POST /claim requests
166
+ → Race window: all pass the "already claimed?" check before any write
167
+ ```
168
+
169
+ ---
170
+
171
+ ## 3. WORKFLOW / STEP SKIP BYPASS
172
+
173
+ ### Payment Flow Bypass
174
+ ```
175
+ Normal flow:
176
+ 1. Add to cart
177
+ 2. Enter shipping info
178
+ 3. Enter payment (card/wallet)
179
+ 4. Click confirm → payment charged
180
+ 5. Order confirmed
181
+
182
+ Attack: Skip to step 5 directly
183
+ POST /api/orders/confirm {"cart_id": "1234", "payment_status": "paid"}
184
+ → Does server trust client-sent payment_status?
185
+ ```
186
+
187
+ ### Multi-Step Verification Skip
188
+ ```
189
+ Password reset flow:
190
+ 1. Enter email
191
+ 2. Receive token
192
+ 3. Enter token
193
+ 4. Set new password (requires valid token from step 3)
194
+
195
+ Attack: Try going to step 4 without completing step 3:
196
+ POST /reset/password {"email": "victim@x.com", "token": "invalid", "new_pass": "hacked"}
197
+ → Does server check that token was properly validated?
198
+
199
+ Or: Try token from old/expired flow → still accepted?
200
+ ```
201
+
202
+ ### 2FA Bypass
203
+ ```
204
+ Normal flow:
205
+ 1. Enter username + password → success
206
+ 2. Enter 2FA code → logged in
207
+
208
+ Attack: After step 1 success, go directly to /dashboard
209
+ → Is session created before 2FA completes?
210
+ → Does /dashboard require 2FA-complete check or just "authenticated" flag?
211
+ ```
212
+
213
+ ### Filter Path Truncation Bypass — `..//` and `;`
214
+
215
+ Real case from a Java Web class audit: a manually-implemented Servlet `Filter` checks login by inspecting the URI string. Two reliable bypasses:
216
+
217
+ ```
218
+ Path-traversal truncation (../):
219
+ Protected: http://target/FilterDemo/index.jsp → 302 to /login
220
+ Bypass: http://target/FilterDemo/../../index.jsp → 200 (filter sees "../../", URL parser collapses)
221
+
222
+ Semicolon truncation (;):
223
+ Protected: http://target/admin/doLogin.action → 302 to /login
224
+ Bypass: http://target/;/admin/doLogin.action → 200
225
+ ^
226
+ Servlet container treats segment after ; as "path parameter",
227
+ filter that uses request.getRequestURI() sees "/;/admin/doLogin.action",
228
+ doesn't match its protected-prefix "/admin/", lets the request through,
229
+ but the dispatcher then routes to the real /admin/doLogin.action handler.
230
+ ```
231
+
232
+ **Fix**: never use `request.getRequestURI()` for security checks; use `request.getServletPath()` which is the normalized servlet-mapped path:
233
+ ```java
234
+ // Vulnerable
235
+ String uri = request.getRequestURI(); // /;/admin/doLogin.action
236
+ // Safe
237
+ String path = request.getServletPath(); // /admin/doLogin.action
238
+ ```
239
+
240
+ When auditing Java code, grep for `request.getRequestURI()` paired with `Filter`/`startsWith`/`indexOf("/admin")` patterns — those are immediate red flags.
241
+
242
+ ### Real-Name Verification Replay-To-Reset
243
+
244
+ Fraudulent path that deliberately fails real-name authentication to **reopen** the editing flow:
245
+ ```
246
+ 1. Submit real-name auth with intentionally wrong cardNumber
247
+ → server returns "code:200, msg:success, ok:true" but flow shows "驳回 / 等待审核"
248
+ 2. Because the server marks state as "rejected" but doesn't lock the user, the UI lets the
249
+ account go back into the "edit identity" state
250
+ 3. Now resubmit with another (possibly stolen) identity
251
+ → real-name binding repeats indefinitely, defeating anti-addiction lock and enabling account resale
252
+ ```
253
+ Defense: rejected real-name submissions must lock the account / require human review, not loop back to the editor.
254
+
255
+ ### Shipping Without Payment
256
+ ```
257
+ 1. Add item to cart
258
+ 2. Enter shipping address
259
+ 3. Select payment method (credit card)
260
+ 4. Apply promo code (100% discount or gift card)
261
+ 5. Final amount: $0
262
+ 6. Order placed
263
+
264
+ Attack: Apply 100% discount code → no actual payment processed → item ships
265
+ ```
266
+
267
+ ---
268
+
269
+ ## 4. COUPON AND REFERRAL ABUSE
270
+
271
+ ### Coupon Stacking
272
+ ```
273
+ Test: Can you apply multiple coupon codes?
274
+ Test: Does "SAVE20" + promo stack to >100%?
275
+ Test: Apply coupon, remove item, keep discount applied, add different item
276
+ ```
277
+
278
+ ### Referral Loop
279
+ ```
280
+ 1. Create Account_A
281
+ 2. Register Account_B with Account_A's referral code → both get credit
282
+ 3. Create Account_C with Account_B's referral code
283
+ 4. Ad infinitum with throwaway emails
284
+ → Infinite credit generation
285
+ ```
286
+
287
+ ### Coupon = Fixed Dollar Amount on Variable-Price Item
288
+ ```
289
+ Coupon: -$5 off any order
290
+ Buy item worth $3, use -$5 coupon → net -$2 (credit balance)
291
+ ```
292
+
293
+ ---
294
+
295
+ ## 5. ACCOUNT / PRIVILEGE LOGIC FLAWS
296
+
297
+ ### Email Verification Bypass
298
+ ```
299
+ 1. Register with email A (legitimate, verified)
300
+ 2. Change email to B (attacker's email, unverified)
301
+ 3. Use account as verified — does server enforce re-verification?
302
+
303
+ Or: Change email to victim's email → no verification → account claim
304
+ ```
305
+
306
+ ### Password Reset Token Binding
307
+ ```
308
+ 1. Request password reset for your account → get token
309
+ 2. Change your email address (account settings)
310
+ 3. Reuse old password reset token → does it still work for old email?
311
+
312
+ Or: Request reset for victim@target.com
313
+ Token sent to victim but check: does URL reveal predictable token pattern?
314
+ ```
315
+
316
+ ### OAuth Account Linking Abuse
317
+ ```
318
+ 1. Have victim's email (but not their password)
319
+ 2. Register with victim's email → get account with same email
320
+ 3. Link OAuth (Google/GitHub) to your account
321
+ 4. Victim logs in with Google → server finds email match → merges with YOUR account
322
+ ```
323
+
324
+ ### Cookie Replacement — Horizontal/Vertical Privilege Escalation
325
+
326
+ The textbook IDOR demo from the audit videos:
327
+ ```
328
+ 1. Login as super-admin → capture request, copy Cookie (JSESSIONID/Token)
329
+ 2. Logout, login as plain user → capture another request to the SAME endpoint
330
+ 3. Replay the plain-user request, but swap the Cookie value with the admin's token
331
+ 4. If the response returns admin-only data → vertical escalation
332
+ If it returns another-user's data → horizontal escalation
333
+ ```
334
+ A common companion bug: `/oa/emp/list` returns **HTTP 302 to /login when no cookie**, but **200 with full data when any plain-user cookie is sent** — meaning the only check is "logged in?", not "authorized for this endpoint".
335
+
336
+ ### Permission Residue from Database Inconsistency
337
+
338
+ A subtle case from the second audit class: the admin UI shows that role X has had permission `user:list` revoked, but querying the SQL data:
339
+
340
+ ```sql
341
+ SELECT * FROM sys_menu WHERE role_id = 2;
342
+ -- two rows for the same menu_id "user:list"
343
+ ```
344
+
345
+ The UI's "remove permission" only deleted ONE row; the duplicate row keeps the API accessible. Verify by:
346
+ ```sql
347
+ SELECT menu_id, COUNT(*) FROM sys_menu GROUP BY menu_id, role_id HAVING COUNT(*) > 1;
348
+ ```
349
+
350
+ Lesson: when a UI says permission revoked but API still works → check the underlying RBAC table for duplicates / orphaned grants.
351
+
352
+ ### Weak-Random Password Reset Token
353
+
354
+ PHP / legacy stack on Windows uses `rand()` whose `RAND_MAX = 32768`. If a reset link uses
355
+ `/resetpassword.php?id=md5(rand())`, the entire keyspace is precomputable:
356
+ ```php
357
+ $a = 0;
358
+ for ($a = 0; $a <= 32768; $a++) {
359
+ $b = md5($a);
360
+ echo $b . "\r\n";
361
+ }
362
+ ```
363
+ Iterate the resulting dictionary against `/resetpassword.php?id=<hash>` — when one returns a valid reset page you can change the victim's password. Audit any token generation that ultimately calls `rand()`, `mt_rand()` (without seeding), `Random()` (default seed in C#), etc.
364
+
365
+ ---
366
+
367
+ ## 6. API BUSINESS LOGIC FLAWS
368
+
369
+ ### Object State Manipulation
370
+ ```
371
+ order.status = "pending"
372
+ → PUT /api/orders/1234 {"status": "refunded"} ← self-trigger refund
373
+ → PUT /api/orders/1234 {"status": "shipped"} ← mark as shipped without shipping
374
+ ```
375
+
376
+ ### Transaction Reuse
377
+ ```
378
+ 1. Initiate payment → get transaction_id
379
+ 2. Complete purchase
380
+ 3. Reuse same transaction_id for second purchase:
381
+ POST /api/checkout {"transaction_id": "USED_TX", "cart": "new_cart"}
382
+ ```
383
+
384
+ ### Limit Count Manipulation
385
+ ```
386
+ Daily transfer limit = $1000
387
+ → Transfer $999, cancel, transfer $999 (limit not updated on cancel)
388
+ → Parallel transfers (race condition on limit check)
389
+ → Different payment types not sharing limit counter
390
+ ```
391
+
392
+ ### Java Web "No Filter, No Spring Security" Anti-Pattern
393
+
394
+ Audit-friendly tell: a Spring Boot project that does **NOT** include `spring-boot-starter-security` and has zero `Filter` classes. This means every controller is wide-open for `guest` unless the developer manually checked the session in each method. Reproduce:
395
+ ```bash
396
+ # Inside the source tree
397
+ find . -name "*.java" -exec grep -l "Filter" {} \; # likely empty
398
+ find . -name "*.java" -exec grep -l "@PreAuthorize\|@Secured" {} \;
399
+ ```
400
+ If both are empty, expect almost every API to be unauthorized. From the audit demo:
401
+ ```java
402
+ public Result score(@RequestParam("userId") Integer userId) {
403
+ Score score = scoreService.selectScoreByUserId(userId);
404
+ return Result.success(score);
405
+ }
406
+ ```
407
+ No check that `userId` matches the session's logged-in user → horizontal IDOR. Worse: the same endpoint works **without any Cookie**, since nothing forces authentication globally.
408
+
409
+ ### Spring Security `antMatchers` Coverage Gap
410
+
411
+ The audit videos also showed a partially-secured Spring Security config like:
412
+ ```java
413
+ .antMatchers("/system/user/info").authenticated()
414
+ .antMatchers("/system/menu/**").hasRole("admin")
415
+ ```
416
+ A common error is an over-narrow rule — e.g. `/system/user/info` is protected but `/system/user/list` is not, or `/system/menu/**` is admin-only but `/system/dept/treeData` is open. Cross-check the controller annotations (`@PreAuthorize("@ss.hasPermi('system:user:list')")`) against the SecurityConfig — every annotated endpoint must also map to a SecurityConfig rule. Mismatches are common after refactors.
417
+
418
+ ---
419
+
420
+ ## 7. SUBSCRIPTION / TIER CONFUSION
421
+
422
+ ```
423
+ Free tier: cannot access feature X
424
+ Paid tier: can access feature X
425
+
426
+ Attack:
427
+ - Sign up for paid trial → enable feature X → downgrade to free
428
+ → Does feature X get disabled on downgrade?
429
+ → Can you continue using feature X?
430
+
431
+ Or:
432
+ - Inspect premium endpoint list from JS bundle
433
+ - Directly call premium endpoints with free account token
434
+ → Server checks subscription for UI but not API?
435
+ ```
436
+
437
+ ### Direct Media URL Leak — VIP Resource Bypass
438
+
439
+ Real cases from a fitness/learning app: when the client requests course detail, the JSON response embeds the raw media URL:
440
+ ```http
441
+ GET /gerudo/v2/liveCourse/625020ce8f002700010554c1/detail HTTP/1.1
442
+ {
443
+ "previewPullUrl": "http://app-live.../live/app-live_625020ce8f002700010554c2_Preview.flv"
444
+ ...
445
+ }
446
+ ```
447
+ Search **all** detail / preview / playback responses for keywords:
448
+ ```
449
+ .flv .m3u8 .mp4 .mp3 videoUrl downloadUrl streamUrl previewPullUrl
450
+ ```
451
+ For each hit, replay the URL anonymously (curl, VLC, flv.js demo at `https://bilibili.github.io/flv.js/demo/`). If the URL plays without a session, you've broken VIP gating. Defense: use signed, short-TTL URLs bound to user/IP/Referer, not raw resource paths.
452
+
453
+ ### Resource ID Replacement — Free → Paid Course
454
+
455
+ Companion bug: free course detail returns `{"id": "60caa21e853f5c1651b27c1b", ...}`. Replace the ID in the URL with a known paid course ID. If the response structure remains the same and includes the playable URL → IDOR on premium content. Defense: verify the **owner relation** on each detail call, not just "is logged-in".
456
+
457
+ ---
458
+
459
+ ## 8. FILE UPLOAD BUSINESS LOGIC
460
+
461
+ For the full upload attack workflow beyond pure logic flaws, also load:
462
+
463
+ - [upload insecure files](../upload-insecure-files/SKILL.md)
464
+
465
+ ```
466
+ Upload size limit: 10MB
467
+ → Upload 10MB → compress client-side → server decompresses → bomb?
468
+ (Zip bomb: 1KB zip → 1GB file = denial of service)
469
+
470
+ Upload type restriction:
471
+ → Upload .csv for "data import" → inject formulas: =SYSTEM("calc")
472
+ (CSV injection in Excel macro context)
473
+ → Upload avatar → server converts → attack converter (ImageMagick, FFmpeg CVEs)
474
+
475
+ Storage path prediction:
476
+ → /uploads/USER_ID/filename
477
+ → Can you overwrite other user's file by knowing their ID + filename?
478
+ ```
479
+
480
+ ---
481
+
482
+ ## 9. TESTING APPROACH
483
+
484
+ ```
485
+ For each business process:
486
+ 1. Map the INTENDED flow (happy path)
487
+ 2. Ask: "What if I skip step N?"
488
+ 3. Ask: "What if I send negative/zero/MAX values?"
489
+ 4. Ask: "What if I repeat this step twice?" (idempotency)
490
+ 5. Ask: "What happens if I do A then B instead of B then A?"
491
+ 6. Ask: "What if two users do this simultaneously?"
492
+ 7. Ask: "Can I modify the 'trusted' status fields?"
493
+ 8. Think from financial/resource impact angle → highest bounty
494
+ ```
495
+
496
+ For the formal 5-phase workflow — Business Modeling → State Machine → Attack-Surface Matrix → Checklist-Driven Testing → Human Judgement — load **[METHODOLOGY.md](./METHODOLOGY.md)**. It includes a single-page decision tree (`Q1 ~ Q7`) for "I'm staring at a request and don't know what to try first".
497
+
498
+ ---
499
+
500
+ ## 10. HIGH-IMPACT CHECKLISTS
501
+
502
+ For the full per-module list (login / register / password recovery / payment / coupon / order / IDOR / privacy / VIP / URL redirect / cookie & token / race / comments) with `why` and `verify` columns — load **[CHECKLIST.md](./CHECKLIST.md)**.
503
+
504
+ The condensed top-impact items below are the "if you have only 30 minutes, hit these first" set:
505
+
506
+ ### E-commerce / Payment
507
+ ```
508
+ □ Negative quantity / decimal quantity (skuQty=0.02, FoodNum=0.01) in cart
509
+ □ Drop required fields (delete prizeIdList) to coerce free tier
510
+ □ amount=999999999 integer overflow → final 0
511
+ □ Apply multiple conflicting coupons via array params
512
+ □ Race condition: double-spend gift card / same coupon
513
+ □ Skip payment step directly to order confirmation
514
+ □ Server-trusted client status fields (payment_status=paid, success:true)
515
+ □ Refund without return (trigger refund on delivered item via state change)
516
+ □ Multi-device concurrent VIP subscription / 补差价升级
517
+ □ Currency rounding exploitation (¥0.019 charge → ¥0.02 wallet credit)
518
+ ```
519
+
520
+ ### Authentication / Account
521
+ ```
522
+ □ 2FA bypass by direct URL access after password step
523
+ □ Filter bypass: ../../path traversal truncation, ;path-parameter truncation
524
+ □ Password reset token reuse after email change
525
+ □ Weak random reset token: md5(rand()) on Windows PHP, predictable seed
526
+ □ Email verification bypass (change email after verification)
527
+ □ OAuth account takeover via email match
528
+ □ Register with existing unverified email
529
+ □ Cookie replacement (admin → user / user → another user)
530
+ □ Real-name verification "故意填错" replay-to-reset
531
+ ```
532
+
533
+ ### Subscriptions / Limits / Resources
534
+ ```
535
+ □ Access premium features after downgrade
536
+ □ Exceed rate/usage limits via parallel requests (Turbo Intruder)
537
+ □ Referral loop for infinite credits
538
+ □ Free trial ≠ time-limited (no enforcement after trial)
539
+ □ Direct API call to premium endpoint without subscription check
540
+ □ Free-course ID swap to paid-course ID (IDOR on resource)
541
+ □ Direct media URL exposure in JSON (.flv / .m3u8 / .mp4 in response)
542
+ □ Server-side RBAC residue (sys_menu duplicate rows)
543
+ □ Java Web no-Filter / Spring Security antMatchers gap
544
+ ```
545
+
546
+ ---
547
+
548
+ ## 11. CONSOLIDATED CHECKLIST (2-Hour Full Sweep)
549
+
550
+ The Section 10 list is the "30-minute money grab". This list is the next layer:
551
+ when you have a couple of hours and want a defensive-grade sweep across all
552
+ nine business surfaces. It's organized by surface, then by attack mechanism
553
+ inside the surface, so you can read a column-down for "what classes of bug
554
+ might exist on this endpoint" and a row-across for "where else does this
555
+ attack apply".
556
+
557
+ For full `item / why / verify` triplets including reproduction steps and
558
+ tooling per item, load **[CHECKLIST.md](./CHECKLIST.md)**. This section
559
+ keeps only the item line for fast scanning.
560
+
561
+ ### 11.1 Login / Authentication
562
+ ```
563
+ □ Username enumeration via response diff (msg / status code / timing)
564
+ □ Username enumeration via SMS-send response (sent vs not-registered)
565
+ □ Brute force without lockout (no rate limit on failed login)
566
+ □ Default / weak credentials (admin/admin, root/123456) on backend & infra
567
+ □ 2FA bypass via direct URL after password step / replay 2FA token
568
+ □ Client-trusted login flag (status=success, is_login=true in response body)
569
+ □ Third-party / SSO callback IDOR (modify uid in callback to take over)
570
+ □ Biometric liveness bypass (replay static photo / pre-recorded video)
571
+ □ Open redirect in login/register (return_url, redirect, callback param)
572
+ □ Hardware-key signature replay / forgery (USB-Key, PKI cert)
573
+ ```
574
+
575
+ ### 11.2 Registration
576
+ ```
577
+ □ Username / phone / email enumeration via "already exists" response
578
+ □ Password strength only enforced client-side (set 123456 server-side)
579
+ □ Skip multi-step registration (POST final step directly, miss email verify)
580
+ □ Verification code not enforced (empty / random / fixed value passes)
581
+ □ SMS / email code replay (same code used twice or across users)
582
+ □ Re-register same username after logout, inherit old data / privileges
583
+ □ Anti-fraud bypass via N similar virtual accounts (same device, diff email)
584
+ □ Mass-register replay-protection missing (no nonce on submit step)
585
+ ```
586
+
587
+ ### 11.3 Password Recovery / Reset
588
+ ```
589
+ □ Reset target tampering (uid / email / phone in submit step)
590
+ □ Reset token predictable (timestamp-derived, weak hash, short random)
591
+ □ Cross-user token reuse (A's reset_token, change B's password)
592
+ □ Old-password check missing on logged-in change-password endpoint
593
+ □ Skip code-verify step, hit final reset endpoint directly
594
+ □ Reset link / answer / token leaked in HTML or JS source
595
+ □ Reset token has no expiry / not invalidated after use
596
+ □ Reset code base64-only "obfuscated" in response
597
+ □ Inconsistent identity across multi-step flow (reset_token from step 2
598
+ reusable in step 4)
599
+ □ Old session not revoked after email/phone re-bind
600
+ ```
601
+
602
+ ### 11.4 Session / Token
603
+ ```
604
+ □ Session fixation: pre-login session id remains valid after login
605
+ □ Token not bound to user/IP/device (steal cookie → use anywhere)
606
+ □ Forged token: weak algorithm md5(username + timestamp), no server salt
607
+ □ Stale token still accepted after logout / expiry (no blacklist)
608
+ □ Cookie tampering (uid / role / is_admin in cookie trusted server-side)
609
+ □ State-machine replay (replay "claim red packet" → re-claim)
610
+ □ Anti-replay missing on one-time tokens (CSRF token, OTP, nonce)
611
+ □ Sensitive credentials (token, answer, key) hardcoded in front-end JS
612
+ □ Privileged session created from public Session ID without re-auth
613
+ □ Token works cross-environment (different IP, different UA, no validation)
614
+ ```
615
+
616
+ ### 11.5 Payment / Order
617
+ ```
618
+ □ Amount tampering: amount = 0.01 / 0 / negative / 0.001
619
+ □ Quantity tampering: quantity = -1 / 0.01 / 1.5 / 999999999
620
+ □ Integer overflow: quantity * price wraps to 0 or negative
621
+ □ Floating-point precision exploit (multi-decimal, accumulated rounding)
622
+ □ Currency code swap (CNY → JPY/RUB at same numeric value)
623
+ □ Coupon / discount field forge (coupon_id, discount=, free_shipping=true)
624
+ □ Item ID swap: replace product_id with cheaper SKU at checkout
625
+ □ Signature / sign-field bypass (drop sign param, use stale sign)
626
+ □ Payment-callback forgery (status=paid posted to internal callback)
627
+ □ Replay paid request → multiple shipments / multiple credit
628
+ □ Race / concurrency: oversell, double-spend gift card, double redeem coupon
629
+ □ Refund without losing the merchandise / virtual rights
630
+ □ VIP duration tampering (days=999, months=120, period=-1)
631
+ □ Receiver-account redirect (merchant_id / receiver_account swap on withdraw)
632
+ □ Negative shipping / fee fields decreasing total (shipping_fee = -500)
633
+ □ Concurrent topup-then-refund draining (refund > topup in race window)
634
+ □ Pricing rule transition window (price changes at T, replay at T-ε with old rule)
635
+ □ Currency rounding micro-arbitrage (charge 0.019 → wallet credit 0.02)
636
+ □ Multi-channel inconsistency (online vs cash-on-delivery vs balance pay)
637
+ ```
638
+
639
+ ### 11.6 IDOR / Authorization
640
+ ```
641
+ □ Horizontal IDOR: uid / order_id / resource_id swap to victim's
642
+ □ Vertical IDOR: role / type / level field set to admin in request
643
+ □ Hidden field tampering (data-user-id in HTML / JS state)
644
+ □ Email / phone re-bind without verifying old binding
645
+ □ UID vs session-token consistency missing (token belongs to A, uid sent as B)
646
+ □ Predictable / sequential resource IDs (gift IDs, share-link IDs)
647
+ □ Resource enumeration on order / coupon / share / trip-detail endpoint
648
+ □ Multi-entry inconsistency: web blocks, mobile API doesn't
649
+ □ State-machine illegal transition (claim reward without paying / shipping
650
+ before order paid)
651
+ □ Hidden / undocumented admin endpoint accessible without admin auth
652
+ □ Cross-role function call (user calls merchant API, rider API, etc.)
653
+ □ Privilege via concurrent action (request role-elevation race condition)
654
+ ```
655
+
656
+ ### 11.7 CAPTCHA / Verification Code
657
+ ```
658
+ □ Code returned in plaintext in HTTP response (body / header / JS var)
659
+ □ Receiver tampering: change phone / email param to attacker-controlled
660
+ □ Empty / fixed code accepted (000000, blank, "test")
661
+ □ Drop the code field entirely → request still succeeds
662
+ □ Cross-account reuse (A's valid code accepted on B's flow)
663
+ □ One-time enforcement missing (same code reusable until expiry)
664
+ □ Brute force 4-6 digit code (no attempt limit, no lockout)
665
+ □ SMS / email bombing (no rate limit per IP / per phone / no graphical CAPTCHA)
666
+ □ Front-end-only "send-success" status (server says fail, FE says success)
667
+ □ Code not bound to session (code generated for A, used in B's session)
668
+ ```
669
+
670
+ ### 11.8 File Upload
671
+ ```
672
+ □ Content-Type bypass (Content-Type: image/jpeg, body is PHP)
673
+ □ Extension trick: double ext (.php.jpg), case mix (.Php), null byte, ;path
674
+ □ Filename path traversal (filename=../../webshell.php)
675
+ □ File-content polyglot (image with embedded PHP / shell)
676
+ □ Office XML repack (unzip docx → inject XML → rezip → upload)
677
+ □ XXE via .xml / .dtd upload endpoint
678
+ □ Backend-only upload (admin login → upload → exec)
679
+ □ Upload race: upload + parallel access before AV scan / cleanup
680
+ □ ZIP bomb (1KB → 1GB on server, decompress DoS)
681
+ □ CSV formula injection (=SYSTEM("calc"), =cmd|'/c calc'!A1)
682
+ □ Storage path predictable / overwritable across users (/uploads/UID/file)
683
+ □ Image converter / parser CVE (ImageMagick, FFmpeg, pillow)
684
+ ```
685
+
686
+ ### 11.9 CSRF / SSRF / XXE
687
+ ```
688
+ □ XXE file read (<!ENTITY x SYSTEM "file:///etc/passwd">)
689
+ □ XXE blind via OOB (parameter entity → DNSLog / Burp Collaborator)
690
+ □ SSRF via image-import / webhook / preview URL (file://, http://127.0.0.1)
691
+ □ SSRF via FTP / gopher / jar / php-wrapper / dict protocols
692
+ □ XML parser dangerous wrappers enabled (php://expect, expect://)
693
+ □ Out-of-band detection for blind injection (DNSLog confirms server hit)
694
+ □ CSRF on state-changing endpoint (no token, no SameSite, no origin check)
695
+ □ Payment / withdrawal CSRF via auto-submitting hidden form
696
+ □ Login CSRF (force victim to log into attacker account)
697
+ □ JSONP / JSONP-callback exploitation as CSRF read primitive
698
+ ```
699
+
700
+ ### How to Use This Section
701
+
702
+ 1. Print or screenshot the relevant 1-2 sub-sections for the target's surface.
703
+ 2. For each `□` mark: NOT-APPLICABLE / NOT-VULN / VULN / NEEDS-RECHECK.
704
+ 3. Mark the EXACT endpoint + parameter + payload that proved the bug
705
+ (or proved it absent), so the report is reproducible.
706
+ 4. Cross-reference with `METHODOLOGY.md` Q1~Q7 decision tree when an item
707
+ triggers something unexpected — the tree tells you which neighboring
708
+ items are likely also vulnerable.
709
+ 5. For deep payloads / curl-ready commands / Burp screenshots per item,
710
+ load `CHECKLIST.md` (full triplets) and `SCENARIOS.md` (real cases).
711
+