swarmhack-cli 1.4.0 → 2.0.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 CHANGED
@@ -2,18 +2,22 @@
2
2
 
3
3
  Neural swarm-based penetration testing framework.
4
4
 
5
- ## What's New in v1.3.0
6
-
7
- - **17 Exploit Agents**: SQLi, XSS, CMDI, CSRF, IDOR, AuthBypass, SSRF, LFI, SSTI, OpenRedirect, CORS, JWT, XXE, FileUpload, Deserialization, HTTPSmuggling + WebCrawler
8
- - **Recursive Swarm (ADR-004)**: Generation-based re-scanning with 6 trigger types — automatically re-scans with discovered credentials
9
- - **Pre-flight Authentication**: 5 auth methods (FormBased, JWT, Cookie, JSON, Custom) via `--auth config.json`
10
- - **Self-Learning Intelligence (ADR-005)**: SONA-backed payload learning, adaptive WAF evasion, rate limiting optimization
11
- - **Semantic Deduplication**: Two-level dedup (canonical key + HNSW vector similarity) catches near-duplicate findings
12
- - **Crown Jewel ML Matching**: Learns new crown jewel patterns beyond the 18 built-in regexes
13
- - **Real HNSW Index**: Replaced HashMap stub with actual approximate nearest neighbor search
14
- - **Checkpoint-on-Detection**: All 17 agents preserve findings before deep exploitation no data loss on timeout
15
- - **UTF-8 Safety**: Fixed byte-slicing panics across 20 files (28 sites)
16
- - **OCSF 1.1.0 Reports**: Industry-standard vulnerability reports with generation lineage tracking
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.
17
21
 
18
22
  ## Installation
19
23
 
@@ -157,12 +161,67 @@ If npm installation fails, use Docker:
157
161
  docker run --rm \
158
162
  -v /var/run/docker.sock:/var/run/docker.sock \
159
163
  -v $(pwd)/reports:/app/reports \
160
- prancer/swarmhack:0.1.0 \
164
+ prancer/swarmhack:2.0.0 \
161
165
  spawn --agents sqli --target "http://example.com" \
162
166
  --customer "your-customer" --token "your-token"
163
167
  ```
164
168
 
165
- ## Available Agents (17)
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)
166
225
 
167
226
  | Agent | CWE | Description |
168
227
  |-------|-----|-------------|
@@ -183,6 +242,14 @@ docker run --rm \
183
242
  | `file_upload` | CWE-434 | File upload vulnerabilities |
184
243
  | `deserialization` | CWE-502 | Insecure deserialization |
185
244
  | `http_smuggling` | CWE-444 | HTTP request smuggling (CL.TE/TE.CL) |
245
+ | `session_fixation` | CWE-384 | Session fixation and invalidation testing |
246
+ | `dangerous_methods` | CWE-16 | Dangerous HTTP methods (TRACE/XST, PUT upload) |
247
+ | `default_credentials` | CWE-798 | Default credential scanning (20 pairs) |
248
+ | `privilege_escalation` | CWE-862 | Function-level access control testing |
249
+ | `mass_assignment` | CWE-915 | Mass assignment / parameter injection |
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 |
186
253
 
187
254
  ## OCSF Reports
188
255
 
@@ -224,6 +291,37 @@ Get your token from [Prancer Portal](https://portal.prancer.io) → Settings →
224
291
 
225
292
  ## Changelog
226
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
+
309
+ ### v1.5.0
310
+ - ADR-006: OWASP Top 10 full coverage -- 6 new agents (SessionFixation, DangerousMethods, DefaultCredentials, PrivilegeEscalation, MassAssignment, VulnerableComponents)
311
+ - Intelligence Bus: 7 typed intel categories shared across all 23 agents
312
+ - Runtime vulnerability chaining: credentials/sessions feed consumer agents live
313
+ - VulnerableComponents agent (OWASP A06): 30 built-in CVE entries
314
+ - CVSS score fix (was always 0.0), GOAP precondition key unification
315
+ - SwarmHackConfig wrapped in Arc (performance), agent pool 20->25
316
+ - Live validated: 16 findings, 67 crown jewels, 0 false positives across 3 targets
317
+
318
+ ### v1.4.0
319
+ - Hybrid execution mode (Kill Chain + AEL amplification)
320
+ - SPA false positive elimination
321
+ - Auth crawling and OCSF auth tracking
322
+ - Common endpoint discovery (107 paths)
323
+ - Version bump and CI adjustments
324
+
227
325
  ### v1.3.0
228
326
  - ADR-005: Self-learning intelligence layer (SONA, WAF evasion learning, adaptive rate limiting)
229
327
  - ADR-005: Semantic deduplication + crown jewel ML matching
@@ -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
@@ -205,6 +209,42 @@ agents:
205
209
  enabled: true
206
210
  max_candidates: 5
207
211
  pentest_mode: true
212
+ session_fixation:
213
+ enabled: true
214
+ max_candidates: 3
215
+ pentest_mode: true
216
+ dangerous_methods:
217
+ enabled: true
218
+ max_candidates: 5
219
+ pentest_mode: true
220
+ default_credentials:
221
+ enabled: true
222
+ max_candidates: 3
223
+ pentest_mode: true
224
+ privilege_escalation:
225
+ enabled: true
226
+ max_candidates: 5
227
+ pentest_mode: true
228
+ mass_assignment:
229
+ enabled: true
230
+ max_candidates: 5
231
+ pentest_mode: true
232
+ vulnerable_components:
233
+ enabled: true
234
+ max_candidates: 5
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
208
248
 
209
249
  memory:
210
250
  agentdb:
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swarmhack-cli",
3
- "version": "1.4.0",
3
+ "version": "2.0.0",
4
4
  "description": "SwarmHack - Neural swarm-based penetration testing framework",
5
5
  "author": "Prancer <support@prancer.io>",
6
6
  "license": "MIT",