blitzstrike 1.0.46 → 1.0.47
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/CHANGELOG.md +16 -0
- package/dist/index.js +123 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,22 @@ All notable changes to Blitz Strike are documented here.
|
|
|
5
5
|
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
7
7
|
|
|
8
|
+
## [1.0.47] — 2026-09-13
|
|
9
|
+
|
|
10
|
+
### Added — Autonomous Security Engine (phase 7: adaptive planner)
|
|
11
|
+
|
|
12
|
+
- **Adaptive Attack Planner** (`src/mission/planner.ts`, §11):
|
|
13
|
+
- `ATTACK_BRANCHES` — data-driven technique library across SSRF / LFI / SQLi /
|
|
14
|
+
RCE / XSS / IDOR / XXE / traversal (each with rationale, expected value,
|
|
15
|
+
risk, evidence requirements, and tool).
|
|
16
|
+
- `planNextActions()` — generates ranked next actions from unresolved
|
|
17
|
+
hypotheses (confidence × expected-value − risk), evidence-driven branching.
|
|
18
|
+
- `classifyType()` — maps hypothesis type strings to a technique class.
|
|
19
|
+
- **Escalation Graph** (`buildEscalationGraph`, §12) — integrates the 57
|
|
20
|
+
escalation chains into the Security Graph (`vuln` → `enables` → `attack_chain`),
|
|
21
|
+
seeded into every mission's world model.
|
|
22
|
+
- `@commander` now emits ranked `next_actions` from the adaptive planner.
|
|
23
|
+
|
|
8
24
|
## [1.0.46] — 2026-09-13
|
|
9
25
|
|
|
10
26
|
### Fixed (autonomous-engine milestone review)
|
package/dist/index.js
CHANGED
|
@@ -18139,6 +18139,124 @@ function mergeGraphs(a, b) {
|
|
|
18139
18139
|
return out;
|
|
18140
18140
|
}
|
|
18141
18141
|
|
|
18142
|
+
// src/mission/planner.ts
|
|
18143
|
+
function classifyType(type) {
|
|
18144
|
+
const t = type.toLowerCase();
|
|
18145
|
+
if (/ssrf|server-side request|url fetch/.test(t))
|
|
18146
|
+
return "ssrf";
|
|
18147
|
+
if (/lfi|include|local file/.test(t))
|
|
18148
|
+
return "lfi";
|
|
18149
|
+
if (/sql|query injection/.test(t))
|
|
18150
|
+
return "sqli";
|
|
18151
|
+
if (/command|exec|rce|deserializ|template|ssti/.test(t))
|
|
18152
|
+
return "rce";
|
|
18153
|
+
if (/xss|cross-site|reflected|stored|dom/.test(t))
|
|
18154
|
+
return "xss";
|
|
18155
|
+
if (/idor|authorization|object access|missing_authorization/.test(t))
|
|
18156
|
+
return "idor";
|
|
18157
|
+
if (/xxe|xml/.test(t))
|
|
18158
|
+
return "xxe";
|
|
18159
|
+
if (/traversal|path|directory/.test(t))
|
|
18160
|
+
return "traversal";
|
|
18161
|
+
return "xss";
|
|
18162
|
+
}
|
|
18163
|
+
function planNextActions(hypotheses, _mission) {
|
|
18164
|
+
const actions = [];
|
|
18165
|
+
for (const h of hypotheses) {
|
|
18166
|
+
if (h.status !== "pending")
|
|
18167
|
+
continue;
|
|
18168
|
+
const cls = classifyType(h.type);
|
|
18169
|
+
const branches = ATTACK_BRANCHES[cls] ?? [];
|
|
18170
|
+
for (const b of branches) {
|
|
18171
|
+
const score = h.confidence * 0.5 + VALUE_RANK[b.expected_value] * 0.3 - RISK_PENALTY[b.risk];
|
|
18172
|
+
actions.push({
|
|
18173
|
+
hypothesis_id: h.id,
|
|
18174
|
+
hypothesis_type: h.type,
|
|
18175
|
+
technique: b.technique,
|
|
18176
|
+
rationale: b.rationale,
|
|
18177
|
+
expected_value: b.expected_value,
|
|
18178
|
+
risk: b.risk,
|
|
18179
|
+
evidence_required: b.evidence_required,
|
|
18180
|
+
tool: b.tool,
|
|
18181
|
+
score: Number(score.toFixed(3))
|
|
18182
|
+
});
|
|
18183
|
+
}
|
|
18184
|
+
}
|
|
18185
|
+
return actions.sort((a, b) => b.score - a.score);
|
|
18186
|
+
}
|
|
18187
|
+
function buildEscalationGraph(chains, graph) {
|
|
18188
|
+
let out = graph;
|
|
18189
|
+
for (const chain of chains) {
|
|
18190
|
+
const chainId = `chain:${chain.id}`;
|
|
18191
|
+
out = upsertNode(out, chainId, "attack_chain", {
|
|
18192
|
+
name: chain.name,
|
|
18193
|
+
severity: chain.severity,
|
|
18194
|
+
prerequisites: chain.required_findings ?? [],
|
|
18195
|
+
steps: chain.steps.length,
|
|
18196
|
+
tools: chain.tools ?? []
|
|
18197
|
+
});
|
|
18198
|
+
for (const rf of chain.required_findings ?? []) {
|
|
18199
|
+
const prereqId = `vuln:${rf}`;
|
|
18200
|
+
out = upsertNode(out, prereqId, "vulnerability", { class: rf });
|
|
18201
|
+
out = addEdge2(out, prereqId, chainId, "enables");
|
|
18202
|
+
}
|
|
18203
|
+
}
|
|
18204
|
+
return out;
|
|
18205
|
+
}
|
|
18206
|
+
function loadEscalationGraph(graph) {
|
|
18207
|
+
return buildEscalationGraph(loadChains(), graph);
|
|
18208
|
+
}
|
|
18209
|
+
var ATTACK_BRANCHES, VALUE_RANK, RISK_PENALTY;
|
|
18210
|
+
var init_planner = __esm(() => {
|
|
18211
|
+
init_orchestrator();
|
|
18212
|
+
ATTACK_BRANCHES = {
|
|
18213
|
+
ssrf: [
|
|
18214
|
+
{ technique: "probe localhost (127.0.0.1 / ::1)", rationale: "confirm server-side fetch of loopback", expected_value: "high", risk: "low", evidence_required: ["server-side fetch"], tool: "strike_verify" },
|
|
18215
|
+
{ technique: "probe internal services (10.0.0.0/8, 172.16/12, 192.168/16)", rationale: "map internal reachability", expected_value: "medium", risk: "low", evidence_required: ["server-side fetch"], tool: "strike_verify" },
|
|
18216
|
+
{ technique: "probe cloud metadata (169.254.169.254)", rationale: "exfiltrate IAM creds on cloud hosts", expected_value: "high", risk: "medium", evidence_required: ["cloud-hosted target"], tool: "strike_verify" },
|
|
18217
|
+
{ technique: "test redirect behavior (open redirect → SSRF)", rationale: "bypass URL allowlist via redirect", expected_value: "medium", risk: "low", evidence_required: ["redirect endpoint"], tool: "strike_verify" },
|
|
18218
|
+
{ technique: "test alternate protocol (gopher:// file:// dict://)", rationale: "escalate SSRF to file read / RCE", expected_value: "high", risk: "high", evidence_required: ["raw socket support"], tool: "strike_verify" }
|
|
18219
|
+
],
|
|
18220
|
+
lfi: [
|
|
18221
|
+
{ technique: "read /etc/passwd", rationale: "confirm file read primitive", expected_value: "high", risk: "low", evidence_required: ["file include sink"], tool: "strike_verify" },
|
|
18222
|
+
{ technique: "read application logs", rationale: "harvest secrets/session data", expected_value: "medium", risk: "low", evidence_required: ["file include sink"], tool: "strike_verify" },
|
|
18223
|
+
{ technique: "read session files", rationale: "session hijack", expected_value: "high", risk: "medium", evidence_required: ["session path known"], tool: "strike_verify" },
|
|
18224
|
+
{ technique: "read upload locations", rationale: "chain to RCE via uploaded file", expected_value: "high", risk: "medium", evidence_required: ["upload path"], tool: "strike_verify" },
|
|
18225
|
+
{ technique: "test log poisoning / wrapper execution", rationale: "escalate LFI to RCE", expected_value: "high", risk: "high", evidence_required: ["writable log"], tool: "strike_verify" }
|
|
18226
|
+
],
|
|
18227
|
+
sqli: [
|
|
18228
|
+
{ technique: "error-based extraction", rationale: "confirm SQLi via error leakage", expected_value: "high", risk: "low", evidence_required: ["query sink"], tool: "strike_verify" },
|
|
18229
|
+
{ technique: "UNION-based extraction", rationale: "dump columns/tables", expected_value: "high", risk: "medium", evidence_required: ["query sink"], tool: "strike_verify" },
|
|
18230
|
+
{ technique: "blind boolean extraction", rationale: "infer data without errors", expected_value: "medium", risk: "medium", evidence_required: ["query sink"], tool: "strike_verify" },
|
|
18231
|
+
{ technique: "time-based blind extraction", rationale: "infer data via timing", expected_value: "medium", risk: "medium", evidence_required: ["query sink"], tool: "strike_verify" }
|
|
18232
|
+
],
|
|
18233
|
+
rce: [
|
|
18234
|
+
{ technique: "command injection (separators)", rationale: "chain to OS command execution", expected_value: "high", risk: "high", evidence_required: ["command sink"], tool: "strike_verify" },
|
|
18235
|
+
{ technique: "deserialization gadget chain", rationale: "POP chain to code execution", expected_value: "high", risk: "high", evidence_required: ["unserialize sink"], tool: "strike_verify" },
|
|
18236
|
+
{ technique: "template injection", rationale: "SSTI to code execution", expected_value: "high", risk: "high", evidence_required: ["template render sink"], tool: "strike_verify" }
|
|
18237
|
+
],
|
|
18238
|
+
xss: [
|
|
18239
|
+
{ technique: "reflected XSS (marker reflection)", rationale: "confirm reflected script execution", expected_value: "high", risk: "low", evidence_required: ["reflection"], tool: "strike_verify" },
|
|
18240
|
+
{ technique: "stored XSS (persistence)", rationale: "confirm stored script execution", expected_value: "high", risk: "medium", evidence_required: ["persistence"], tool: "browser_validate" },
|
|
18241
|
+
{ technique: "DOM XSS (sink execution)", rationale: "confirm client-side sink", expected_value: "high", risk: "low", evidence_required: ["DOM sink"], tool: "browser_validate" }
|
|
18242
|
+
],
|
|
18243
|
+
idor: [
|
|
18244
|
+
{ technique: "enumerate sequential object ids", rationale: "find adjacent objects", expected_value: "high", risk: "low", evidence_required: ["object id"], tool: "strike_verify" },
|
|
18245
|
+
{ technique: "cross-tenant object access", rationale: "break authorization boundary", expected_value: "high", risk: "medium", evidence_required: ["multi-tenant"], tool: "strike_verify" }
|
|
18246
|
+
],
|
|
18247
|
+
xxe: [
|
|
18248
|
+
{ technique: "internal entity (file read)", rationale: "read local files via XXE", expected_value: "high", risk: "medium", evidence_required: ["XML parse sink"], tool: "strike_verify" },
|
|
18249
|
+
{ technique: "external entity (SSRF via XXE)", rationale: "chain XXE to SSRF", expected_value: "medium", risk: "medium", evidence_required: ["XML parse sink"], tool: "strike_verify" }
|
|
18250
|
+
],
|
|
18251
|
+
traversal: [
|
|
18252
|
+
{ technique: "dot-dot-slash traversal", rationale: "escape web root", expected_value: "high", risk: "low", evidence_required: ["file path sink"], tool: "strike_verify" },
|
|
18253
|
+
{ technique: "encoded traversal (%2e%2e%2f)", rationale: "bypass naive filters", expected_value: "medium", risk: "low", evidence_required: ["file path sink"], tool: "strike_verify" }
|
|
18254
|
+
]
|
|
18255
|
+
};
|
|
18256
|
+
VALUE_RANK = { low: 0.3, medium: 0.6, high: 1 };
|
|
18257
|
+
RISK_PENALTY = { low: 0, medium: 0.1, high: 0.2 };
|
|
18258
|
+
});
|
|
18259
|
+
|
|
18142
18260
|
// src/agents.ts
|
|
18143
18261
|
import { readFileSync as readFileSync18 } from "node:fs";
|
|
18144
18262
|
function emptyGraph() {
|
|
@@ -18156,6 +18274,7 @@ function agentFor(type) {
|
|
|
18156
18274
|
}
|
|
18157
18275
|
var reconAgent, webAgent, sourceAgent, analysisAgent, authAgent, validatorAgent, reviewerAgent, reporterAgent, mobileAgent, cloudAgent, commanderAgent, apiAgent, AGENTS;
|
|
18158
18276
|
var init_agents = __esm(() => {
|
|
18277
|
+
init_planner();
|
|
18159
18278
|
init_orchestrator();
|
|
18160
18279
|
init_scanner();
|
|
18161
18280
|
init_eagle2();
|
|
@@ -18433,7 +18552,8 @@ ${m.hypotheses.map((h) => `- [${h.status}] ${h.type} @ ${h.target} (confidence $
|
|
|
18433
18552
|
const prioritized = [...hypotheses].sort((a, b) => b.confidence - a.confidence).slice(0, 10).map((h) => h.id);
|
|
18434
18553
|
const sinks = nodesOfType(ctx.mission.graph, "sink").length;
|
|
18435
18554
|
const exposed = outgoing(ctx.mission.graph, `target:${ctx.mission.target}`).length;
|
|
18436
|
-
|
|
18555
|
+
const nextActions = planNextActions(ctx.mission.hypotheses, ctx.mission).slice(0, 10).map((a) => ({ technique: a.technique, type: a.hypothesis_type, tool: a.tool, score: a.score }));
|
|
18556
|
+
return { ok: true, output: { prioritized, pending: hypotheses.length, sinks, exposed_edges: exposed, next_actions: nextActions }, hypotheses: [], graph: emptyGraph() };
|
|
18437
18557
|
}
|
|
18438
18558
|
};
|
|
18439
18559
|
apiAgent = {
|
|
@@ -18535,6 +18655,7 @@ async function runMission(mission) {
|
|
|
18535
18655
|
}
|
|
18536
18656
|
let m = { ...mission, status: "running" };
|
|
18537
18657
|
m.tasks = buildInitialTasks(m);
|
|
18658
|
+
m.graph = loadEscalationGraph(m.graph);
|
|
18538
18659
|
m = saveMission(m);
|
|
18539
18660
|
const scope = m.scope.join(",");
|
|
18540
18661
|
let iterations = 0;
|
|
@@ -18616,6 +18737,7 @@ var MODE_PROFILES;
|
|
|
18616
18737
|
var init_control = __esm(() => {
|
|
18617
18738
|
init_state();
|
|
18618
18739
|
init_agents();
|
|
18740
|
+
init_planner();
|
|
18619
18741
|
MODE_PROFILES = {
|
|
18620
18742
|
web: { agents: ["recon", "web", "api", "auth", "validator", "reviewer", "reporter"], verify: true, risk: "medium" },
|
|
18621
18743
|
api: { agents: ["recon", "api", "auth", "validator", "reviewer", "reporter"], verify: true, risk: "medium" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blitzstrike",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.47",
|
|
4
4
|
"description": "Blitz Strike — a universal MCP security-audit toolbelt. BLITZ sweeps the attack surface, EAGLE-EYE traces source-to-sink, STRIKE verifies live. 57 attack chains, 130-tool catalog, intelligence data layer. One server, every agent.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|