blitzstrike 2.4.120 → 2.4.122
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 +28 -0
- package/dist/index.js +260 -127
- package/intelligence/specialist-discovery.json +20 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,34 @@ 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
|
+
## [2.4.122] — 2026-09-29
|
|
9
|
+
|
|
10
|
+
### Added — `param_surface` (autonomous parameter discovery + specialist hints)
|
|
11
|
+
|
|
12
|
+
- New `param_surface(target, class?)`: fetch a target and extract EVERY testable
|
|
13
|
+
parameter — URL query params, HTML form fields, path-segment identifiers
|
|
14
|
+
(/users/123 + UUIDs), and JS-referenced endpoints — then attach per-class
|
|
15
|
+
discovery + test hints so the agent tests the DISCOVERED params, not just the
|
|
16
|
+
hinted one. New `intelligence/specialist-discovery.json` maps 15 vuln classes
|
|
17
|
+
(xss/sqli/ssrf/idor/lfi/rce/xxe/jwt/open_redirect/prototype_pollution/csti/
|
|
18
|
+
mass_assignment/header_injection/api_security/file_upload) to where to look +
|
|
19
|
+
which tool to drive. (154 MCP tools.)
|
|
20
|
+
|
|
21
|
+
## [2.4.121] — 2026-09-29
|
|
22
|
+
|
|
23
|
+
### Added — empirical ledger auto-feed + benchmark coverage 30/30
|
|
24
|
+
|
|
25
|
+
- The live probers now auto-record their VERIFIED verdicts into the empirical
|
|
26
|
+
ledger (`intelligence()`): `cve_verify`/`nuclei_scan` (vector "cve"),
|
|
27
|
+
`jwt_forge` (jwt_alg_confusion), `proto_pollution_probe`
|
|
28
|
+
(prototype_pollution), `smuggling_test` (http_request_smuggling) — so a
|
|
29
|
+
confirmed hit feeds attack_plan's Bayesian hit-rates cross-target.
|
|
30
|
+
- Updated the Hackbot-Arena VECTOR_MAP with the new detectors + live probers
|
|
31
|
+
(cache_deception, client_trusted_flag, jwt_alg_confusion, prototype_pollution,
|
|
32
|
+
request-smuggling, password-reset) → detector coverage 26/30 → 30/30 (the 4
|
|
33
|
+
previously-unmapped labs — CacheKey, PasswordResetHarm, StaffDirectory,
|
|
34
|
+
NoteLock — are now covered).
|
|
35
|
+
|
|
8
36
|
## [2.4.120] — 2026-09-29
|
|
9
37
|
|
|
10
38
|
### Added — `nuclei_scan` (fingerprint-driven full DAST) + corpus precision fix
|
package/dist/index.js
CHANGED
|
@@ -17452,10 +17452,10 @@ var init_variants = __esm(() => {
|
|
|
17452
17452
|
});
|
|
17453
17453
|
|
|
17454
17454
|
// src/sync.ts
|
|
17455
|
-
import { mkdirSync as mkdirSync10, writeFileSync as writeFileSync9, readFileSync as
|
|
17456
|
-
import { join as
|
|
17455
|
+
import { mkdirSync as mkdirSync10, writeFileSync as writeFileSync9, readFileSync as readFileSync31, readdirSync as readdirSync9, statSync as statSync6, rmSync as rmSync5 } from "node:fs";
|
|
17456
|
+
import { join as join30 } from "node:path";
|
|
17457
17457
|
import { homedir as homedir11 } from "node:os";
|
|
17458
|
-
import { fileURLToPath as
|
|
17458
|
+
import { fileURLToPath as fileURLToPath18 } from "node:url";
|
|
17459
17459
|
import { spawnSync as spawnSync4 } from "node:child_process";
|
|
17460
17460
|
function dirExists(p) {
|
|
17461
17461
|
try {
|
|
@@ -17470,7 +17470,7 @@ function countFiles(dir) {
|
|
|
17470
17470
|
const walk = (d) => {
|
|
17471
17471
|
for (const e of readdirSync9(d, { withFileTypes: true })) {
|
|
17472
17472
|
if (e.isDirectory())
|
|
17473
|
-
walk(
|
|
17473
|
+
walk(join30(d, e.name));
|
|
17474
17474
|
else
|
|
17475
17475
|
n++;
|
|
17476
17476
|
}
|
|
@@ -17484,8 +17484,8 @@ function countFiles(dir) {
|
|
|
17484
17484
|
function syncData() {
|
|
17485
17485
|
if (!dirExists(DATA_ROOT2))
|
|
17486
17486
|
mkdirSync10(DATA_ROOT2, { recursive: true });
|
|
17487
|
-
const payloadsPath =
|
|
17488
|
-
const templatesPath =
|
|
17487
|
+
const payloadsPath = join30(DATA_ROOT2, "payloads");
|
|
17488
|
+
const templatesPath = join30(DATA_ROOT2, "templates");
|
|
17489
17489
|
const hasPayloads = dirExists(payloadsPath) && countFiles(payloadsPath) > 0;
|
|
17490
17490
|
const hasTemplates = dirExists(templatesPath) && countFiles(templatesPath) > 0;
|
|
17491
17491
|
if (hasPayloads && hasTemplates) {
|
|
@@ -17495,8 +17495,8 @@ function syncData() {
|
|
|
17495
17495
|
data_root: DATA_ROOT2
|
|
17496
17496
|
};
|
|
17497
17497
|
}
|
|
17498
|
-
const localPayloads =
|
|
17499
|
-
const localTemplates =
|
|
17498
|
+
const localPayloads = join30(ROOT11, "payloads");
|
|
17499
|
+
const localTemplates = join30(ROOT11, "templates");
|
|
17500
17500
|
let payloadsSynced = false;
|
|
17501
17501
|
let templatesSynced = false;
|
|
17502
17502
|
if (!hasPayloads && dirExists(localPayloads)) {
|
|
@@ -17509,7 +17509,7 @@ function syncData() {
|
|
|
17509
17509
|
}
|
|
17510
17510
|
const gitOk = spawnSync4("git", ["--version"]).status === 0;
|
|
17511
17511
|
if (gitOk && (!dirExists(payloadsPath) || countFiles(payloadsPath) === 0 || !dirExists(templatesPath) || countFiles(templatesPath) === 0)) {
|
|
17512
|
-
const tmp =
|
|
17512
|
+
const tmp = join30(DATA_ROOT2, ".tmp-clone");
|
|
17513
17513
|
if (dirExists(tmp))
|
|
17514
17514
|
rmSync5(tmp, { recursive: true, force: true });
|
|
17515
17515
|
const r = spawnSync4("git", ["clone", "--depth", "1", "--filter=blob:none", "--sparse", GITHUB_REPO, tmp], { timeout: 120000 });
|
|
@@ -17517,11 +17517,11 @@ function syncData() {
|
|
|
17517
17517
|
const sparse = spawnSync4("git", ["-C", tmp, "sparse-checkout", "set", "payloads", "templates"], { timeout: 120000 });
|
|
17518
17518
|
if (sparse.status === 0) {
|
|
17519
17519
|
if (!dirExists(payloadsPath) || countFiles(payloadsPath) === 0) {
|
|
17520
|
-
copyDir(
|
|
17520
|
+
copyDir(join30(tmp, "payloads"), payloadsPath);
|
|
17521
17521
|
payloadsSynced = true;
|
|
17522
17522
|
}
|
|
17523
17523
|
if (!dirExists(templatesPath) || countFiles(templatesPath) === 0) {
|
|
17524
|
-
copyDir(
|
|
17524
|
+
copyDir(join30(tmp, "templates"), templatesPath);
|
|
17525
17525
|
templatesSynced = true;
|
|
17526
17526
|
}
|
|
17527
17527
|
}
|
|
@@ -17543,18 +17543,18 @@ function copyDir(src, dst) {
|
|
|
17543
17543
|
function manualCopy(src, dst) {
|
|
17544
17544
|
mkdirSync10(dst, { recursive: true });
|
|
17545
17545
|
for (const e of readdirSync9(src, { withFileTypes: true })) {
|
|
17546
|
-
const s =
|
|
17547
|
-
const d =
|
|
17546
|
+
const s = join30(src, e.name);
|
|
17547
|
+
const d = join30(dst, e.name);
|
|
17548
17548
|
if (e.isDirectory())
|
|
17549
17549
|
manualCopy(s, d);
|
|
17550
17550
|
else
|
|
17551
|
-
writeFileSync9(d,
|
|
17551
|
+
writeFileSync9(d, readFileSync31(s));
|
|
17552
17552
|
}
|
|
17553
17553
|
}
|
|
17554
|
-
var
|
|
17554
|
+
var ROOT11, DATA_ROOT2, GITHUB_REPO = "https://github.com/shinthink/blitzstrike.git";
|
|
17555
17555
|
var init_sync = __esm(() => {
|
|
17556
|
-
|
|
17557
|
-
DATA_ROOT2 = process.env.BLITZSTRIKE_DATA ??
|
|
17556
|
+
ROOT11 = join30(fileURLToPath18(new URL(".", import.meta.url)), "..");
|
|
17557
|
+
DATA_ROOT2 = process.env.BLITZSTRIKE_DATA ?? join30(homedir11(), ".blitzstrike", "data");
|
|
17558
17558
|
});
|
|
17559
17559
|
|
|
17560
17560
|
// src/update.ts
|
|
@@ -17599,15 +17599,15 @@ var init_update = __esm(() => {
|
|
|
17599
17599
|
});
|
|
17600
17600
|
|
|
17601
17601
|
// src/release.ts
|
|
17602
|
-
import { readFileSync as
|
|
17603
|
-
import { join as
|
|
17604
|
-
import { fileURLToPath as
|
|
17602
|
+
import { readFileSync as readFileSync33, existsSync as existsSync17 } from "node:fs";
|
|
17603
|
+
import { join as join31 } from "node:path";
|
|
17604
|
+
import { fileURLToPath as fileURLToPath19 } from "node:url";
|
|
17605
17605
|
import { execSync as execSync4 } from "node:child_process";
|
|
17606
17606
|
function validateRelease() {
|
|
17607
17607
|
const checks = [];
|
|
17608
17608
|
checks.push({ name: "package.json version", ok: true, detail: VERSION });
|
|
17609
17609
|
try {
|
|
17610
|
-
const changelog =
|
|
17610
|
+
const changelog = readFileSync33(join31(ROOT12, "CHANGELOG.md"), "utf8");
|
|
17611
17611
|
const m = changelog.match(/^##\s+\[([0-9]+\.[0-9]+\.[0-9]+)\]/m);
|
|
17612
17612
|
const changelogVersion = m?.[1] ?? null;
|
|
17613
17613
|
checks.push({
|
|
@@ -17619,7 +17619,7 @@ function validateRelease() {
|
|
|
17619
17619
|
checks.push({ name: "CHANGELOG version", ok: false, detail: "CHANGELOG.md not found" });
|
|
17620
17620
|
}
|
|
17621
17621
|
try {
|
|
17622
|
-
const tag = execSync4("git describe --tags --abbrev=0", { cwd:
|
|
17622
|
+
const tag = execSync4("git describe --tags --abbrev=0", { cwd: ROOT12, encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] }).trim();
|
|
17623
17623
|
checks.push({ name: "Git tag", ok: tag === `v${VERSION}`, detail: tag, soft: true });
|
|
17624
17624
|
} catch {
|
|
17625
17625
|
checks.push({ name: "Git tag", ok: true, detail: "unavailable (no git/tags)", soft: true });
|
|
@@ -17639,22 +17639,22 @@ function validateRelease() {
|
|
|
17639
17639
|
return { version: VERSION, checks, consistent: checks.filter((c) => !c.soft).every((c) => c.ok) };
|
|
17640
17640
|
}
|
|
17641
17641
|
function lockfilePresent() {
|
|
17642
|
-
return existsSync17(
|
|
17642
|
+
return existsSync17(join31(ROOT12, "package-lock.json")) || existsSync17(join31(ROOT12, "bun.lock")) || existsSync17(join31(ROOT12, "bun.lockb"));
|
|
17643
17643
|
}
|
|
17644
|
-
var
|
|
17644
|
+
var ROOT12;
|
|
17645
17645
|
var init_release = __esm(() => {
|
|
17646
17646
|
init_version();
|
|
17647
|
-
|
|
17647
|
+
ROOT12 = join31(fileURLToPath19(new URL(".", import.meta.url)), "..");
|
|
17648
17648
|
});
|
|
17649
17649
|
|
|
17650
17650
|
// src/dependency.ts
|
|
17651
|
-
import { readFileSync as
|
|
17652
|
-
import { join as
|
|
17653
|
-
import { fileURLToPath as
|
|
17651
|
+
import { readFileSync as readFileSync34 } from "node:fs";
|
|
17652
|
+
import { join as join32 } from "node:path";
|
|
17653
|
+
import { fileURLToPath as fileURLToPath20 } from "node:url";
|
|
17654
17654
|
function checkDependencies() {
|
|
17655
17655
|
let pkg = {};
|
|
17656
17656
|
try {
|
|
17657
|
-
pkg = JSON.parse(
|
|
17657
|
+
pkg = JSON.parse(readFileSync34(join32(ROOT13, "package.json"), "utf8"));
|
|
17658
17658
|
} catch {
|
|
17659
17659
|
return { install_scripts: [], git_dependencies: [], total_dependencies: 0, safe: false };
|
|
17660
17660
|
}
|
|
@@ -17675,16 +17675,16 @@ function checkDependencies() {
|
|
|
17675
17675
|
safe: installScripts.length === 0 && gitDependencies.length === 0
|
|
17676
17676
|
};
|
|
17677
17677
|
}
|
|
17678
|
-
var
|
|
17678
|
+
var ROOT13;
|
|
17679
17679
|
var init_dependency = __esm(() => {
|
|
17680
|
-
|
|
17680
|
+
ROOT13 = join32(fileURLToPath20(new URL(".", import.meta.url)), "..");
|
|
17681
17681
|
});
|
|
17682
17682
|
|
|
17683
17683
|
// src/cli.ts
|
|
17684
|
-
import { readFileSync as
|
|
17685
|
-
import { join as
|
|
17684
|
+
import { readFileSync as readFileSync35, existsSync as existsSync18, writeFileSync as writeFileSync10, mkdirSync as mkdirSync11 } from "node:fs";
|
|
17685
|
+
import { join as join33, dirname as dirname6 } from "node:path";
|
|
17686
17686
|
import { homedir as homedir12 } from "node:os";
|
|
17687
|
-
import { fileURLToPath as
|
|
17687
|
+
import { fileURLToPath as fileURLToPath21 } from "node:url";
|
|
17688
17688
|
import { spawnSync as spawnSync5 } from "node:child_process";
|
|
17689
17689
|
function which(cmd) {
|
|
17690
17690
|
return spawnSync5("sh", ["-c", 'command -v "$1" >/dev/null 2>&1', "sh", cmd]).status === 0;
|
|
@@ -17727,7 +17727,7 @@ async function runDoctor() {
|
|
|
17727
17727
|
detail: h1 ? `X-HackerOne-Research: ${h1}` : "H1_USERNAME not set",
|
|
17728
17728
|
fix: h1 ? undefined : "export H1_USERNAME=<your-hackerone-username> (adds X-HackerOne-Research to outbound requests)"
|
|
17729
17729
|
});
|
|
17730
|
-
const dataOk = existsSync18(
|
|
17730
|
+
const dataOk = existsSync18(join33(ROOT14, "chains.json")) && existsSync18(join33(ROOT14, "tools-catalog.json"));
|
|
17731
17731
|
issues.push({
|
|
17732
17732
|
name: "Data layers (chains + tools-catalog)",
|
|
17733
17733
|
status: dataOk ? "ok" : "fail",
|
|
@@ -17778,21 +17778,21 @@ BlitzStrike — ${verdict}`);
|
|
|
17778
17778
|
function resolveCommand() {
|
|
17779
17779
|
if (which("blitzstrike"))
|
|
17780
17780
|
return { command: "blitzstrike", args: ["serve", "--mcp"] };
|
|
17781
|
-
const src =
|
|
17781
|
+
const src = join33(ROOT14, "src", "index.ts");
|
|
17782
17782
|
if (which("bun") && existsSync18(src))
|
|
17783
17783
|
return { command: "bun", args: ["run", src, "serve", "--mcp"] };
|
|
17784
17784
|
if (which("npx"))
|
|
17785
17785
|
return { command: "npx", args: ["-y", "blitzstrike", "serve", "--mcp"] };
|
|
17786
17786
|
if (which("bunx"))
|
|
17787
17787
|
return { command: "bunx", args: ["blitzstrike", "serve", "--mcp"] };
|
|
17788
|
-
const dist =
|
|
17788
|
+
const dist = join33(ROOT14, "dist", "index.js");
|
|
17789
17789
|
if (existsSync18(dist))
|
|
17790
17790
|
return { command: "bun", args: [dist, "serve", "--mcp"] };
|
|
17791
17791
|
return { command: "npx", args: ["-y", "blitzstrike", "serve", "--mcp"] };
|
|
17792
17792
|
}
|
|
17793
17793
|
function readJson(p) {
|
|
17794
17794
|
try {
|
|
17795
|
-
return JSON.parse(
|
|
17795
|
+
return JSON.parse(readFileSync35(p, "utf8"));
|
|
17796
17796
|
} catch {
|
|
17797
17797
|
return null;
|
|
17798
17798
|
}
|
|
@@ -17825,17 +17825,17 @@ function opencodeWrite(p) {
|
|
|
17825
17825
|
};
|
|
17826
17826
|
}
|
|
17827
17827
|
function copyOpenCodeAgents() {
|
|
17828
|
-
const srcDir =
|
|
17829
|
-
const dstDir =
|
|
17828
|
+
const srcDir = join33(ROOT14, "opencode-agents");
|
|
17829
|
+
const dstDir = join33(homedir12(), ".config", "opencode", "agents");
|
|
17830
17830
|
if (!existsSync18(srcDir))
|
|
17831
17831
|
return;
|
|
17832
17832
|
if (!existsSync18(dstDir))
|
|
17833
17833
|
mkdirSync11(dstDir, { recursive: true });
|
|
17834
17834
|
for (const f of ["Blitz Strike.md", "Blitz.md", "Eagle Eye.md", "Strike.md"]) {
|
|
17835
|
-
const src =
|
|
17836
|
-
const dst =
|
|
17835
|
+
const src = join33(srcDir, f);
|
|
17836
|
+
const dst = join33(dstDir, f);
|
|
17837
17837
|
if (existsSync18(src)) {
|
|
17838
|
-
writeFileSync10(dst,
|
|
17838
|
+
writeFileSync10(dst, readFileSync35(src, "utf8"));
|
|
17839
17839
|
}
|
|
17840
17840
|
}
|
|
17841
17841
|
}
|
|
@@ -17844,7 +17844,7 @@ function codexWrite(p) {
|
|
|
17844
17844
|
const dir = dirname6(p);
|
|
17845
17845
|
if (!existsSync18(dir))
|
|
17846
17846
|
mkdirSync11(dir, { recursive: true });
|
|
17847
|
-
let existing = existsSync18(p) ?
|
|
17847
|
+
let existing = existsSync18(p) ? readFileSync35(p, "utf8") : "";
|
|
17848
17848
|
if (!existing.trimEnd().endsWith(`
|
|
17849
17849
|
`))
|
|
17850
17850
|
existing += `
|
|
@@ -17863,7 +17863,7 @@ function hermesWrite(p) {
|
|
|
17863
17863
|
const dir = dirname6(p);
|
|
17864
17864
|
if (!existsSync18(dir))
|
|
17865
17865
|
mkdirSync11(dir, { recursive: true });
|
|
17866
|
-
let existing = existsSync18(p) ?
|
|
17866
|
+
let existing = existsSync18(p) ? readFileSync35(p, "utf8") : "";
|
|
17867
17867
|
existing = existing.replace(/^ blitzstrike:\n(?: .*\n?)*/m, "");
|
|
17868
17868
|
if (!existing.trimEnd().endsWith(`
|
|
17869
17869
|
`))
|
|
@@ -17890,74 +17890,74 @@ mcp_servers:
|
|
|
17890
17890
|
function detectAgents() {
|
|
17891
17891
|
const home = homedir12();
|
|
17892
17892
|
const agents = [];
|
|
17893
|
-
const claudeJson =
|
|
17893
|
+
const claudeJson = join33(home, ".claude.json");
|
|
17894
17894
|
agents.push({
|
|
17895
17895
|
name: "Claude Code",
|
|
17896
17896
|
detectPath: claudeJson,
|
|
17897
17897
|
installed: () => existsSync18(claudeJson) || which("claude"),
|
|
17898
17898
|
write: jsonMcpServersWrite(claudeJson)
|
|
17899
17899
|
});
|
|
17900
|
-
const claudeDesktop =
|
|
17900
|
+
const claudeDesktop = join33(home, ".config", "Claude", "claude_desktop_config.json");
|
|
17901
17901
|
agents.push({
|
|
17902
17902
|
name: "Claude Desktop",
|
|
17903
17903
|
detectPath: claudeDesktop,
|
|
17904
17904
|
installed: () => existsSync18(claudeDesktop),
|
|
17905
17905
|
write: jsonMcpServersWrite(claudeDesktop)
|
|
17906
17906
|
});
|
|
17907
|
-
const cursor =
|
|
17907
|
+
const cursor = join33(home, ".cursor", "mcp.json");
|
|
17908
17908
|
agents.push({
|
|
17909
17909
|
name: "Cursor",
|
|
17910
17910
|
detectPath: cursor,
|
|
17911
|
-
installed: () => existsSync18(
|
|
17911
|
+
installed: () => existsSync18(join33(home, ".cursor")) || which("cursor"),
|
|
17912
17912
|
write: jsonMcpServersWrite(cursor)
|
|
17913
17913
|
});
|
|
17914
|
-
const opencode =
|
|
17914
|
+
const opencode = join33(home, ".config", "opencode", "opencode.jsonc");
|
|
17915
17915
|
agents.push({
|
|
17916
17916
|
name: "OpenCode",
|
|
17917
17917
|
detectPath: opencode,
|
|
17918
|
-
installed: () => existsSync18(
|
|
17918
|
+
installed: () => existsSync18(join33(home, ".config", "opencode")) || which("opencode"),
|
|
17919
17919
|
write: opencodeWrite(opencode)
|
|
17920
17920
|
});
|
|
17921
|
-
const codex =
|
|
17921
|
+
const codex = join33(home, ".codex", "config.toml");
|
|
17922
17922
|
agents.push({
|
|
17923
17923
|
name: "Codex",
|
|
17924
17924
|
detectPath: codex,
|
|
17925
|
-
installed: () => existsSync18(
|
|
17925
|
+
installed: () => existsSync18(join33(home, ".codex")) || which("codex"),
|
|
17926
17926
|
write: codexWrite(codex)
|
|
17927
17927
|
});
|
|
17928
|
-
const hermes =
|
|
17928
|
+
const hermes = join33(home, ".hermes", "config.yaml");
|
|
17929
17929
|
agents.push({
|
|
17930
17930
|
name: "Hermes",
|
|
17931
17931
|
detectPath: hermes,
|
|
17932
|
-
installed: () => existsSync18(
|
|
17932
|
+
installed: () => existsSync18(join33(home, ".hermes")) || which("hermes"),
|
|
17933
17933
|
write: hermesWrite(hermes)
|
|
17934
17934
|
});
|
|
17935
|
-
const gemini =
|
|
17935
|
+
const gemini = join33(home, ".gemini", "settings.json");
|
|
17936
17936
|
agents.push({
|
|
17937
17937
|
name: "Gemini CLI",
|
|
17938
17938
|
detectPath: gemini,
|
|
17939
|
-
installed: () => existsSync18(
|
|
17939
|
+
installed: () => existsSync18(join33(home, ".gemini")) || which("gemini"),
|
|
17940
17940
|
write: jsonMcpServersWrite(gemini)
|
|
17941
17941
|
});
|
|
17942
|
-
const windsurf =
|
|
17942
|
+
const windsurf = join33(home, ".codeium", "windsurf", "mcp_config.json");
|
|
17943
17943
|
agents.push({
|
|
17944
17944
|
name: "Windsurf",
|
|
17945
17945
|
detectPath: windsurf,
|
|
17946
|
-
installed: () => existsSync18(
|
|
17946
|
+
installed: () => existsSync18(join33(home, ".codeium")) || which("windsurf"),
|
|
17947
17947
|
write: jsonMcpServersWrite(windsurf)
|
|
17948
17948
|
});
|
|
17949
|
-
const copilot =
|
|
17949
|
+
const copilot = join33(home, ".copilot", "mcp.json");
|
|
17950
17950
|
agents.push({
|
|
17951
17951
|
name: "Copilot",
|
|
17952
17952
|
detectPath: copilot,
|
|
17953
|
-
installed: () => existsSync18(
|
|
17953
|
+
installed: () => existsSync18(join33(home, ".copilot")),
|
|
17954
17954
|
write: jsonMcpServersWrite(copilot)
|
|
17955
17955
|
});
|
|
17956
|
-
const cline =
|
|
17956
|
+
const cline = join33(home, ".cline", "mcp_settings.json");
|
|
17957
17957
|
agents.push({
|
|
17958
17958
|
name: "Cline",
|
|
17959
17959
|
detectPath: cline,
|
|
17960
|
-
installed: () => existsSync18(
|
|
17960
|
+
installed: () => existsSync18(join33(home, ".cline")),
|
|
17961
17961
|
write: jsonMcpServersWrite(cline)
|
|
17962
17962
|
});
|
|
17963
17963
|
return agents;
|
|
@@ -18069,13 +18069,13 @@ Failed (${failedList.length}) — reason per tool:`);
|
|
|
18069
18069
|
Common causes: missing toolchain, pip/git network failures, or very heavy builds. ` + `Re-run after installing the missing toolchain — failed tools are skipped, not fatal.`);
|
|
18070
18070
|
}
|
|
18071
18071
|
}
|
|
18072
|
-
var
|
|
18072
|
+
var ROOT14;
|
|
18073
18073
|
var init_cli = __esm(() => {
|
|
18074
18074
|
init_catalog();
|
|
18075
18075
|
init_release();
|
|
18076
18076
|
init_dependency();
|
|
18077
18077
|
init_mcp_status();
|
|
18078
|
-
|
|
18078
|
+
ROOT14 = join33(fileURLToPath21(new URL(".", import.meta.url)), "..");
|
|
18079
18079
|
});
|
|
18080
18080
|
|
|
18081
18081
|
// node_modules/zod/v3/helpers/util.js
|
|
@@ -32713,7 +32713,7 @@ class StdioServerTransport {
|
|
|
32713
32713
|
|
|
32714
32714
|
// src/server.ts
|
|
32715
32715
|
init_scanner();
|
|
32716
|
-
import { readFileSync as
|
|
32716
|
+
import { readFileSync as readFileSync32 } from "node:fs";
|
|
32717
32717
|
import { execFileSync as execFileSync8 } from "node:child_process";
|
|
32718
32718
|
|
|
32719
32719
|
// src/review-harness.ts
|
|
@@ -59779,18 +59779,22 @@ function load5() {
|
|
|
59779
59779
|
}
|
|
59780
59780
|
}
|
|
59781
59781
|
var VECTOR_MAP = [
|
|
59782
|
-
{ re: /jwt|algorithm confusion|rs256|hs256/i, vectors: ["jwt"], detectors: ["missing_authz"], chains: ["jwt"], tools: ["jwt_analyze", "live_recon"] },
|
|
59782
|
+
{ re: /jwt|algorithm confusion|rs256|hs256/i, vectors: ["jwt"], detectors: ["missing_authz", "jwt_alg_confusion"], chains: ["jwt"], tools: ["jwt_analyze", "jwt_forge", "live_recon"] },
|
|
59783
59783
|
{ re: /ssrf|server-side request/i, vectors: ["ssrf"], detectors: ["ssrf"], chains: ["ssrf"], tools: ["live_recon", "blind_oracle", "active_scan"] },
|
|
59784
59784
|
{ re: /sql injection|sqli|postgresql|sql/i, vectors: ["sql_injection"], detectors: ["sql_injection"], chains: ["sql_injection"], tools: ["live_recon", "blind_oracle", "active_scan"] },
|
|
59785
59785
|
{ re: /ssti|template injection|liquid|jinja|twig/i, vectors: ["ssti"], detectors: ["ssti"], chains: ["ssti"], tools: ["live_recon", "blind_oracle"] },
|
|
59786
59786
|
{ re: /command injection|os command|command execution/i, vectors: ["command_injection"], detectors: ["command_injection"], chains: ["command_injection"], tools: ["live_recon", "blind_oracle"] },
|
|
59787
|
-
{ re: /idor|bola|authorization|broken function|role|membership|ownership|entitlement|directory search|excessive data|data exposure|harvest/i, vectors: ["broken_object_level_authorization"], detectors: ["missing_authz"], chains: ["idor"], tools: ["live_recon", "active_scan", "param_precedence"] },
|
|
59787
|
+
{ re: /idor|bola|authorization|broken function|role|membership|ownership|entitlement|directory search|excessive data|data exposure|harvest|substring|search|disclosure/i, vectors: ["broken_object_level_authorization"], detectors: ["missing_authz"], chains: ["idor"], tools: ["live_recon", "active_scan", "param_precedence", "sibling_scan"] },
|
|
59788
59788
|
{ re: /graphql/i, vectors: ["graphql_exposure"], detectors: ["graphql_exposure", "sql_injection"], chains: ["graphql"], tools: ["live_recon", "active_scan"] },
|
|
59789
|
-
{ re: /cache/i, vectors: ["web_cache_deception"], detectors: [], chains: ["cache_deception"], tools: ["cache_gap", "live_recon"] },
|
|
59789
|
+
{ re: /cache/i, vectors: ["web_cache_deception"], detectors: ["cache_deception"], chains: ["cache_deception"], tools: ["cache_gap", "live_recon"] },
|
|
59790
59790
|
{ re: /credential|key|token|bearer|secret|leak|websocket|rum|api key/i, vectors: ["hardcoded_secret"], detectors: ["hardcoded_secret"], chains: ["secret_leak"], tools: ["live_recon", "drive_devtools", "scan_git_history"] },
|
|
59791
59791
|
{ re: /rate.limit|batching|otp/i, vectors: ["business_logic"], detectors: [], chains: ["rate_limit_bypass"], tools: ["race_test", "active_scan"] },
|
|
59792
59792
|
{ re: /mass assignment|self.regist|admin account|user creation|scope/i, vectors: ["mass_assignment"], detectors: ["mass_assignment", "missing_authz"], chains: ["mass_assignment"], tools: ["live_recon", "active_scan"] },
|
|
59793
|
-
{ re: /deserialization|rce|workflow|execution/i, vectors: ["code_execution"], detectors: ["deserialization"], chains: ["deserialization"], tools: ["live_recon", "active_scan"] }
|
|
59793
|
+
{ re: /deserialization|rce|workflow|execution/i, vectors: ["code_execution"], detectors: ["deserialization"], chains: ["deserialization"], tools: ["live_recon", "active_scan"] },
|
|
59794
|
+
{ re: /read.only|readonly|canedit|can_edit|ui.*bypass|client.*flag|client.*trusted|disabled.*field|isadmin|is_admin|withvip|premium|unmasked/i, vectors: ["client_trusted_flag"], detectors: ["client_trusted_flag"], chains: ["xss_to_account_takeover"], tools: ["live_recon", "active_scan"] },
|
|
59795
|
+
{ re: /password reset|reset.*password|third.party harm|password.*reset/i, vectors: ["business_logic"], detectors: ["missing_authz"], chains: ["idor"], tools: ["live_recon", "sibling_scan"] },
|
|
59796
|
+
{ re: /prototype|pollution|__proto__/i, vectors: ["prototype_pollution"], detectors: ["prototype_pollution"], chains: ["prototype_pollution"], tools: ["proto_pollution_probe", "live_recon"] },
|
|
59797
|
+
{ re: /smuggl|desync|cl\.te|te\.cl/i, vectors: ["http_request_smuggling"], detectors: [], chains: ["http_request_smuggling"], tools: ["smuggling_test", "live_recon"] }
|
|
59794
59798
|
];
|
|
59795
59799
|
function mapLab(lab) {
|
|
59796
59800
|
const out = { vectors: [], detectors: [], chains: [], tools: [] };
|
|
@@ -60504,19 +60508,118 @@ async function nucleiScan(opts) {
|
|
|
60504
60508
|
};
|
|
60505
60509
|
}
|
|
60506
60510
|
|
|
60507
|
-
// src/
|
|
60508
|
-
import { readFileSync as readFileSync25
|
|
60511
|
+
// src/param-surface.ts
|
|
60512
|
+
import { readFileSync as readFileSync25 } from "node:fs";
|
|
60509
60513
|
import { join as join25 } from "node:path";
|
|
60510
60514
|
import { fileURLToPath as fileURLToPath15 } from "node:url";
|
|
60515
|
+
var ROOT8 = join25(fileURLToPath15(new URL(".", import.meta.url)), "..");
|
|
60516
|
+
function loadSpecialists() {
|
|
60517
|
+
try {
|
|
60518
|
+
return JSON.parse(readFileSync25(join25(ROOT8, "intelligence", "specialist-discovery.json"), "utf8")).classes;
|
|
60519
|
+
} catch {
|
|
60520
|
+
return [];
|
|
60521
|
+
}
|
|
60522
|
+
}
|
|
60523
|
+
function formFields(html) {
|
|
60524
|
+
const out = new Set;
|
|
60525
|
+
const re = /<(?:input|select|textarea|button)\b[^>]*\bname\s*=\s*["']([^"']+)["']/gi;
|
|
60526
|
+
let m;
|
|
60527
|
+
while ((m = re.exec(html)) !== null)
|
|
60528
|
+
if (m[1] && !/^(csrf|_csrf|token|_token)$/i.test(m[1]))
|
|
60529
|
+
out.add(m[1]);
|
|
60530
|
+
return [...out];
|
|
60531
|
+
}
|
|
60532
|
+
function pathParams(urls) {
|
|
60533
|
+
const seen = new Set;
|
|
60534
|
+
const out = [];
|
|
60535
|
+
const uuidRe = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i;
|
|
60536
|
+
for (const u of urls) {
|
|
60537
|
+
let path = "";
|
|
60538
|
+
try {
|
|
60539
|
+
path = new URL(u).pathname;
|
|
60540
|
+
} catch {
|
|
60541
|
+
continue;
|
|
60542
|
+
}
|
|
60543
|
+
const segs = path.split("/").filter(Boolean);
|
|
60544
|
+
for (let i = 0;i < segs.length; i++) {
|
|
60545
|
+
const s = segs[i];
|
|
60546
|
+
const prev = segs[i - 1] ?? "id";
|
|
60547
|
+
if (/^\d+$/.test(s)) {
|
|
60548
|
+
const name = prev.replace(/[^a-z0-9_]/gi, "").toLowerCase() || "id";
|
|
60549
|
+
const key = `${name}:id`;
|
|
60550
|
+
if (!seen.has(key)) {
|
|
60551
|
+
seen.add(key);
|
|
60552
|
+
out.push({ name, sample: s, kind: "id" });
|
|
60553
|
+
}
|
|
60554
|
+
} else if (uuidRe.test(s)) {
|
|
60555
|
+
const name = prev.replace(/[^a-z0-9_]/gi, "").toLowerCase() || "uuid";
|
|
60556
|
+
const key = `${name}:uuid`;
|
|
60557
|
+
if (!seen.has(key)) {
|
|
60558
|
+
seen.add(key);
|
|
60559
|
+
out.push({ name, sample: s, kind: "uuid" });
|
|
60560
|
+
}
|
|
60561
|
+
}
|
|
60562
|
+
}
|
|
60563
|
+
}
|
|
60564
|
+
return out;
|
|
60565
|
+
}
|
|
60566
|
+
function jsRefs(html) {
|
|
60567
|
+
const out = new Set;
|
|
60568
|
+
for (const m of html.matchAll(/(?:fetch|axios(?:\.get|\.post)?|XMLHttpRequest\.open)\s*\(\s*["'`]([^"'`]+)["'`]/gi)) {
|
|
60569
|
+
const u = m[1];
|
|
60570
|
+
if (/^https?:\/\//i.test(u) || u.startsWith("/"))
|
|
60571
|
+
out.add(u);
|
|
60572
|
+
}
|
|
60573
|
+
return [...out].slice(0, 50);
|
|
60574
|
+
}
|
|
60575
|
+
async function paramSurface(target, class_) {
|
|
60576
|
+
const base = target.replace(/\/$/, "");
|
|
60577
|
+
let html = "";
|
|
60578
|
+
let status = 0;
|
|
60579
|
+
try {
|
|
60580
|
+
const res = await fetch(target, { redirect: "follow", headers: { "User-Agent": "Mozilla/5.0 (compatible; BlitzStrike/2.4)" } });
|
|
60581
|
+
status = res.status;
|
|
60582
|
+
html = await res.text();
|
|
60583
|
+
} catch {}
|
|
60584
|
+
const { links, scripts } = crawlLinks(base, html);
|
|
60585
|
+
const allUrls = [target, ...links, ...scripts];
|
|
60586
|
+
const query = extractParams(allUrls);
|
|
60587
|
+
const fields = formFields(html);
|
|
60588
|
+
const paths = pathParams(allUrls);
|
|
60589
|
+
const js = jsRefs(html);
|
|
60590
|
+
const result = {
|
|
60591
|
+
target,
|
|
60592
|
+
url: base,
|
|
60593
|
+
query_params: query,
|
|
60594
|
+
form_fields: fields,
|
|
60595
|
+
path_params: paths,
|
|
60596
|
+
js_refs: js,
|
|
60597
|
+
total: query.length + fields.length + paths.length
|
|
60598
|
+
};
|
|
60599
|
+
if (class_) {
|
|
60600
|
+
const spec = loadSpecialists();
|
|
60601
|
+
const c = class_.toLowerCase().trim();
|
|
60602
|
+
const matched = spec.filter((s) => s.id === c || s.id.includes(c) || c.includes(s.id));
|
|
60603
|
+
result.specialist_hints = matched.length > 0 ? matched : spec.filter((s) => s.id.includes(c.slice(0, 3)));
|
|
60604
|
+
} else {
|
|
60605
|
+
result.specialist_hints = loadSpecialists();
|
|
60606
|
+
}
|
|
60607
|
+
return { ...result, url: base, status_hint: status === 0 ? "fetch failed" : `http ${status}` };
|
|
60608
|
+
}
|
|
60609
|
+
|
|
60610
|
+
// src/benchmark.ts
|
|
60611
|
+
import { readFileSync as readFileSync26, readdirSync as readdirSync7, writeFileSync as writeFileSync6, rmSync as rmSync3, mkdirSync as mkdirSync7 } from "node:fs";
|
|
60612
|
+
import { join as join26 } from "node:path";
|
|
60613
|
+
import { fileURLToPath as fileURLToPath16 } from "node:url";
|
|
60511
60614
|
import { tmpdir as tmpdir3, homedir as homedir9 } from "node:os";
|
|
60512
60615
|
init_complex_bugs();
|
|
60513
|
-
var
|
|
60514
|
-
var CORPUS =
|
|
60515
|
-
var CAPTURED_CORPUS_DIR = process.env.BLITZSTRIKE_CORPUS_DIR ??
|
|
60616
|
+
var ROOT9 = join26(fileURLToPath16(new URL(".", import.meta.url)), "..");
|
|
60617
|
+
var CORPUS = join26(ROOT9, "bench", "corpus");
|
|
60618
|
+
var CAPTURED_CORPUS_DIR = process.env.BLITZSTRIKE_CORPUS_DIR ?? join26(homedir9(), ".blitzstrike", "corpus");
|
|
60516
60619
|
function parseCorpusFile(path) {
|
|
60517
60620
|
let text;
|
|
60518
60621
|
try {
|
|
60519
|
-
text =
|
|
60622
|
+
text = readFileSync26(path, "utf8");
|
|
60520
60623
|
} catch {
|
|
60521
60624
|
return null;
|
|
60522
60625
|
}
|
|
@@ -60572,7 +60675,7 @@ function loadDir(dir) {
|
|
|
60572
60675
|
for (const f of readdirSync7(dir)) {
|
|
60573
60676
|
if (!f.endsWith(".md"))
|
|
60574
60677
|
continue;
|
|
60575
|
-
const e = parseCorpusFile(
|
|
60678
|
+
const e = parseCorpusFile(join26(dir, f));
|
|
60576
60679
|
if (e)
|
|
60577
60680
|
entries.push(e);
|
|
60578
60681
|
}
|
|
@@ -60599,7 +60702,7 @@ function captureFalsePositive(input) {
|
|
|
60599
60702
|
input.code,
|
|
60600
60703
|
"```"
|
|
60601
60704
|
].filter((l) => l !== null);
|
|
60602
|
-
const path =
|
|
60705
|
+
const path = join26(CAPTURED_CORPUS_DIR, `${id}.md`);
|
|
60603
60706
|
writeFileSync6(path, lines.join(`
|
|
60604
60707
|
`) + `
|
|
60605
60708
|
`, "utf8");
|
|
@@ -60621,7 +60724,7 @@ function detect(entry) {
|
|
|
60621
60724
|
}
|
|
60622
60725
|
const lang = entry.language;
|
|
60623
60726
|
if (lang === "php") {
|
|
60624
|
-
const tmp =
|
|
60727
|
+
const tmp = join26(tmpdir3(), `blitzstrike-bench-${entry.id}-${process.pid}.php`);
|
|
60625
60728
|
writeFileSync6(tmp, entry.code);
|
|
60626
60729
|
const r = analyzeDataFlow2(tmp);
|
|
60627
60730
|
rmSync3(tmp, { force: true });
|
|
@@ -60690,12 +60793,12 @@ function runBenchmark() {
|
|
|
60690
60793
|
}
|
|
60691
60794
|
|
|
60692
60795
|
// src/obligations.ts
|
|
60693
|
-
import { readFileSync as
|
|
60694
|
-
import { join as
|
|
60796
|
+
import { readFileSync as readFileSync27, appendFileSync as appendFileSync4, mkdirSync as mkdirSync8, existsSync as existsSync13, writeFileSync as writeFileSync7 } from "node:fs";
|
|
60797
|
+
import { join as join27 } from "node:path";
|
|
60695
60798
|
import { createHash as createHash6 } from "node:crypto";
|
|
60696
60799
|
import { homedir as homedir10 } from "node:os";
|
|
60697
|
-
var HOME_DIR4 = process.env.BLITZSTRIKE_HOME ??
|
|
60698
|
-
var OBLIGATION_PATH =
|
|
60800
|
+
var HOME_DIR4 = process.env.BLITZSTRIKE_HOME ?? join27(homedir10(), ".blitzstrike");
|
|
60801
|
+
var OBLIGATION_PATH = join27(HOME_DIR4, "obligations.jsonl");
|
|
60699
60802
|
function ensureDir3() {
|
|
60700
60803
|
if (!existsSync13(HOME_DIR4))
|
|
60701
60804
|
mkdirSync8(HOME_DIR4, { recursive: true });
|
|
@@ -60708,7 +60811,7 @@ function loadObligations() {
|
|
|
60708
60811
|
return [];
|
|
60709
60812
|
try {
|
|
60710
60813
|
const out = [];
|
|
60711
|
-
for (const line of
|
|
60814
|
+
for (const line of readFileSync27(OBLIGATION_PATH, "utf8").split(`
|
|
60712
60815
|
`)) {
|
|
60713
60816
|
const t = line.trim();
|
|
60714
60817
|
if (!t)
|
|
@@ -60812,11 +60915,11 @@ init_framework_security();
|
|
|
60812
60915
|
// src/variant-scan.ts
|
|
60813
60916
|
init_scanner();
|
|
60814
60917
|
init_complex_bugs();
|
|
60815
|
-
import { readFileSync as
|
|
60918
|
+
import { readFileSync as readFileSync29 } from "node:fs";
|
|
60816
60919
|
|
|
60817
60920
|
// src/cross-file.ts
|
|
60818
60921
|
init_scanner();
|
|
60819
|
-
import { readFileSync as
|
|
60922
|
+
import { readFileSync as readFileSync28 } from "node:fs";
|
|
60820
60923
|
var PUBLIC_HOOK_RE = /(?:wp_ajax_nopriv_\w+|admin_post_nopriv_\w+|init|template_redirect|wp_loaded|parse_request|user_register|um_user_register|register_new_user|authenticate)/;
|
|
60821
60924
|
var PRIV_SINK_RE = /\b(set_role|add_role|remove_role|set_user_role|wp_set_current_user|wp_set_auth_cookie|wp_insert_user|wp_create_user|wp_update_user)\s*\(/;
|
|
60822
60925
|
var ROLE_META_RE = /update_user_meta\s*\(\s*[^,]+,\s*['"](wp_capabilities|role|roles|capabilities|wp_user_level)['"]/;
|
|
@@ -60868,7 +60971,7 @@ function detectCrossFilePrivesc(root) {
|
|
|
60868
60971
|
for (const file of files) {
|
|
60869
60972
|
let code;
|
|
60870
60973
|
try {
|
|
60871
|
-
code = stripComments(
|
|
60974
|
+
code = stripComments(readFileSync28(file, "utf8"));
|
|
60872
60975
|
} catch {
|
|
60873
60976
|
continue;
|
|
60874
60977
|
}
|
|
@@ -60909,7 +61012,7 @@ function detectCrossFilePrivesc(root) {
|
|
|
60909
61012
|
for (const file of files) {
|
|
60910
61013
|
let code;
|
|
60911
61014
|
try {
|
|
60912
|
-
code = stripComments(
|
|
61015
|
+
code = stripComments(readFileSync28(file, "utf8"));
|
|
60913
61016
|
} catch {
|
|
60914
61017
|
continue;
|
|
60915
61018
|
}
|
|
@@ -60932,7 +61035,7 @@ function detectCrossFilePrivesc(root) {
|
|
|
60932
61035
|
for (const file of files) {
|
|
60933
61036
|
let code;
|
|
60934
61037
|
try {
|
|
60935
|
-
code = stripComments(
|
|
61038
|
+
code = stripComments(readFileSync28(file, "utf8"));
|
|
60936
61039
|
} catch {
|
|
60937
61040
|
continue;
|
|
60938
61041
|
}
|
|
@@ -61047,7 +61150,7 @@ function variantScan(root, opts = {}) {
|
|
|
61047
61150
|
for (const file of files) {
|
|
61048
61151
|
let code;
|
|
61049
61152
|
try {
|
|
61050
|
-
code =
|
|
61153
|
+
code = readFileSync29(file, "utf8");
|
|
61051
61154
|
} catch {
|
|
61052
61155
|
continue;
|
|
61053
61156
|
}
|
|
@@ -62732,7 +62835,7 @@ function listPocTypes() {
|
|
|
62732
62835
|
import { execSync as execSync3 } from "node:child_process";
|
|
62733
62836
|
import { mkdtempSync as mkdtempSync3, mkdirSync as mkdirSync9, writeFileSync as writeFileSync8, rmSync as rmSync4, existsSync as existsSync15 } from "node:fs";
|
|
62734
62837
|
import { tmpdir as tmpdir4 } from "node:os";
|
|
62735
|
-
import { join as
|
|
62838
|
+
import { join as join28 } from "node:path";
|
|
62736
62839
|
function findForge() {
|
|
62737
62840
|
try {
|
|
62738
62841
|
const p = execSync3("which forge 2>/dev/null", { encoding: "utf8", timeout: 3000 }).trim();
|
|
@@ -62781,14 +62884,14 @@ async function foundryRun(input) {
|
|
|
62781
62884
|
};
|
|
62782
62885
|
}
|
|
62783
62886
|
const poc = input.poc_code ?? foundryPoc(input.class_ ?? "missing_access_control", name);
|
|
62784
|
-
const dir = mkdtempSync3(
|
|
62887
|
+
const dir = mkdtempSync3(join28(tmpdir4(), "blitzstrike-foundry-"));
|
|
62785
62888
|
try {
|
|
62786
62889
|
try {
|
|
62787
62890
|
execSync3(`${forge} init --force --no-git ${dir}`, { stdio: "ignore", timeout: 60000 });
|
|
62788
62891
|
} catch {
|
|
62789
|
-
mkdirSync9(
|
|
62790
|
-
mkdirSync9(
|
|
62791
|
-
writeFileSync8(
|
|
62892
|
+
mkdirSync9(join28(dir, "src"), { recursive: true });
|
|
62893
|
+
mkdirSync9(join28(dir, "test"), { recursive: true });
|
|
62894
|
+
writeFileSync8(join28(dir, "foundry.toml"), `[profile.default]
|
|
62792
62895
|
src = "src"
|
|
62793
62896
|
out = "out"
|
|
62794
62897
|
libs = ["lib"]
|
|
@@ -62798,12 +62901,12 @@ solc = "0.8.20"
|
|
|
62798
62901
|
for (const f of ["Counter.sol", "Counter.t.sol", "Counter.s.sol"]) {
|
|
62799
62902
|
for (const sub of ["src", "test", "script"]) {
|
|
62800
62903
|
try {
|
|
62801
|
-
rmSync4(
|
|
62904
|
+
rmSync4(join28(dir, sub, f), { force: true });
|
|
62802
62905
|
} catch {}
|
|
62803
62906
|
}
|
|
62804
62907
|
}
|
|
62805
|
-
writeFileSync8(
|
|
62806
|
-
writeFileSync8(
|
|
62908
|
+
writeFileSync8(join28(dir, "src", `${name}.sol`), input.contract_code);
|
|
62909
|
+
writeFileSync8(join28(dir, "test", `${name}.t.sol`), poc);
|
|
62807
62910
|
const { out } = runForge(forge, dir, input.timeout_ms ?? 60000);
|
|
62808
62911
|
const tests = parseTestResults(out);
|
|
62809
62912
|
const anyFail = tests.some((t) => t.status === "fail");
|
|
@@ -62821,18 +62924,18 @@ solc = "0.8.20"
|
|
|
62821
62924
|
}
|
|
62822
62925
|
|
|
62823
62926
|
// src/enterprise-benchmark.ts
|
|
62824
|
-
import { existsSync as existsSync16, readFileSync as
|
|
62825
|
-
import { join as
|
|
62826
|
-
import { fileURLToPath as
|
|
62927
|
+
import { existsSync as existsSync16, readFileSync as readFileSync30, readdirSync as readdirSync8, statSync as statSync5 } from "node:fs";
|
|
62928
|
+
import { join as join29, resolve } from "node:path";
|
|
62929
|
+
import { fileURLToPath as fileURLToPath17 } from "node:url";
|
|
62827
62930
|
init_complex_bugs();
|
|
62828
|
-
var
|
|
62931
|
+
var ROOT10 = resolve(fileURLToPath17(new URL(".", import.meta.url)), "..", "bench", "enterprise");
|
|
62829
62932
|
var ENTERPRISE_FIXTURES = [
|
|
62830
|
-
{ id: "php-laravel", dir:
|
|
62831
|
-
{ id: "js-express", dir:
|
|
62832
|
-
{ id: "py-django", dir:
|
|
62833
|
-
{ id: "java-spring", dir:
|
|
62834
|
-
{ id: "wp-batch-route", dir:
|
|
62835
|
-
{ id: "php-complex", dir:
|
|
62933
|
+
{ id: "php-laravel", dir: join29(ROOT10, "php-laravel"), expected_vulns: 4 },
|
|
62934
|
+
{ id: "js-express", dir: join29(ROOT10, "js-express"), expected_vulns: 2 },
|
|
62935
|
+
{ id: "py-django", dir: join29(ROOT10, "py-django"), expected_vulns: 2 },
|
|
62936
|
+
{ id: "java-spring", dir: join29(ROOT10, "java-spring"), expected_vulns: 2 },
|
|
62937
|
+
{ id: "wp-batch-route", dir: join29(ROOT10, "wp-batch-route"), expected_vulns: 3 },
|
|
62938
|
+
{ id: "php-complex", dir: join29(ROOT10, "php-complex"), expected_vulns: 4 }
|
|
62836
62939
|
];
|
|
62837
62940
|
function sourceFiles(root) {
|
|
62838
62941
|
const out = [];
|
|
@@ -62844,7 +62947,7 @@ function sourceFiles(root) {
|
|
|
62844
62947
|
return;
|
|
62845
62948
|
}
|
|
62846
62949
|
for (const e of entries) {
|
|
62847
|
-
const p =
|
|
62950
|
+
const p = join29(dir, e);
|
|
62848
62951
|
let st;
|
|
62849
62952
|
try {
|
|
62850
62953
|
st = statSync5(p);
|
|
@@ -62865,7 +62968,7 @@ function detectFixture(dir) {
|
|
|
62865
62968
|
for (const f of sourceFiles(dir)) {
|
|
62866
62969
|
let code;
|
|
62867
62970
|
try {
|
|
62868
|
-
code =
|
|
62971
|
+
code = readFileSync30(f, "utf8");
|
|
62869
62972
|
} catch {
|
|
62870
62973
|
continue;
|
|
62871
62974
|
}
|
|
@@ -63078,7 +63181,7 @@ function createServer2() {
|
|
|
63078
63181
|
` + `- A hard block (Cloudflare/WAF/IP-block/captcha) is NOT the end: mark the finding blocked + note the required vantage (residential / authorized / correct-SNI / --resolve direct-to-origin), then CONTINUE to the next lead (origin bypass, non-prod cluster, mobile APK, subdomain).
|
|
63079
63182
|
` + `- Keep trying every lead AND every chain step until each is verified/executed or blocked, THEN generate_report. Never deliver a bare surface map, and never stop at 'found X' when X enables more.
|
|
63080
63183
|
|
|
63081
|
-
` + "TWO PATHS:\\n" + "- Source path on disk -> blitz_scan / taint_file / eagle_eye2 (static).\\n" + "- Live URL -> live_recon / active_scan / strike_verify (web-hunting).\\n\\n" + "DEEPEN A FINDING: attack_plan(target, tech, params) to get the prioritized vector plan (decide what to test next with data); list_chains (escalation), chain_links (compose), technique_lookup(cls), payload_lookup, bypass_lookup (blocked). Ground any detector hit empirically with pattern_lookup(id) — it returns the class's CWE, real-world signature, escalation chains, citable references, per-class bypass techniques, and the high-value assets (crown jewels) that class hits, so a raw hit becomes a class-aware finding. Resolve free-form terminology first with synonym_lookup(term) (IDOR/BOLA/SQLi/prompt-injection → canonical id). For an llm_injection hit, its pattern carries a validation discipline — the RUN-TWICE RULE (reproduce token-for-token across two fresh sessions), NON-GUESSABLE ANCHOR (must leak a real key/URL, not a plausible guess), and OOB PROOF (a verifiable callback log) — apply all three before reporting. BEFORE generating a report, run submission_gate(...) and only ship a finding that passes all 7 questions (reproducible, in-scope, real-impact, no-privileged-assumption, verified-live, evidence-redacted, severity-derived); one false = kill it. Generate the concrete reproduction recipe with auto_poc(type, base_url, endpoint, param) — it emits the exact marker request + negative control + expected differential + Patchstack-style title, so 'reproducible' is executable, not abstract. Calibrate severity with severity_calibrate(type, cvss) to get a P1–P5 tier + VRT-style category. Start each engagement with engagement_scaffold(target, scope) for the folder + scope.md structure, and check data_refresh() to confirm the data layers are consistent. Phase doctrine: read_skill(bs-orchestrate-engagement | bs-web-hunting | bs-source-audit | bs-verify-finding). Campaign plan: read_playbook(target-type). On any failure call retry_guidance(signal) / model_fallback(signal) before giving up. HUNTING DOCTRINE (maximize payout rate): (1) SIBLING RULE — if one endpoint requires auth, check every sibling (/export /delete /share); ~30% of paid IDOR/auth bugs come from siblings — AUTOMATE it with sibling_scan(base_url, endpoint, token_a, token_b), the deterministic live logic-bug prober (sibling enumeration + differential IDOR + auth matrix + mass assignment + rate limit, evidence-first). (2) A→B SIGNAL — a confirmed bug signals a class of developer mistake; hunt B and C (20-min box) before reporting. (3) TWO-ACCOUNT IDOR — always test with attacker account A reading victim account B, and state it in the report. (4) PoC ESCALATION — IDOR shows victim data (not 200), XSS shows cookie exfil (not alert), SSRF shows internal response (not DNS), SQLi shows DB content (not error). (5) FOLLOW THE MONEY — billing/credits/refunds/wallet flows. (6) Kill weak findings with kill_list(type) BEFORE the gate — missing headers, self-XSS, open-redirect-alone, SSRF-DNS-only, GraphQL-introspection-alone are always N/A standalone. (7) CI/CD + SAML/SSO are critical attack surfaces (pull_request_target, expression injection, XML signature wrapping, comment injection). Full doctrine: hunting_doctrine(). WHAT TO HUNT NEXT: watchlist() returns the ranked CWE frequency + high-value CVEs with payout + a saturated flag (prioritize high-freq/high-payout/not-saturated: missing-authz, SQLi, SSRF, deserialization; skip saturated XSS/CSRF/open-redirect unless they chain into takeover). The CVE watchlist now spans 4,000+ product fingerprints (live from nuclei-templates when installed — refresh with sync_cve_corpus() before a big recon pass); live_recon's suggested_cves names the SPECIFIC CVE for the detected product/version — then cve_verify(cve, target) CONFIRMS it live by running the matching nuclei template (VERIFIED only when nuclei actually matches; a CVE is report-ready only after cve_verify, never from the fingerprint alone). For 'scan this target' automation, nuclei_scan(target) fingerprints the stack and runs the WHOLE matched template set (CVE templates + optional broad tech-tag) in one rate-limited pass — use it instead of verifying CVEs one-by-one. SURFACE-FIRST: surface_map(surface) maps an attack surface (image/redirect proxy, edge cache, payment portal, AI agent, file service, Electron, SSO) to its highest-value tests — map surfaces then test, don't spray payloads. PRECISION GUARD: resolve_check(host) detects when an ISP/country redirects the domain to a blocking/sinkhole page (gambling/adult/streaming niches) — audit the PUBLIC IP, never the sinkhole.\n" + "KNOWLEDGE BASE (discover, don't guess): skillLookup(topic) / listSkills for the 40 attack-path + hunting skills (ap-*, hp-*, bs-*); list_attack_vectors / attack_vectors(cat) for the 34-category vector taxonomy; taxonomy(kind) for OWASP/CWE/ASVS/API-top-10; read_playbook(type) for the 17 campaign playbooks; list_manuals / read_tool_manual for 317 tool references; list_tools / run_catalog_tool for the 141-tool catalog. Every tool, skill, and data layer is reachable from these. CROSS-TARGET INTELLIGENCE: strike_resolve auto-records confirmed/false_positive verdicts into the empirical ledger; query it with intelligence(action=hit_rates/top_vectors/recall) so a new target on a known tech inherits historical hit-rates (attack_plan already blends them into success_probability). intelligence(action=recall, tech, target) is the per-engagement pattern recall — it returns which patterns historically CONFIRMED on that tech (prioritize them) versus which only ever produced false positives (avoid them), so a new engagement starts from the empirical playbook of past ones. LIVE PENTEST + TARGETING (black-box, WAF-safe): cache_gap(base_url, endpoint) fuzzes path-normalization + static-extension variants for cache deception/poisoning; blind_oracle(base_url, param, value) detects which SINK a param reaches (sql/ssti/xss) via benign arithmetic (id=1+0, test${7*7}) WITHOUT a malicious payload; param_precedence(base_url, param, A, B) maps duplicate-parameter precedence (first/last-wins) for WAF-bypass; broken_link_scan(url) detects expired-domain takeover (crawls outbound refs → DNS/RDAP → flags claimable domains). Logic-bug live probers: jwt_forge(token, endpoint, …) forges JWT confusion tokens (alg:none / RS256→HS256 key-confusion / kid-jku-x5u) and proves which is ACCEPTED live; proto_pollution_probe(target, endpoint) sends __proto__ / constructor.prototype JSON canaries and reports VERIFIED only on reflection; smuggling_test(target) sends CL.TE / TE.CL desync probes over a raw connection. OOB (out-of-band) PROOF for BLIND vulns: oob_start() spins an interactsh listener (unique *.oast.* domain, streams DNS/HTTP interactions — the standard for public targets) or a local HTTP listener for local labs; inject the canary, then oob_poll(id) until the hit arrives; oob_stop(id) to clean up. A blind SSRF/XXE/SQLi/command-injection is CONFIRMED only when the canary actually arrives — never from a guess. SOURCE TARGETING: review_harness(path) FIRST for full coverage — it applies a fixed 5-signal rubric (entry_points/auth_gates/sinks/secrets/logic_bugs) to EVERY source file and sorts the signal-dense ones first (a complete map, not a partial scan); then action_surface(code) maps every wp_ajax_* action to its vuln class + DERIVED priority (what to look for WHERE); security_state(sanitizers, sink) gives a wrong-context sanitization verdict; framework_knowledge(framework) returns auth/nonce primitives for 9 frameworks; variant_scan(root, signature) mass-sweeps an install base for ONE bug family; patch_analyze(old, new) REVERSES a security patch into the 0-day, and its mine_signature feeds variant_scan to sweep unpatched copies. All of these are DETECTION HINTS — verify each live (strike_verify / browser_validate) before it enters the report. NEWEST DETECTORS — understand AND try them: variant_scan also emits priv_esc (privilege escalation — a role/capability/user change fed by request input, traced cross-file via reverse call-graph, e.g. set_role($id, sanitize_key($_POST['um-role'])) or update_user_meta(...,'wp_capabilities', $_POST[...])) and flags uploadAllow=>array('all') unrestricted-upload configs as file_upload (the file-manager/connector shape). TO TRY a priv_esc hit: submit the role field with 'administrator' (or send wp_capabilities meta) and confirm the account actually gains admin. TO TRY an unrestricted-upload hit: POST a .php/.phtml and confirm it lands web-reachable + executes. variant_scan also emits hardcoded_secret (CWE-798) in three tiers: a secret field (api_key/db_password/access_token/aws_*) assigned a literal (HIGH), a known secret FORMAT (JWT eyJ…/AWS AKIA…/GitHub ghp_…/Slack xoxb-…/…) regardless of name (HIGH), or a high-entropy suspect token (MEDIUM — verify before reporting). Verify a frontend/JS secret live via drive_devtools (inspect the JS bundle / network response and confirm the key is actually exposed), and for a backend secret confirm it is reachable/valid. A static hit is a HYPOTHESIS until verified live — never report unverified. For a repo, also scan_git_history(root) — secrets DELETED from HEAD still live in .git history (the removed-later-is-not-fixed trap), and it feeds every recovered pre-deletion blob through the same secret detector. Once you recover a credential, prove it is still ACTIVE with validate_leaked_key(apiBase, endpoints, key|blobUrl) — a READ-ONLY differential test (401-without-key vs 200-with-key = auth bypass PROVEN). Two supply-chain detectors: dependency_confusion (a manifest/build file resolving a package from a public registry — pypi.org/npmjs.org --extra-index-url, or a scoped @company/pkg with no private registry) and ml_supply_chain (torch.load without weights_only=True / joblib.load / np.load(allow_pickle=True) / keras load_model on an untrusted model → pickle RCE). Rust is supported end-to-end: the taint engine (blitz_scan / taint_file) maps Rust sinks (std::process::Command, sqlx/diesel, reqwest/hyper, std::fs, serde/bincode) to the classic classes, plus two Rust-specific detectors — rust_unsafe (transmute / assume_init / from_raw_parts / ptr::* — memory-unsafety surface, CWE-119) and rust_format_string (println!/format! with a variable as the format string — CWE-134). The sqlx query! compile-time macro is treated as safe (suppressed). Two more web-class detectors: jwt_alg_confusion (a JWT verifier that dispatches on the token's alg header and accepts BOTH RS256 and HS256, with the HS256 HMAC secret derived from public/shared key material — CWE-347; the attacker sets alg=HS256 and signs with the public key to forge admin tokens) and cache_deception (a reverse proxy caching static-extension URLs with a cache key that omits the session cookie, over a session-authenticated backend — CWE-525; the victim's cached private response is re-fetched anonymously). TO TRY a jwt_alg_confusion hit: fetch the public key (/.well-known/jwks.json), forge an HS256 token signed with that public key, and confirm admin access. TO TRY a cache_deception hit: request an authenticated path with a static extension appended (.css/.js) and re-fetch it anonymously. Three more detectors: cors_misconfiguration (Access-Control-Allow-Origin reflects the request Origin or is '*' while credentials are true — CWE-942; any site reads the victim's authenticated responses), xss (user input into a DOM sink — innerHTML / dangerouslySetInnerHTML / document.write / .html() / eval — CWE-79), and subdomain_takeover (a dangling CNAME/AliasTarget to a claimable service like *.github.io/*.herokuapp.com/*.amazonaws.com — CWE-404). TO TRY a cors hit: send an evil Origin + confirm the response echoes it with Allow-Credentials:true. TO TRY an xss hit: confirm the sink executes (drive_devtools). TO TRY a takeover hit: verify the CNAME target resolves to an unclaimed/not-found page. Two more client-side detectors: postmessage_no_origin_check (a window message listener that reads event.data but never validates event.origin — CWE-345; any site can drive the handler) and client_trusted_flag (a privilege/entitlement flag like isAdmin/withVip/premium read from request input and used in a security decision — CWE-807/639; derive the flag from server state, never the client). TO TRY a postMessage hit: send a crafted message from an attacker origin and confirm the handler acts on it. TO TRY a client-trusted-flag hit: flip the flag param to true and confirm the privilege is actually granted. WEB3: for Solidity/EVM, call web3_audit(code|path) — a deterministic 13-class smart-contract audit (reentrancy incl. ERC721/ERC1155 callback reentrancy, unchecked return, unchecked arithmetic, tx.origin auth, signature replay, unprotected selfdestruct, delegatecall-to-user-input, missing access control, timestamp dependence, spot-price oracle manipulation incl. slot0/latestRoundData, unbounded loop, abi.encodePacked hash collision, missing address(0) validation) returning ranked findings (class/CWE/severity/line), then foundry_poc(class, contract) to generate an executable Foundry test, and foundry_run(contract_code, poc_code|class_) to actually EXECUTE it — a PASSING PoC test is the proof that the exploit reproduces (deterministic: forge's own test verdict). A web3 hit is a HYPOTHESIS until the Foundry PoC reproduces it.\n" + `PRECISION ANALYSIS — chrome-devtools MCP is MANDATORY, not optional:
|
|
63184
|
+
` + "TWO PATHS:\\n" + "- Source path on disk -> blitz_scan / taint_file / eagle_eye2 (static).\\n" + "- Live URL -> live_recon / active_scan / strike_verify (web-hunting).\\n\\n" + "DEEPEN A FINDING: attack_plan(target, tech, params) to get the prioritized vector plan (decide what to test next with data); list_chains (escalation), chain_links (compose), technique_lookup(cls), payload_lookup, bypass_lookup (blocked). Ground any detector hit empirically with pattern_lookup(id) — it returns the class's CWE, real-world signature, escalation chains, citable references, per-class bypass techniques, and the high-value assets (crown jewels) that class hits, so a raw hit becomes a class-aware finding. Resolve free-form terminology first with synonym_lookup(term) (IDOR/BOLA/SQLi/prompt-injection → canonical id). For an llm_injection hit, its pattern carries a validation discipline — the RUN-TWICE RULE (reproduce token-for-token across two fresh sessions), NON-GUESSABLE ANCHOR (must leak a real key/URL, not a plausible guess), and OOB PROOF (a verifiable callback log) — apply all three before reporting. BEFORE generating a report, run submission_gate(...) and only ship a finding that passes all 7 questions (reproducible, in-scope, real-impact, no-privileged-assumption, verified-live, evidence-redacted, severity-derived); one false = kill it. Generate the concrete reproduction recipe with auto_poc(type, base_url, endpoint, param) — it emits the exact marker request + negative control + expected differential + Patchstack-style title, so 'reproducible' is executable, not abstract. Calibrate severity with severity_calibrate(type, cvss) to get a P1–P5 tier + VRT-style category. Start each engagement with engagement_scaffold(target, scope) for the folder + scope.md structure, and check data_refresh() to confirm the data layers are consistent. Phase doctrine: read_skill(bs-orchestrate-engagement | bs-web-hunting | bs-source-audit | bs-verify-finding). Campaign plan: read_playbook(target-type). On any failure call retry_guidance(signal) / model_fallback(signal) before giving up. HUNTING DOCTRINE (maximize payout rate): (1) SIBLING RULE — if one endpoint requires auth, check every sibling (/export /delete /share); ~30% of paid IDOR/auth bugs come from siblings — AUTOMATE it with sibling_scan(base_url, endpoint, token_a, token_b), the deterministic live logic-bug prober (sibling enumeration + differential IDOR + auth matrix + mass assignment + rate limit, evidence-first). (2) A→B SIGNAL — a confirmed bug signals a class of developer mistake; hunt B and C (20-min box) before reporting. (3) TWO-ACCOUNT IDOR — always test with attacker account A reading victim account B, and state it in the report. (4) PoC ESCALATION — IDOR shows victim data (not 200), XSS shows cookie exfil (not alert), SSRF shows internal response (not DNS), SQLi shows DB content (not error). (5) FOLLOW THE MONEY — billing/credits/refunds/wallet flows. (6) Kill weak findings with kill_list(type) BEFORE the gate — missing headers, self-XSS, open-redirect-alone, SSRF-DNS-only, GraphQL-introspection-alone are always N/A standalone. (7) CI/CD + SAML/SSO are critical attack surfaces (pull_request_target, expression injection, XML signature wrapping, comment injection). Full doctrine: hunting_doctrine(). WHAT TO HUNT NEXT: watchlist() returns the ranked CWE frequency + high-value CVEs with payout + a saturated flag (prioritize high-freq/high-payout/not-saturated: missing-authz, SQLi, SSRF, deserialization; skip saturated XSS/CSRF/open-redirect unless they chain into takeover). The CVE watchlist now spans 4,000+ product fingerprints (live from nuclei-templates when installed — refresh with sync_cve_corpus() before a big recon pass); live_recon's suggested_cves names the SPECIFIC CVE for the detected product/version — then cve_verify(cve, target) CONFIRMS it live by running the matching nuclei template (VERIFIED only when nuclei actually matches; a CVE is report-ready only after cve_verify, never from the fingerprint alone). For 'scan this target' automation, nuclei_scan(target) fingerprints the stack and runs the WHOLE matched template set (CVE templates + optional broad tech-tag) in one rate-limited pass — use it instead of verifying CVEs one-by-one. SURFACE-FIRST: surface_map(surface) maps an attack surface (image/redirect proxy, edge cache, payment portal, AI agent, file service, Electron, SSO) to its highest-value tests — map surfaces then test, don't spray payloads; then param_surface(target, class) discovers EVERY testable parameter (URL query, form fields, /users/123 path ids + UUIDs, JS refs) + per-class specialist hints — test the DISCOVERED params, not just the hinted one. PRECISION GUARD: resolve_check(host) detects when an ISP/country redirects the domain to a blocking/sinkhole page (gambling/adult/streaming niches) — audit the PUBLIC IP, never the sinkhole.\n" + "KNOWLEDGE BASE (discover, don't guess): skillLookup(topic) / listSkills for the 40 attack-path + hunting skills (ap-*, hp-*, bs-*); list_attack_vectors / attack_vectors(cat) for the 34-category vector taxonomy; taxonomy(kind) for OWASP/CWE/ASVS/API-top-10; read_playbook(type) for the 17 campaign playbooks; list_manuals / read_tool_manual for 317 tool references; list_tools / run_catalog_tool for the 141-tool catalog. Every tool, skill, and data layer is reachable from these. CROSS-TARGET INTELLIGENCE: strike_resolve auto-records confirmed/false_positive verdicts into the empirical ledger; query it with intelligence(action=hit_rates/top_vectors/recall) so a new target on a known tech inherits historical hit-rates (attack_plan already blends them into success_probability). intelligence(action=recall, tech, target) is the per-engagement pattern recall — it returns which patterns historically CONFIRMED on that tech (prioritize them) versus which only ever produced false positives (avoid them), so a new engagement starts from the empirical playbook of past ones. LIVE PENTEST + TARGETING (black-box, WAF-safe): cache_gap(base_url, endpoint) fuzzes path-normalization + static-extension variants for cache deception/poisoning; blind_oracle(base_url, param, value) detects which SINK a param reaches (sql/ssti/xss) via benign arithmetic (id=1+0, test${7*7}) WITHOUT a malicious payload; param_precedence(base_url, param, A, B) maps duplicate-parameter precedence (first/last-wins) for WAF-bypass; broken_link_scan(url) detects expired-domain takeover (crawls outbound refs → DNS/RDAP → flags claimable domains). Logic-bug live probers: jwt_forge(token, endpoint, …) forges JWT confusion tokens (alg:none / RS256→HS256 key-confusion / kid-jku-x5u) and proves which is ACCEPTED live; proto_pollution_probe(target, endpoint) sends __proto__ / constructor.prototype JSON canaries and reports VERIFIED only on reflection; smuggling_test(target) sends CL.TE / TE.CL desync probes over a raw connection. OOB (out-of-band) PROOF for BLIND vulns: oob_start() spins an interactsh listener (unique *.oast.* domain, streams DNS/HTTP interactions — the standard for public targets) or a local HTTP listener for local labs; inject the canary, then oob_poll(id) until the hit arrives; oob_stop(id) to clean up. A blind SSRF/XXE/SQLi/command-injection is CONFIRMED only when the canary actually arrives — never from a guess. SOURCE TARGETING: review_harness(path) FIRST for full coverage — it applies a fixed 5-signal rubric (entry_points/auth_gates/sinks/secrets/logic_bugs) to EVERY source file and sorts the signal-dense ones first (a complete map, not a partial scan); then action_surface(code) maps every wp_ajax_* action to its vuln class + DERIVED priority (what to look for WHERE); security_state(sanitizers, sink) gives a wrong-context sanitization verdict; framework_knowledge(framework) returns auth/nonce primitives for 9 frameworks; variant_scan(root, signature) mass-sweeps an install base for ONE bug family; patch_analyze(old, new) REVERSES a security patch into the 0-day, and its mine_signature feeds variant_scan to sweep unpatched copies. All of these are DETECTION HINTS — verify each live (strike_verify / browser_validate) before it enters the report. NEWEST DETECTORS — understand AND try them: variant_scan also emits priv_esc (privilege escalation — a role/capability/user change fed by request input, traced cross-file via reverse call-graph, e.g. set_role($id, sanitize_key($_POST['um-role'])) or update_user_meta(...,'wp_capabilities', $_POST[...])) and flags uploadAllow=>array('all') unrestricted-upload configs as file_upload (the file-manager/connector shape). TO TRY a priv_esc hit: submit the role field with 'administrator' (or send wp_capabilities meta) and confirm the account actually gains admin. TO TRY an unrestricted-upload hit: POST a .php/.phtml and confirm it lands web-reachable + executes. variant_scan also emits hardcoded_secret (CWE-798) in three tiers: a secret field (api_key/db_password/access_token/aws_*) assigned a literal (HIGH), a known secret FORMAT (JWT eyJ…/AWS AKIA…/GitHub ghp_…/Slack xoxb-…/…) regardless of name (HIGH), or a high-entropy suspect token (MEDIUM — verify before reporting). Verify a frontend/JS secret live via drive_devtools (inspect the JS bundle / network response and confirm the key is actually exposed), and for a backend secret confirm it is reachable/valid. A static hit is a HYPOTHESIS until verified live — never report unverified. For a repo, also scan_git_history(root) — secrets DELETED from HEAD still live in .git history (the removed-later-is-not-fixed trap), and it feeds every recovered pre-deletion blob through the same secret detector. Once you recover a credential, prove it is still ACTIVE with validate_leaked_key(apiBase, endpoints, key|blobUrl) — a READ-ONLY differential test (401-without-key vs 200-with-key = auth bypass PROVEN). Two supply-chain detectors: dependency_confusion (a manifest/build file resolving a package from a public registry — pypi.org/npmjs.org --extra-index-url, or a scoped @company/pkg with no private registry) and ml_supply_chain (torch.load without weights_only=True / joblib.load / np.load(allow_pickle=True) / keras load_model on an untrusted model → pickle RCE). Rust is supported end-to-end: the taint engine (blitz_scan / taint_file) maps Rust sinks (std::process::Command, sqlx/diesel, reqwest/hyper, std::fs, serde/bincode) to the classic classes, plus two Rust-specific detectors — rust_unsafe (transmute / assume_init / from_raw_parts / ptr::* — memory-unsafety surface, CWE-119) and rust_format_string (println!/format! with a variable as the format string — CWE-134). The sqlx query! compile-time macro is treated as safe (suppressed). Two more web-class detectors: jwt_alg_confusion (a JWT verifier that dispatches on the token's alg header and accepts BOTH RS256 and HS256, with the HS256 HMAC secret derived from public/shared key material — CWE-347; the attacker sets alg=HS256 and signs with the public key to forge admin tokens) and cache_deception (a reverse proxy caching static-extension URLs with a cache key that omits the session cookie, over a session-authenticated backend — CWE-525; the victim's cached private response is re-fetched anonymously). TO TRY a jwt_alg_confusion hit: fetch the public key (/.well-known/jwks.json), forge an HS256 token signed with that public key, and confirm admin access. TO TRY a cache_deception hit: request an authenticated path with a static extension appended (.css/.js) and re-fetch it anonymously. Three more detectors: cors_misconfiguration (Access-Control-Allow-Origin reflects the request Origin or is '*' while credentials are true — CWE-942; any site reads the victim's authenticated responses), xss (user input into a DOM sink — innerHTML / dangerouslySetInnerHTML / document.write / .html() / eval — CWE-79), and subdomain_takeover (a dangling CNAME/AliasTarget to a claimable service like *.github.io/*.herokuapp.com/*.amazonaws.com — CWE-404). TO TRY a cors hit: send an evil Origin + confirm the response echoes it with Allow-Credentials:true. TO TRY an xss hit: confirm the sink executes (drive_devtools). TO TRY a takeover hit: verify the CNAME target resolves to an unclaimed/not-found page. Two more client-side detectors: postmessage_no_origin_check (a window message listener that reads event.data but never validates event.origin — CWE-345; any site can drive the handler) and client_trusted_flag (a privilege/entitlement flag like isAdmin/withVip/premium read from request input and used in a security decision — CWE-807/639; derive the flag from server state, never the client). TO TRY a postMessage hit: send a crafted message from an attacker origin and confirm the handler acts on it. TO TRY a client-trusted-flag hit: flip the flag param to true and confirm the privilege is actually granted. WEB3: for Solidity/EVM, call web3_audit(code|path) — a deterministic 13-class smart-contract audit (reentrancy incl. ERC721/ERC1155 callback reentrancy, unchecked return, unchecked arithmetic, tx.origin auth, signature replay, unprotected selfdestruct, delegatecall-to-user-input, missing access control, timestamp dependence, spot-price oracle manipulation incl. slot0/latestRoundData, unbounded loop, abi.encodePacked hash collision, missing address(0) validation) returning ranked findings (class/CWE/severity/line), then foundry_poc(class, contract) to generate an executable Foundry test, and foundry_run(contract_code, poc_code|class_) to actually EXECUTE it — a PASSING PoC test is the proof that the exploit reproduces (deterministic: forge's own test verdict). A web3 hit is a HYPOTHESIS until the Foundry PoC reproduces it.\n" + `PRECISION ANALYSIS — chrome-devtools MCP is MANDATORY, not optional:
|
|
63082
63185
|
` + `- When a lead needs DOM/JS precision — DOM-XSS sink execution, AJAX endpoint + payload interception, JS runtime errors, redirect chains, SSO/token flow, or anything a static HTML glance cannot prove — call drive_devtools(target). It spawns chrome-devtools-mcp and drives a REAL headless browser (navigate -> list_network_requests -> list_console_messages -> evaluate_script), giving reproducible evidence instead of a guess.
|
|
63083
63186
|
` + `- Before calling it, check_mcp() to confirm the browser MCP is available; if not, blitzstrike install-tools or npm i -g chrome-devtools-mcp. Never substitute eyeballing minified JS or a static sink guess when a live browser can PROVE it. This is the precision + consistency layer.
|
|
63084
63187
|
` + "EXTERNAL MCP SERVERS (verified, connect them — NOT one-shot CLIs): chrome-devtools-mcp (29 tools: list_network_requests/get_network_request for raw HTTP interception, list_console_messages for JS errors + DOM-XSS, evaluate_script to run JS, take_screenshot) -> stdio chrome-devtools-mcp --headless --chromeArg=--no-sandbox --chromeArg=--disable-gpu (as root/container this is MANDATORY or the browser crashes; add --proxyServer http://127.0.0.1:8080 to route through Burp, --acceptInsecureCerts for bad TLS). burp-suite-mcp (proxy history + active scan + repeater) -> NOT npm: build the JAR (git clone https://github.com/PortSwigger/mcp-server.git && cd mcp-server && ./gradlew embedProxyJar), load it in Burp Extensions, then connect the client to http://127.0.0.1:9876 (SSE) or the stdio proxy java -jar mcp-proxy-all.jar --sse-url http://127.0.0.1:9876."
|
|
@@ -63969,7 +64072,7 @@ ${statusLine}` : statusLine },
|
|
|
63969
64072
|
let src = code;
|
|
63970
64073
|
if (!src && path) {
|
|
63971
64074
|
try {
|
|
63972
|
-
src =
|
|
64075
|
+
src = readFileSync32(path, "utf8");
|
|
63973
64076
|
} catch {
|
|
63974
64077
|
return { content: [{ type: "text", text: JSON.stringify({ error: "unreadable path" }) }] };
|
|
63975
64078
|
}
|
|
@@ -64050,7 +64153,7 @@ ${statusLine}` : statusLine },
|
|
|
64050
64153
|
let src = code;
|
|
64051
64154
|
if (!src && path) {
|
|
64052
64155
|
try {
|
|
64053
|
-
src =
|
|
64156
|
+
src = readFileSync32(path, "utf8");
|
|
64054
64157
|
} catch {
|
|
64055
64158
|
return { content: [{ type: "text", text: JSON.stringify({ error: "unreadable path" }) }] };
|
|
64056
64159
|
}
|
|
@@ -64161,7 +64264,11 @@ ${statusLine}` : statusLine },
|
|
|
64161
64264
|
target: string2().describe("Target URL, e.g. https://target.com")
|
|
64162
64265
|
}
|
|
64163
64266
|
}, async ({ cve, target }) => {
|
|
64164
|
-
|
|
64267
|
+
const r = cveVerify(cve, target);
|
|
64268
|
+
if (r.status === "verified") {
|
|
64269
|
+
recordVerdict({ vector: "cve", outcome: "confirmed", target, severity: r.matched[0]?.severity });
|
|
64270
|
+
}
|
|
64271
|
+
return { content: [{ type: "text", text: JSON.stringify(r) }] };
|
|
64165
64272
|
});
|
|
64166
64273
|
server.registerTool("nuclei_scan", {
|
|
64167
64274
|
title: "Fingerprint-driven full DAST scan via nuclei",
|
|
@@ -64175,7 +64282,21 @@ ${statusLine}` : statusLine },
|
|
|
64175
64282
|
max: number2().optional().describe("Max findings to return (default 50)")
|
|
64176
64283
|
}
|
|
64177
64284
|
}, async (opts) => {
|
|
64178
|
-
|
|
64285
|
+
const r = await nucleiScan(opts);
|
|
64286
|
+
for (const f of r.findings) {
|
|
64287
|
+
recordVerdict({ vector: "cve", outcome: "confirmed", target: opts.target, severity: f.severity });
|
|
64288
|
+
}
|
|
64289
|
+
return { content: [{ type: "text", text: JSON.stringify(r) }] };
|
|
64290
|
+
});
|
|
64291
|
+
server.registerTool("param_surface", {
|
|
64292
|
+
title: "Autonomous parameter discovery — extract every testable parameter",
|
|
64293
|
+
description: "Fetch a target and extract EVERY testable parameter (URL query params, HTML form fields, path-segment identifiers /users/123 + UUIDs, JS-referenced endpoints) — then attach per-class discovery + test hints. Pass a class (xss/sqli/ssrf/idor/lfi/rce/xxe/jwt/open_redirect/prototype_pollution/csti/mass_assignment/header_injection/api_security/file_upload) to filter the specialist hints, or no class to get all 15. Test the discovered params (not just the hinted one) — e.g. an XSS hint about ?category= may hide a vulnerable searchTerm form field.",
|
|
64294
|
+
inputSchema: {
|
|
64295
|
+
target: string2().describe("Target URL, e.g. https://target.com"),
|
|
64296
|
+
class_: string2().optional().describe("Vuln class to filter specialist hints (default: all)")
|
|
64297
|
+
}
|
|
64298
|
+
}, async ({ target, class_ }) => {
|
|
64299
|
+
return { content: [{ type: "text", text: JSON.stringify(await paramSurface(target, class_)) }] };
|
|
64179
64300
|
});
|
|
64180
64301
|
server.registerTool("jwt_forge", {
|
|
64181
64302
|
title: "Forge JWT confusion tokens and verify which is accepted live",
|
|
@@ -64189,7 +64310,11 @@ ${statusLine}` : statusLine },
|
|
|
64189
64310
|
public_key: string2().optional().describe("Public key (PEM) to sign HS256 with for the key-confusion attack")
|
|
64190
64311
|
}
|
|
64191
64312
|
}, async (opts) => {
|
|
64192
|
-
|
|
64313
|
+
const r = await jwtForge(opts);
|
|
64314
|
+
if (r.status === "ok" && r.forged.some((f) => f.accepted)) {
|
|
64315
|
+
recordVerdict({ vector: "jwt_alg_confusion", outcome: "confirmed", target: opts.endpoint });
|
|
64316
|
+
}
|
|
64317
|
+
return { content: [{ type: "text", text: JSON.stringify(r) }] };
|
|
64193
64318
|
});
|
|
64194
64319
|
server.registerTool("proto_pollution_probe", {
|
|
64195
64320
|
title: "Probe for prototype pollution with a reflection canary",
|
|
@@ -64201,7 +64326,11 @@ ${statusLine}` : statusLine },
|
|
|
64201
64326
|
param: string2().optional().describe("JSON key to nest the poison under (default 'data')")
|
|
64202
64327
|
}
|
|
64203
64328
|
}, async (opts) => {
|
|
64204
|
-
|
|
64329
|
+
const r = await protoPollutionProbe(opts);
|
|
64330
|
+
if (r.status === "verified") {
|
|
64331
|
+
recordVerdict({ vector: "prototype_pollution", outcome: "confirmed", target: opts.target });
|
|
64332
|
+
}
|
|
64333
|
+
return { content: [{ type: "text", text: JSON.stringify(r) }] };
|
|
64205
64334
|
});
|
|
64206
64335
|
server.registerTool("smuggling_test", {
|
|
64207
64336
|
title: "Detect HTTP request-smuggling (CL.TE / TE.CL) desync live",
|
|
@@ -64210,7 +64339,11 @@ ${statusLine}` : statusLine },
|
|
|
64210
64339
|
target: string2().describe("Target URL, e.g. https://target.com")
|
|
64211
64340
|
}
|
|
64212
64341
|
}, async ({ target }) => {
|
|
64213
|
-
|
|
64342
|
+
const r = await smugglingTest(target);
|
|
64343
|
+
if (r.status === "desync") {
|
|
64344
|
+
recordVerdict({ vector: "http_request_smuggling", outcome: "confirmed", target });
|
|
64345
|
+
}
|
|
64346
|
+
return { content: [{ type: "text", text: JSON.stringify(r) }] };
|
|
64214
64347
|
});
|
|
64215
64348
|
server.registerTool("auto_poc", {
|
|
64216
64349
|
title: "Auto-PoC — generate a copy-paste-ready reproduction recipe",
|
|
@@ -64831,7 +64964,7 @@ ${statusLine}` : statusLine },
|
|
|
64831
64964
|
description: "Route confusion (separate class from source→sink taint): detect attacker-controlled dispatch (call_user_func/forward/dispatch), dynamic method calls ($obj->$m()), dynamic include (LFI), batch/proxy forwarding without per-route auth re-check, and route matching without path normalization.",
|
|
64832
64965
|
inputSchema: { path: string2().describe("Source file path (PHP)") }
|
|
64833
64966
|
}, async ({ path }) => {
|
|
64834
|
-
const code =
|
|
64967
|
+
const code = readFileSync32(path, "utf8");
|
|
64835
64968
|
const findings = detectRouteConfusion(code, path);
|
|
64836
64969
|
return {
|
|
64837
64970
|
content: [{
|
|
@@ -64845,7 +64978,7 @@ ${statusLine}` : statusLine },
|
|
|
64845
64978
|
description: "Complex-bug detection beyond taint: deserialization→POP gadget chain (unserialize + magic method), type juggling (loose ==/!= vs hash/secret), mass assignment (extract/parse_str without a safe flag), prototype pollution (unsafe merge of request data), CRLF/header injection (user input into a header), path confusion (user input into a file path without canonicalization), SSRF (user-controlled URL with no host allowlist), XXE (user XML parsed without disabling entities), SSTI (user input into a template render with no sandbox), wrong-context sanitization (sanitize_text_field() into a SQL query), missing authorization/nonce on WordPress entry points (wp_ajax_* / admin_post_* / register_rest_route without current_user_can, nonce verification, or permission_callback), CORS misconfiguration (reflected/wildcard origin + credentials), XSS (user input into a DOM sink: innerHTML / dangerouslySetInnerHTML / document.write / .html / eval), and subdomain takeover (CNAME/AliasTarget to a claimable service).",
|
|
64846
64979
|
inputSchema: { path: string2().describe("Source file path") }
|
|
64847
64980
|
}, async ({ path }) => {
|
|
64848
|
-
const code =
|
|
64981
|
+
const code = readFileSync32(path, "utf8");
|
|
64849
64982
|
const findings = detectComplexBugs(code, path);
|
|
64850
64983
|
return {
|
|
64851
64984
|
content: [{
|
|
@@ -64931,7 +65064,7 @@ ${statusLine}` : statusLine },
|
|
|
64931
65064
|
let lang = language;
|
|
64932
65065
|
if (path && !code) {
|
|
64933
65066
|
try {
|
|
64934
|
-
src =
|
|
65067
|
+
src = readFileSync32(path, "utf8");
|
|
64935
65068
|
} catch {
|
|
64936
65069
|
return { content: [{ type: "text", text: JSON.stringify({ error: `cannot read ${path}` }) }] };
|
|
64937
65070
|
}
|
|
@@ -65180,15 +65313,15 @@ async function serve() {
|
|
|
65180
65313
|
|
|
65181
65314
|
// src/index.ts
|
|
65182
65315
|
init_cli();
|
|
65183
|
-
import { readFileSync as
|
|
65184
|
-
import { join as
|
|
65185
|
-
import { fileURLToPath as
|
|
65186
|
-
var
|
|
65316
|
+
import { readFileSync as readFileSync36, existsSync as existsSync19 } from "node:fs";
|
|
65317
|
+
import { join as join34 } from "node:path";
|
|
65318
|
+
import { fileURLToPath as fileURLToPath22 } from "node:url";
|
|
65319
|
+
var ROOT15 = join34(fileURLToPath22(new URL(".", import.meta.url)), "..");
|
|
65187
65320
|
function readVersion() {
|
|
65188
65321
|
try {
|
|
65189
|
-
const p =
|
|
65322
|
+
const p = join34(ROOT15, "package.json");
|
|
65190
65323
|
if (existsSync19(p))
|
|
65191
|
-
return JSON.parse(
|
|
65324
|
+
return JSON.parse(readFileSync36(p, "utf8")).version ?? "1.0.0";
|
|
65192
65325
|
} catch {}
|
|
65193
65326
|
return "1.0.0";
|
|
65194
65327
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Specialist discovery heuristics: per vulnerability class, WHERE to discover the parameters to test and WHAT tool/technique to drive. Derived from public multi-agent scanner methodology (generalized — no source brand).",
|
|
3
|
+
"classes": [
|
|
4
|
+
{ "id": "xss", "discover": "every reflected param (URL query + form field) + JS template sinks (dangerouslySetInnerHTML, innerHTML)", "test": "blind_oracle (sink detection) + drive_devtools (confirm execution)", "tools": ["blind_oracle", "drive_devtools", "browser_validate"] },
|
|
5
|
+
{ "id": "sqli", "discover": "every query param + hidden form fields + CSRF tokens (SQLi can live in token validation)", "test": "blind_oracle (arithmetic id=1+0 vs id=1+1) + boolean/time inference", "tools": ["blind_oracle", "active_scan"] },
|
|
6
|
+
{ "id": "ssrf", "discover": "URL-typed params (callback, url, redirect, webhook, img, proxy, fetch) + webhook-verification callbacks", "test": "blind_oracle + oob_start (canary URL must arrive)", "tools": ["blind_oracle", "oob_start", "oob_poll"] },
|
|
7
|
+
{ "id": "idor", "discover": "path segments (/users/123) + UUIDs + sequential numeric ids in URLs", "test": "sibling_scan (differential IDOR attacker A → victim B)", "tools": ["sibling_scan", "active_scan"] },
|
|
8
|
+
{ "id": "lfi", "discover": "file/read/path/include params (file, page, template, include, lang, path)", "test": "path traversal ../ sequences + encoding bypass", "tools": ["blind_oracle", "active_scan"] },
|
|
9
|
+
{ "id": "rce", "discover": "command/code params (cmd, exec, ping, host, ip, eval) + deserialization endpoints", "test": "command injection i'''d / brace expansion + deserialization gadgets", "tools": ["blind_oracle", "oob_start"] },
|
|
10
|
+
{ "id": "xxe", "discover": "XML upload endpoints + multipart forms + Content-Type: application/xml", "test": "XXE file disclosure + SSRF via XML parser + blind XXE via oob", "tools": ["oob_start", "oob_poll"] },
|
|
11
|
+
{ "id": "jwt", "discover": "JWT patterns in URL params, body, cookies, localStorage, Authorization header (eyJ…)", "test": "jwt_analyze (parse + vectors) + jwt_forge (alg:none / RS256→HS256) live", "tools": ["jwt_analyze", "jwt_forge"] },
|
|
12
|
+
{ "id": "open_redirect", "discover": "redirect/next/return/url params + OAuth redirect_uri", "test": "redirect to attacker-controlled URL (/%09/ // /\\ @ prefixes)", "tools": ["blind_oracle", "active_scan"] },
|
|
13
|
+
{ "id": "prototype_pollution", "discover": "JSON POST acceptance (Content-Type: application/json) + merge/deep-extend endpoints", "test": "proto_pollution_probe (__proto__ / constructor.prototype canary)", "tools": ["proto_pollution_probe"] },
|
|
14
|
+
{ "id": "csti", "discover": "Angular/Vue/React template sinks + {{ }} interpolation in reflected params", "test": "{{7*7}} / ${7*7} arithmetic reflection", "tools": ["blind_oracle", "drive_devtools"] },
|
|
15
|
+
{ "id": "mass_assignment", "discover": "user-create/update endpoints + profile/payment POST bodies", "test": "inject role/is_admin/permissions/price/total fields", "tools": ["sibling_scan", "active_scan"] },
|
|
16
|
+
{ "id": "header_injection", "discover": "header-reflecting params (host, x-forwarded-for, location, redirect)", "test": "CRLF injection + host-header cache poisoning", "tools": ["param_precedence", "active_scan"] },
|
|
17
|
+
{ "id": "api_security", "discover": "REST/GraphQL routes + method tampering (GET↔POST↔PUT) + GraphQL introspection", "test": "horizontal/vertical privilege + method override", "tools": ["sibling_scan", "active_scan", "discover_api"] },
|
|
18
|
+
{ "id": "file_upload", "discover": "multipart upload endpoints + avatar/import/attachment forms", "test": "extension/content-type bypass → web-reachable .php/.phtml", "tools": ["active_scan", "strike_verify"] }
|
|
19
|
+
]
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blitzstrike",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.122",
|
|
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": {
|