swarmhack-cli 1.5.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +92 -14
- package/config/swarmhack.yaml +16 -0
- package/native/linux-x64/swarmhack +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,16 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
Neural swarm-based penetration testing framework.
|
|
4
4
|
|
|
5
|
-
## What's New in
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- **
|
|
10
|
-
- **
|
|
11
|
-
- **
|
|
12
|
-
- **
|
|
13
|
-
- **
|
|
14
|
-
- **
|
|
5
|
+
## What's New in v2.0.0
|
|
6
|
+
|
|
7
|
+
**v2.0.0 -- Major Release**
|
|
8
|
+
|
|
9
|
+
- **Confidence Calibration System** -- Evidence-based confidence scoring (0.60-1.0) replacing fixed 1.0. Each finding's confidence reflects actual proof quality: heuristic detection (0.60), response pattern match (0.90), marker-based confirmation (0.99), synthesized from confirmed data (1.0).
|
|
10
|
+
- **Full Kill Chain Automation** -- Single command executes: external web scan -> credential extraction -> SSH lateral movement -> privilege escalation -> SSH tunnel -> internal target scanning. Zero human intervention.
|
|
11
|
+
- **Credential Correlation** -- 12 regex patterns extract credentials from HTML response bodies (SSH creds in admin pages, connection strings, API keys, Bearer tokens). Extracted creds automatically propagated via Intelligence Bus to SSH/auth agents.
|
|
12
|
+
- **Privilege Escalation Chain Synthesis (ADR-009)** -- Post-processing creates standalone "www-data -> root" findings from CMDI post-exploitation data (sudo NOPASSWD, SUID binaries, Docker socket).
|
|
13
|
+
- **.env File Deep Extraction** -- CMDI agent reads .env files via command injection, parses SSH/DB/API credentials with category classification (ssh_credential, database_credential, api_key, network_topology).
|
|
14
|
+
- **Internal Tunnel Scanning (ADR-010)** -- After SSH pivot discovers dual-homed hosts, automatically opens SSH tunnel via portable-pty and spawns new kill chain against internal targets.
|
|
15
|
+
- **SSRF CVE Correlation** -- 10-CVE payload map (CVE-2021-44224, ProxyLogon, Log4Shell, etc.). SSRF agent reads vulnerable_components findings and generates CVE-specific exploitation payloads.
|
|
16
|
+
- **SQLi Time-Based Confirmation** -- 3-step verification: retry payload, send SLEEP(0) control, confirm only if retry delayed AND control fast. Eliminates jitter false positives.
|
|
17
|
+
- **XXE Confidence Grading** -- Tiered confidence: heuristic-only (0.60), marker match (0.90), with deep exploitation output (1.0). OOB callback infrastructure ready (callback_url config).
|
|
18
|
+
- **SONA Self-Learning (Phase 1)** -- Optional `--features self-learning` wires ruvector-sona for payload trajectory recording and adaptive recommendations.
|
|
19
|
+
- **32 Exploit Agents** -- Added session_fixation, dangerous_methods, pivot, plus enhanced all ADR-003 agents with memory deduplication and Intelligence Bus integration.
|
|
20
|
+
- **Smart Pivot Optimization** -- Port-scanned reachable hosts tried first, failed hosts skipped after timeout, SSH ConnectTimeout reduced to 3s for fast iteration.
|
|
15
21
|
|
|
16
22
|
## Installation
|
|
17
23
|
|
|
@@ -155,12 +161,67 @@ If npm installation fails, use Docker:
|
|
|
155
161
|
docker run --rm \
|
|
156
162
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
|
157
163
|
-v $(pwd)/reports:/app/reports \
|
|
158
|
-
prancer/swarmhack:0.
|
|
164
|
+
prancer/swarmhack:2.0.0 \
|
|
159
165
|
spawn --agents sqli --target "http://example.com" \
|
|
160
166
|
--customer "your-customer" --token "your-token"
|
|
161
167
|
```
|
|
162
168
|
|
|
163
|
-
##
|
|
169
|
+
## Authenticated Scanning
|
|
170
|
+
|
|
171
|
+
SwarmHack supports authenticated scanning using custom HTTP headers. This enables testing of post-authentication attack surfaces that are invisible to unauthenticated scans.
|
|
172
|
+
|
|
173
|
+
### Using Session Cookies
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
swarmhack spawn \
|
|
177
|
+
--target "https://your-app.com" \
|
|
178
|
+
--header "Cookie: session=abc123def456" \
|
|
179
|
+
--token "$PRANCER_TOKEN" \
|
|
180
|
+
--customer "$PRANCER_CUSTOMER"
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Using Bearer Tokens
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
swarmhack spawn \
|
|
187
|
+
--target "https://api.your-app.com" \
|
|
188
|
+
--header "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
|
|
189
|
+
--token "$PRANCER_TOKEN" \
|
|
190
|
+
--customer "$PRANCER_CUSTOMER"
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Using Multiple Headers
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
swarmhack spawn \
|
|
197
|
+
--target "https://your-app.com" \
|
|
198
|
+
--header "Cookie: session=abc123" \
|
|
199
|
+
--header "X-API-Key: your-api-key-here" \
|
|
200
|
+
--header "X-Tenant-ID: customer-123" \
|
|
201
|
+
--token "$PRANCER_TOKEN" \
|
|
202
|
+
--customer "$PRANCER_CUSTOMER"
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Using Basic Auth
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
swarmhack spawn \
|
|
209
|
+
--target "https://your-app.com" \
|
|
210
|
+
--header "Authorization: Basic YWRtaW46cGFzc3dvcmQ=" \
|
|
211
|
+
--token "$PRANCER_TOKEN" \
|
|
212
|
+
--customer "$PRANCER_CUSTOMER"
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Tips for Authenticated Scanning
|
|
216
|
+
|
|
217
|
+
- **Get a fresh session token** before scanning -- expired sessions produce false negatives
|
|
218
|
+
- **Use a test account** with appropriate permissions -- avoid scanning with admin credentials unless testing privilege escalation
|
|
219
|
+
- **Set appropriate timeout** -- authenticated scans discover more endpoints, so allow more time: `--timeout 1200`
|
|
220
|
+
- **Monitor session validity** -- some apps invalidate sessions after unusual activity patterns
|
|
221
|
+
- The `--header` flag is repeatable -- add as many custom headers as needed
|
|
222
|
+
- All agents (SQLi, XSS, CSRF, etc.) automatically include your custom headers in every request
|
|
223
|
+
|
|
224
|
+
## Available Agents (32)
|
|
164
225
|
|
|
165
226
|
| Agent | CWE | Description |
|
|
166
227
|
|-------|-----|-------------|
|
|
@@ -187,6 +248,8 @@ docker run --rm \
|
|
|
187
248
|
| `privilege_escalation` | CWE-862 | Function-level access control testing |
|
|
188
249
|
| `mass_assignment` | CWE-915 | Mass assignment / parameter injection |
|
|
189
250
|
| `vulnerable_components` | CWE-1035 | Version fingerprinting + CVE lookup (30 CVEs) |
|
|
251
|
+
| `pivot` | — | SSH lateral movement, tunnel scanning, credential reuse |
|
|
252
|
+
| `idor` (enhanced) | CWE-639 | Object reference enumeration with credential correlation |
|
|
190
253
|
|
|
191
254
|
## OCSF Reports
|
|
192
255
|
|
|
@@ -228,13 +291,28 @@ Get your token from [Prancer Portal](https://portal.prancer.io) → Settings →
|
|
|
228
291
|
|
|
229
292
|
## Changelog
|
|
230
293
|
|
|
294
|
+
### v2.0.0
|
|
295
|
+
- Confidence calibration system: evidence-based scoring (0.60-1.0) replacing fixed 1.0
|
|
296
|
+
- Full kill chain automation: web scan -> credential extraction -> SSH pivot -> privilege escalation -> internal scanning
|
|
297
|
+
- Credential correlation: 12 regex patterns, auto-propagation via Intelligence Bus
|
|
298
|
+
- Privilege escalation chain synthesis (ADR-009): standalone www-data -> root findings
|
|
299
|
+
- .env file deep extraction: SSH/DB/API credential parsing from command injection
|
|
300
|
+
- Internal tunnel scanning (ADR-010): SSH tunnel via portable-pty for internal targets
|
|
301
|
+
- SSRF CVE correlation: 10-CVE payload map (ProxyLogon, Log4Shell, etc.)
|
|
302
|
+
- SQLi time-based confirmation: 3-step verification eliminates jitter false positives
|
|
303
|
+
- XXE confidence grading: tiered 0.60/0.90/1.0 with OOB callback ready
|
|
304
|
+
- SONA self-learning (Phase 1): ruvector-sona payload trajectory recording
|
|
305
|
+
- 32 exploit agents (was 23): added pivot, enhanced all ADR-003 agents
|
|
306
|
+
- Smart pivot optimization: port-scan prioritization, 3s SSH ConnectTimeout
|
|
307
|
+
- Authenticated scanning: `--header` flag for session cookies, Bearer tokens, API keys
|
|
308
|
+
|
|
231
309
|
### v1.5.0
|
|
232
|
-
- ADR-006: OWASP Top 10 full coverage
|
|
310
|
+
- ADR-006: OWASP Top 10 full coverage -- 6 new agents (SessionFixation, DangerousMethods, DefaultCredentials, PrivilegeEscalation, MassAssignment, VulnerableComponents)
|
|
233
311
|
- Intelligence Bus: 7 typed intel categories shared across all 23 agents
|
|
234
312
|
- Runtime vulnerability chaining: credentials/sessions feed consumer agents live
|
|
235
313
|
- VulnerableComponents agent (OWASP A06): 30 built-in CVE entries
|
|
236
314
|
- CVSS score fix (was always 0.0), GOAP precondition key unification
|
|
237
|
-
- SwarmHackConfig wrapped in Arc (performance), agent pool 20
|
|
315
|
+
- SwarmHackConfig wrapped in Arc (performance), agent pool 20->25
|
|
238
316
|
- Live validated: 16 findings, 67 crown jewels, 0 false positives across 3 targets
|
|
239
317
|
|
|
240
318
|
### v1.4.0
|
package/config/swarmhack.yaml
CHANGED
|
@@ -193,6 +193,10 @@ agents:
|
|
|
193
193
|
enabled: true
|
|
194
194
|
max_candidates: 5
|
|
195
195
|
pentest_mode: true
|
|
196
|
+
# ADR-010 Gap 2: OOB callback URL for XXE confirmation.
|
|
197
|
+
# Empty = OOB disabled, heuristic-only confidence capped at 0.70.
|
|
198
|
+
# Example: "https://your-interactsh-server.com"
|
|
199
|
+
callback_url: ""
|
|
196
200
|
file_upload:
|
|
197
201
|
enabled: true
|
|
198
202
|
max_candidates: 5
|
|
@@ -229,6 +233,18 @@ agents:
|
|
|
229
233
|
enabled: true
|
|
230
234
|
max_candidates: 5
|
|
231
235
|
pentest_mode: true
|
|
236
|
+
pivot:
|
|
237
|
+
enabled: true
|
|
238
|
+
max_candidates: 5
|
|
239
|
+
pentest_mode: true
|
|
240
|
+
|
|
241
|
+
# ADR-010 Gap 5: Internal target scanning via SSH tunnel
|
|
242
|
+
# After SSH pivot discovers internal hosts, automatically tunnel and scan them
|
|
243
|
+
pivot_scan:
|
|
244
|
+
max_pivot_depth: 2 # Maximum tunnel hops (prevents infinite recursion)
|
|
245
|
+
auto_internal_scan: true # Automatically scan internal targets after pivot
|
|
246
|
+
internal_scan_timeout_secs: 300 # Timeout for the entire internal scan
|
|
247
|
+
tunnel_base_port: 8881 # Base port for SSH tunnel local binding
|
|
232
248
|
|
|
233
249
|
memory:
|
|
234
250
|
agentdb:
|
|
Binary file
|