blitzstrike 2.4.42 → 2.4.43
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 +12 -0
- package/dist/index.js +55 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ 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.43] — 2026-09-14
|
|
9
|
+
|
|
10
|
+
### Added — Race Condition / TOCTOU Tester (concurrency oracle)
|
|
11
|
+
|
|
12
|
+
- New `src/race-test.ts`: detect TOCTOU races + idempotency violations — fire
|
|
13
|
+
a CONCURRENT BURST of N identical requests and count how many succeed. If
|
|
14
|
+
more than `expected_max` (default 1) succeed, the operation is not atomic
|
|
15
|
+
under concurrency (double-spend, duplicate orders, discount abuse).
|
|
16
|
+
- New `race_test` tool: success criterion is a caller-supplied regex (the
|
|
17
|
+
"marker" of a committed side effect). Pure `classifyRace` + `requestSignature`
|
|
18
|
+
for deterministic, testable logic.
|
|
19
|
+
|
|
8
20
|
## [2.4.42] — 2026-09-14
|
|
9
21
|
|
|
10
22
|
### Added — Duplicate Parameter Precedence Fuzzer (WAF-bypass oracle)
|
package/dist/index.js
CHANGED
|
@@ -57709,6 +57709,47 @@ async function paramPrecedenceScan(baseUrl, param, valueA, valueB, opts = {}) {
|
|
|
57709
57709
|
};
|
|
57710
57710
|
}
|
|
57711
57711
|
|
|
57712
|
+
// src/race-test.ts
|
|
57713
|
+
function classifyRace(input) {
|
|
57714
|
+
const race = input.successes > input.expected_max;
|
|
57715
|
+
return {
|
|
57716
|
+
race,
|
|
57717
|
+
verdict: race ? `race condition / idempotency violation — ${input.successes} of ${input.total} concurrent requests succeeded (expected ≤ ${input.expected_max}).` : `no race — ${input.successes} of ${input.total} succeeded (within expected ${input.expected_max}).`
|
|
57718
|
+
};
|
|
57719
|
+
}
|
|
57720
|
+
async function raceTest(input) {
|
|
57721
|
+
const method = input.method ?? "POST";
|
|
57722
|
+
const N = input.concurrent ?? 10;
|
|
57723
|
+
const expected = input.expected_max ?? 1;
|
|
57724
|
+
const successRe = new RegExp(input.success_pattern, "i");
|
|
57725
|
+
const timeoutMs = input.timeoutMs ?? 1e4;
|
|
57726
|
+
const headers = { "User-Agent": "Mozilla/5.0 (blitzstrike race probe)", ...input.headers ?? {} };
|
|
57727
|
+
const doFetch = async () => {
|
|
57728
|
+
try {
|
|
57729
|
+
const r = await fetch(input.url, { method, body: input.body, headers, redirect: "manual", signal: AbortSignal.timeout(timeoutMs) });
|
|
57730
|
+
return { status: r.status, body: await r.text() };
|
|
57731
|
+
} catch (e) {
|
|
57732
|
+
return { status: 0, body: "", error: String(e) };
|
|
57733
|
+
}
|
|
57734
|
+
};
|
|
57735
|
+
const results = await Promise.all(Array.from({ length: N }, () => doFetch()));
|
|
57736
|
+
const successes = results.filter((r) => r.status > 0 && successRe.test(r.body)).length;
|
|
57737
|
+
const errors = results.filter((r) => r.error).length;
|
|
57738
|
+
const verdict = classifyRace({ successes, total: N, expected_max: expected });
|
|
57739
|
+
return {
|
|
57740
|
+
url: input.url,
|
|
57741
|
+
method,
|
|
57742
|
+
concurrent_requests: N,
|
|
57743
|
+
expected_max: expected,
|
|
57744
|
+
concurrent_successes: successes,
|
|
57745
|
+
fetch_errors: errors,
|
|
57746
|
+
success_rate: Number((successes / N).toFixed(3)),
|
|
57747
|
+
race_detected: verdict.race,
|
|
57748
|
+
verdict: verdict.verdict,
|
|
57749
|
+
detail: verdict.race ? "multiple concurrent requests each passed the check before any committed the side effect (TOCTOU)." : "the operation appears atomic/idempotent under this concurrency (a tighter single-packet burst via HTTP/2 may still win; this is a parallel-request approximation)."
|
|
57750
|
+
};
|
|
57751
|
+
}
|
|
57752
|
+
|
|
57712
57753
|
// src/enterprise-benchmark.ts
|
|
57713
57754
|
import { existsSync as existsSync11, readFileSync as readFileSync20, readdirSync as readdirSync6, statSync as statSync3 } from "node:fs";
|
|
57714
57755
|
import { join as join18, resolve } from "node:path";
|
|
@@ -58737,6 +58778,20 @@ ${statusLine}` : statusLine },
|
|
|
58737
58778
|
}, async ({ base_url, param, value_a, value_b }) => {
|
|
58738
58779
|
return { content: [{ type: "text", text: JSON.stringify(await paramPrecedenceScan(base_url, param, value_a, value_b)) }] };
|
|
58739
58780
|
});
|
|
58781
|
+
server.registerTool("race_test", {
|
|
58782
|
+
title: "Race condition / TOCTOU tester (concurrency oracle)",
|
|
58783
|
+
description: "LIVE (black-box): detect TOCTOU race conditions + idempotency violations — fire a sanity request, then a CONCURRENT BURST of N identical requests, and count how many succeed. If more than expected_max succeed, the operation is not atomic under concurrency (double-spend, duplicate orders, discount abuse, mass action). Deterministic: success is a caller-supplied regex.",
|
|
58784
|
+
inputSchema: {
|
|
58785
|
+
url: string2().describe("Full request URL"),
|
|
58786
|
+
method: string2().optional().describe("HTTP method (default POST)"),
|
|
58787
|
+
body: string2().optional().describe("Request body"),
|
|
58788
|
+
success_pattern: string2().describe("Regex that matches a 'success' response (the committed side effect)"),
|
|
58789
|
+
concurrent: number2().optional().describe("Number of concurrent requests (default 10)"),
|
|
58790
|
+
expected_max: number2().optional().describe("Max expected successes (default 1)")
|
|
58791
|
+
}
|
|
58792
|
+
}, async ({ url, method, body, success_pattern, concurrent, expected_max }) => {
|
|
58793
|
+
return { content: [{ type: "text", text: JSON.stringify(await raceTest({ url, method, body, success_pattern, concurrent, expected_max })) }] };
|
|
58794
|
+
});
|
|
58740
58795
|
server.registerTool("payload_lookup", {
|
|
58741
58796
|
title: "Look up exploit payloads",
|
|
58742
58797
|
description: "INTEL: find a payload collection (66 categories from PayloadsAllTheThings).",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blitzstrike",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.43",
|
|
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": {
|