blitzstrike 2.4.84 → 2.4.86
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 +34 -4
- package/dist/index.js +173 -11
- package/intelligence/cwe_map.json +5 -0
- package/intelligence/patterns.json +113 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,40 @@ 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.86] — 2026-09-17
|
|
9
|
+
|
|
10
|
+
### Added — Web3 audit extended to 13 bug classes
|
|
11
|
+
|
|
12
|
+
- Reentrancy detector now also catches ERC721/ERC1155 callback reentrancy
|
|
13
|
+
(`safeTransferFrom` / `safeTransfer` invoke `onERC721Received`/`onERC1155Received`
|
|
14
|
+
hooks).
|
|
15
|
+
- Oracle-manipulation detector now also catches Uniswap V3 `slot0()` and stale
|
|
16
|
+
Chainlink `latestRoundData()`/`latestAnswer()` (no `updatedAt` staleness check).
|
|
17
|
+
- New `encodePacked_collision` detector — `keccak256(abi.encodePacked(...))` over
|
|
18
|
+
dynamic types is not injective (CWE-701).
|
|
19
|
+
- New `address_zero_check` detector — a privileged `setOwner`/`constructor`/
|
|
20
|
+
`initialize` assigning an address param without `!= address(0)` (CWE-20).
|
|
21
|
+
- Foundry PoC templates added for both new classes; web3 severity now supports `low`.
|
|
22
|
+
|
|
23
|
+
## [2.4.85] — 2026-09-17
|
|
24
|
+
|
|
25
|
+
### Added — CORS, XSS (DOM sinks), and subdomain-takeover detectors
|
|
26
|
+
|
|
27
|
+
- New `cors_misconfiguration` detector — Access-Control-Allow-Origin reflects the
|
|
28
|
+
request Origin (or is `*`) while credentials are allowed (CWE-942); handles the
|
|
29
|
+
`setHeader('…', …)` comma shape and raw-header/wildcard shapes.
|
|
30
|
+
- New `xss` detector — user-controlled input reaching a DOM/JS sink (innerHTML,
|
|
31
|
+
dangerouslySetInnerHTML, document.write, .html(), eval, insertAdjacentHTML),
|
|
32
|
+
fired only when a source (req/location/URLSearchParams/…) is in the same file and
|
|
33
|
+
the sink value is not a constant string (CWE-79).
|
|
34
|
+
- New `subdomain_takeover` detector — a DNS CNAME/AliasTarget/DNSName/route53 record
|
|
35
|
+
pointing at a claimable service (github.io / herokuapp.com / amazonaws.com / …)
|
|
36
|
+
(CWE-404). 24 takeover-able fingerprints.
|
|
37
|
+
- Wired into patterns.json (29), cwe_map (69), severity VRT_MAP, synonyms, and the
|
|
38
|
+
verify harness (now 28/28 TP+TN). Complex-bug scan description + system prompt
|
|
39
|
+
updated.
|
|
40
|
+
|
|
41
|
+
|
|
8
42
|
## [2.4.84] — 2026-09-17
|
|
9
43
|
|
|
10
44
|
### Added — hunting doctrine + always-rejected kill-list (LLM-facing methodology)
|
|
@@ -22,7 +56,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
22
56
|
- System prompt now carries the compressed doctrine inline; `missing_authz` pattern's
|
|
23
57
|
validation mandates the two-account IDOR test (attacker A → victim B).
|
|
24
58
|
|
|
25
|
-
Competitive analysis source: Awarexone/Agentic-Bug-Hunter (rules/hunting.md +
|
|
26
59
|
reporting.md).
|
|
27
60
|
|
|
28
61
|
## [2.4.83] — 2026-09-17
|
|
@@ -40,7 +73,6 @@ reporting.md).
|
|
|
40
73
|
Foundry PoC reproduces it.
|
|
41
74
|
- `.sol` added to the scan extensions.
|
|
42
75
|
|
|
43
|
-
Competitive analysis source: Awarexone/Agentic-Bug-Hunter (web3-audit + Foundry PoC).
|
|
44
76
|
|
|
45
77
|
## [2.4.82] — 2026-09-17
|
|
46
78
|
|
|
@@ -54,7 +86,6 @@ Competitive analysis source: Awarexone/Agentic-Bug-Hunter (web3-audit + Foundry
|
|
|
54
86
|
ONLY when an interaction for the session's unique id actually arrives. Handles
|
|
55
87
|
interactsh's ANSI-colored `[INF]` banner + JSONL interaction parsing.
|
|
56
88
|
|
|
57
|
-
Competitive analysis source: Awarexone/Agentic-Bug-Hunter (interactsh OOB).
|
|
58
89
|
|
|
59
90
|
## [2.4.81] — 2026-09-17
|
|
60
91
|
|
|
@@ -70,7 +101,6 @@ Competitive analysis source: Awarexone/Agentic-Bug-Hunter (interactsh OOB).
|
|
|
70
101
|
Non-detector vectors (xss / business_logic / open_redirect / …) fall back to a
|
|
71
102
|
curated PAYOUT_FALLBACK table.
|
|
72
103
|
|
|
73
|
-
Competitive analysis source: Awarexone/Agentic-Bug-Hunter (impact-first framing).
|
|
74
104
|
|
|
75
105
|
## [2.4.80] — 2026-09-17
|
|
76
106
|
|
package/dist/index.js
CHANGED
|
@@ -16320,6 +16320,9 @@ function detectComplexBugs(code, file) {
|
|
|
16320
16320
|
detectRustFormatString(code, file, out);
|
|
16321
16321
|
detectJwtAlgConfusion(code, file, out);
|
|
16322
16322
|
detectCacheDeception(code, file, out);
|
|
16323
|
+
detectCorsMisconfig(code, file, out);
|
|
16324
|
+
detectXss(code, file, out);
|
|
16325
|
+
detectSubdomainTakeover(code, file, out);
|
|
16323
16326
|
out.push(...detectWrongSanitizer(code, file));
|
|
16324
16327
|
out.push(...detectMissingAuthz(code, file));
|
|
16325
16328
|
const seen = new Set;
|
|
@@ -16913,6 +16916,89 @@ function detectCacheDeception(code, file, out) {
|
|
|
16913
16916
|
detail: "The reverse proxy caches static-extension URLs using a cache key that excludes the session cookie, while a backend route (often a greedy regex like /account(/.*)?) returns per-session private data for such URLs. An attacker can poison the cache with a victim's session response and re-fetch it anonymously. Include the cookie in the cache key, or don't cache cookie-authenticated responses."
|
|
16914
16917
|
});
|
|
16915
16918
|
}
|
|
16919
|
+
function detectCorsMisconfig(code, file, out) {
|
|
16920
|
+
const clean = stripCommentsOnly(code);
|
|
16921
|
+
const ls = lines2(code);
|
|
16922
|
+
const hasCredentials = /Access-Control-Allow-Credentials['"]?\s*(?::|,|=)\s*['"]?true/i.test(clean) || /\ballow_credentials\s*=\s*True\b/i.test(clean) || /\bcredentials\s*:\s*true\b/i.test(clean) || /\bwithCredentials\s*:\s*true\b/i.test(clean);
|
|
16923
|
+
const reflected = /Access-Control-Allow-Origin['"]?\s*(?::|,|=)\s*['"]?\*['"]?/i.test(clean) || /Access-Control-Allow-Origin['"]?\s*(?::|,|=)\s*[^,;\n]*\borigin\b/i.test(clean) || /allow_origins?\s*=\s*\[\s*['"]\*['"]\s*\]/i.test(clean) || /@CrossOrigin\s*\(\s*origins\s*=\s*['"]\*['"]/i.test(clean);
|
|
16924
|
+
if (!hasCredentials || !reflected)
|
|
16925
|
+
return;
|
|
16926
|
+
const ln = lineNo2(code, clean.search(/Access-Control-Allow-Origin|allow_origins|@CrossOrigin|CORS\s*\(/i));
|
|
16927
|
+
out.push({
|
|
16928
|
+
file,
|
|
16929
|
+
line: ln,
|
|
16930
|
+
type: "cors_misconfiguration",
|
|
16931
|
+
category: "CORS misconfiguration (reflected origin + credentials)",
|
|
16932
|
+
severity: "high",
|
|
16933
|
+
evidence: (ls[ln - 1] ?? "").trim(),
|
|
16934
|
+
detail: "Access-Control-Allow-Origin reflects the request Origin (or is '*') while Access-Control-Allow-Credentials is true — any website can read the victim's authenticated responses cross-origin (CWE-942). Validate the Origin against a static allowlist and never combine a reflected/wildcard origin with credentials."
|
|
16935
|
+
});
|
|
16936
|
+
}
|
|
16937
|
+
function detectXss(code, file, out) {
|
|
16938
|
+
const clean = stripCommentsOnly(code);
|
|
16939
|
+
const ls = lines2(code);
|
|
16940
|
+
const hasSource = /\b(?:req\.(?:query|params|body|cookies|headers)|request\.(?:get|args|form|json|values|headers|params)|location\.(?:hash|search|href)|window\.location|document\.(?:URL|referrer)|URLSearchParams|searchParams\.get|getElementById\([^)]*\)\.value|routeParams|queryParams|this\.props|params\s*[:=])/i.test(clean) || /\b(?:req\.(?:query|params|body)|request\.(?:get|args|json|values)|location\.(?:hash|search))\b/i.test(clean);
|
|
16941
|
+
if (!hasSource)
|
|
16942
|
+
return;
|
|
16943
|
+
const sinkRe = /dangerouslySetInnerHTML|\.innerHTML\s*=|\.outerHTML\s*=|document\.write\s*\(|insertAdjacentHTML\s*\(|\.html\s*\(|eval\s*\(/g;
|
|
16944
|
+
let m;
|
|
16945
|
+
const seen = new Set;
|
|
16946
|
+
while ((m = sinkRe.exec(clean)) !== null) {
|
|
16947
|
+
const ln = lineNo2(code, m.index);
|
|
16948
|
+
if (seen.has(ln))
|
|
16949
|
+
continue;
|
|
16950
|
+
const line = ls[ln - 1] ?? "";
|
|
16951
|
+
const rest = line.slice(line.indexOf(m[0]) + m[0].length);
|
|
16952
|
+
if (/^\s*["'`]/.test(rest))
|
|
16953
|
+
continue;
|
|
16954
|
+
if (m[0] === "eval(" && /^\s*["'`]/.test(rest))
|
|
16955
|
+
continue;
|
|
16956
|
+
if (m[0] === "dangerouslySetInnerHTML" && !/__html\s*:\s*[^'"`]/.test(line))
|
|
16957
|
+
continue;
|
|
16958
|
+
seen.add(ln);
|
|
16959
|
+
out.push({
|
|
16960
|
+
file,
|
|
16961
|
+
line: ln,
|
|
16962
|
+
type: "xss",
|
|
16963
|
+
category: "Cross-site scripting (user input into a DOM sink)",
|
|
16964
|
+
severity: "high",
|
|
16965
|
+
evidence: line.trim(),
|
|
16966
|
+
detail: "User-controlled input reaches a DOM/JS sink (innerHTML / dangerouslySetInnerHTML / document.write / .html() / eval / insertAdjacentHTML). If the value is not sanitized or context-encoded, an attacker injects script that runs in a victim's session (CWE-79). Use textContent/value assignment, a DOM-purify allowlist, or a framework's escaping — never assign raw user data to an HTML sink."
|
|
16967
|
+
});
|
|
16968
|
+
}
|
|
16969
|
+
}
|
|
16970
|
+
function detectSubdomainTakeover(code, file, out) {
|
|
16971
|
+
const clean = stripCommentsOnly(code);
|
|
16972
|
+
const ls = lines2(code);
|
|
16973
|
+
const fingerprint = /(?:\.github\.io|\.s3[.-]?[a-z0-9-]*\.amazonaws\.com|\.herokuapp\.com|\.azurewebsites\.net|\.cloudfront\.net|\.fastly\.net|\.myshopify\.com|\.zendesk\.com|\.uservoice\.com|\.bitbucket\.io|\.readme\.io|\.ghost\.io|\.surge\.sh|\.netlify\.app|\.vercel\.app|\.firebaseapp\.com|\.elasticbeanstalk\.com|\.pantheon\.io|\.wordpress\.com|\.tumblr\.com|\.helpscoutdocs\.com|\.cargo\.site|\.getresponse\.com|\.teamwork\.com)\b/i;
|
|
16974
|
+
const targetRe = /["']([a-z0-9.-]+\.[a-z]{2,})["']/g;
|
|
16975
|
+
const seen = new Set;
|
|
16976
|
+
const ls2 = lines2(clean);
|
|
16977
|
+
for (let i = 0;i < ls2.length; i++) {
|
|
16978
|
+
const line = ls2[i];
|
|
16979
|
+
if (!/(?:CNAME|AliasTarget|DNSName|aws_route53_record|dns_zone|records?\s*[:=]\s*\[)/i.test(line))
|
|
16980
|
+
continue;
|
|
16981
|
+
let t;
|
|
16982
|
+
while ((t = targetRe.exec(line)) !== null) {
|
|
16983
|
+
const target = t[1];
|
|
16984
|
+
if (!fingerprint.test(target))
|
|
16985
|
+
continue;
|
|
16986
|
+
const ln = i + 1;
|
|
16987
|
+
if (seen.has(ln))
|
|
16988
|
+
continue;
|
|
16989
|
+
seen.add(ln);
|
|
16990
|
+
out.push({
|
|
16991
|
+
file,
|
|
16992
|
+
line: ln,
|
|
16993
|
+
type: "subdomain_takeover",
|
|
16994
|
+
category: "Subdomain takeover (CNAME to a claimable service)",
|
|
16995
|
+
severity: "high",
|
|
16996
|
+
evidence: (ls[ln - 1] ?? "").trim(),
|
|
16997
|
+
detail: `A DNS record points \`${target}\` at a service that can be claimed by an attacker (GitHub Pages/S3/Heroku/…). If the target is unclaimed/removed, an attacker registers it and hosts content on the victim's subdomain (cookie theft, phishing, same-origin attack). Verify the target resolves to a 'not found'/unclaimed service, then remove the dangling record.`
|
|
16998
|
+
});
|
|
16999
|
+
}
|
|
17000
|
+
}
|
|
17001
|
+
}
|
|
16916
17002
|
var SOURCE_TOKENS3, MAGIC_METHODS, SECRET_FIELD_RE, SECRET_PLACEHOLDER_RE, ENTROPY_EXCLUDE_VAR;
|
|
16917
17003
|
var init_complex_bugs = __esm(() => {
|
|
16918
17004
|
init_security_state();
|
|
@@ -17138,10 +17224,39 @@ $r = openai.chat.completions.create(['messages' => [['role' => 'user', 'content'
|
|
|
17138
17224
|
id: "cache-deception",
|
|
17139
17225
|
detector: "cache_deception",
|
|
17140
17226
|
file: "nginx.conf",
|
|
17141
|
-
positive: `location ~*
|
|
17227
|
+
positive: `location ~* .(css|js|png|jpg|gif|ico|svg)$ { proxy_cache ctf_cache; proxy_cache_valid 200 5m; }
|
|
17142
17228
|
proxy_cache_key "$scheme$request_method$request_uri";
|
|
17143
17229
|
`,
|
|
17144
17230
|
negative: `location / { proxy_pass http://backend; }
|
|
17231
|
+
`
|
|
17232
|
+
},
|
|
17233
|
+
{
|
|
17234
|
+
id: "cors-misconfig",
|
|
17235
|
+
detector: "cors_misconfiguration",
|
|
17236
|
+
file: "server.js",
|
|
17237
|
+
positive: `res.setHeader('Access-Control-Allow-Origin', req.headers.origin);
|
|
17238
|
+
res.setHeader('Access-Control-Allow-Credentials', 'true');
|
|
17239
|
+
`,
|
|
17240
|
+
negative: `res.setHeader('Access-Control-Allow-Origin', 'https://app.example.com');
|
|
17241
|
+
`
|
|
17242
|
+
},
|
|
17243
|
+
{
|
|
17244
|
+
id: "xss-dom-sink",
|
|
17245
|
+
detector: "xss",
|
|
17246
|
+
file: "page.js",
|
|
17247
|
+
positive: `const u = new URLSearchParams(location.search).get('name');
|
|
17248
|
+
document.getElementById('out').innerHTML = u;
|
|
17249
|
+
`,
|
|
17250
|
+
negative: `document.getElementById('out').innerHTML = '<b>static</b>';
|
|
17251
|
+
`
|
|
17252
|
+
},
|
|
17253
|
+
{
|
|
17254
|
+
id: "subdomain-takeover",
|
|
17255
|
+
detector: "subdomain_takeover",
|
|
17256
|
+
file: "dns.tf",
|
|
17257
|
+
positive: `resource "aws_route53_record" "blog" { name = "blog.example.com" type = "CNAME" records = ["oldblog.github.io"] }
|
|
17258
|
+
`,
|
|
17259
|
+
negative: `resource "aws_route53_record" "www" { name = "www.example.com" type = "A" records = ["1.2.3.4"] }
|
|
17145
17260
|
`
|
|
17146
17261
|
}
|
|
17147
17262
|
];
|
|
@@ -34383,7 +34498,21 @@ var ALIASES = {
|
|
|
34383
34498
|
"web cache deception": "cache_deception",
|
|
34384
34499
|
"cache deception": "cache_deception",
|
|
34385
34500
|
"cache poisoning": "cache_deception",
|
|
34386
|
-
"cache key injection": "cache_deception"
|
|
34501
|
+
"cache key injection": "cache_deception",
|
|
34502
|
+
cors: "cors_misconfiguration",
|
|
34503
|
+
"cors misconfiguration": "cors_misconfiguration",
|
|
34504
|
+
"cors misconfig": "cors_misconfiguration",
|
|
34505
|
+
"cross origin resource sharing": "cors_misconfiguration",
|
|
34506
|
+
xss: "xss",
|
|
34507
|
+
"cross site scripting": "xss",
|
|
34508
|
+
"cross-site scripting": "xss",
|
|
34509
|
+
"dom xss": "xss",
|
|
34510
|
+
"reflected xss": "xss",
|
|
34511
|
+
"stored xss": "xss",
|
|
34512
|
+
"subdomain takeover": "subdomain_takeover",
|
|
34513
|
+
takeover: "subdomain_takeover",
|
|
34514
|
+
"dangling dns": "subdomain_takeover",
|
|
34515
|
+
"dangling cname": "subdomain_takeover"
|
|
34387
34516
|
};
|
|
34388
34517
|
function normalize(term) {
|
|
34389
34518
|
return term.trim().toLowerCase().replace(/[_-]+/g, " ").replace(/\s+/g, " ").trim();
|
|
@@ -58897,7 +59026,10 @@ var VRT_MAP = {
|
|
|
58897
59026
|
rust_unsafe: { vrt: "insecure_design > unsafe_memory_operations", priority: "P3", severity: "medium", rationale: "transmute/from_raw_parts/assume_init bypass the borrow checker — a hint that needs bounds verification; memory corruption if attacker-controlled." },
|
|
58898
59027
|
rust_format_string: { vrt: "injection > format_string_injection", priority: "P2", severity: "high", rationale: "An attacker-controlled format string can read or corrupt memory via format specifiers." },
|
|
58899
59028
|
jwt_alg_confusion: { vrt: "authentication > jwt_algorithm_confusion", priority: "P1", severity: "critical", rationale: "A verifier accepting HS256 with public-key HMAC lets an attacker forge admin tokens (CVE-2015-9235)." },
|
|
58900
|
-
cache_deception: { vrt: "cryptographic_failure > web_cache_deception", priority: "P2", severity: "high", rationale: "Cookie-less static cache keys leak per-session private responses to anonymous callers." }
|
|
59029
|
+
cache_deception: { vrt: "cryptographic_failure > web_cache_deception", priority: "P2", severity: "high", rationale: "Cookie-less static cache keys leak per-session private responses to anonymous callers." },
|
|
59030
|
+
cors_misconfiguration: { vrt: "configuration > cors_misconfiguration", priority: "P3", severity: "medium", rationale: "A reflected/wildcard origin with credentials lets any website read authenticated responses cross-origin (CWE-942)." },
|
|
59031
|
+
xss: { vrt: "injection > cross_site_scripting", priority: "P2", severity: "high", rationale: "User input into a DOM sink executes script in the victim's origin (CWE-79)." },
|
|
59032
|
+
subdomain_takeover: { vrt: "configuration > subdomain_takeover", priority: "P3", severity: "medium", rationale: "A dangling CNAME lets an attacker host content on the victim's subdomain (CWE-404)." }
|
|
58901
59033
|
};
|
|
58902
59034
|
function severityCalibrate(input) {
|
|
58903
59035
|
const type = input.type?.toLowerCase() ?? "";
|
|
@@ -60356,7 +60488,9 @@ var SEVERITY = {
|
|
|
60356
60488
|
missing_access_control: { severity: "high", cwe: "CWE-284", category: "Privileged function missing access control" },
|
|
60357
60489
|
timestamp_dependence: { severity: "medium", cwe: "CWE-1164", category: "block.timestamp / block.number dependence" },
|
|
60358
60490
|
oracle_manipulation: { severity: "high", cwe: "CWE-1235", category: "Spot-price oracle (DEX pair) manipulation" },
|
|
60359
|
-
unbounded_loop: { severity: "medium", cwe: "CWE-834", category: "Unbounded loop over user-controlled length" }
|
|
60491
|
+
unbounded_loop: { severity: "medium", cwe: "CWE-834", category: "Unbounded loop over user-controlled length" },
|
|
60492
|
+
encodePacked_collision: { severity: "high", cwe: "CWE-701", category: "abi.encodePacked hash collision (dynamic types)" },
|
|
60493
|
+
address_zero_check: { severity: "low", cwe: "CWE-20", category: "Missing address(0) validation on privileged assignment" }
|
|
60360
60494
|
};
|
|
60361
60495
|
function lines3(code) {
|
|
60362
60496
|
return code.split(`
|
|
@@ -60432,7 +60566,7 @@ function web3Audit(code, file) {
|
|
|
60432
60566
|
const out = [];
|
|
60433
60567
|
const clean = stripComments2(code);
|
|
60434
60568
|
const ls = lines3(code);
|
|
60435
|
-
const callRe = /\.call\{value:|\.call\(|\.send\(|\.transfer\(/g;
|
|
60569
|
+
const callRe = /\.call\{value:|\.call\(|\.send\(|\.transfer\(|safeTransferFrom\s*\(|safeTransfer\s*\(/g;
|
|
60436
60570
|
let m;
|
|
60437
60571
|
while ((m = callRe.exec(clean)) !== null) {
|
|
60438
60572
|
const ln = lineNo4(code, m.index);
|
|
@@ -60499,7 +60633,7 @@ function web3Audit(code, file) {
|
|
|
60499
60633
|
while ((m = tsRe.exec(clean)) !== null) {
|
|
60500
60634
|
push(out, file, code, m.index, "timestamp_dependence", (ls[lineNo4(code, m.index) - 1] ?? "").trim(), "`block.timestamp`/`block.number` is used in critical logic — miners can manipulate it within a range, and it must never be a source of randomness or a payout/auction boundary. Use an oracle (Chainlink VRF) for randomness and tolerate timestamp skew.");
|
|
60501
60635
|
}
|
|
60502
|
-
const oracleRe = /\bgetReserves\s*\(|\bspotPrice\b|\bgetAmountsOut\s*\(|\bgetAmountOut\s*\(/g;
|
|
60636
|
+
const oracleRe = /\bgetReserves\s*\(|\bspotPrice\b|\bgetAmountsOut\s*\(|\bgetAmountOut\s*\(|\bslot0\s*\(|\blatestRoundData\s*\(|\blatestAnswer\s*\(/g;
|
|
60503
60637
|
while ((m = oracleRe.exec(clean)) !== null) {
|
|
60504
60638
|
push(out, file, code, m.index, "oracle_manipulation", (ls[lineNo4(code, m.index) - 1] ?? "").trim(), "A DEX pair's spot price (`getReserves`/`getAmountOut`) is used as a price oracle — it can be manipulated with a flash loan. Use a time-weighted average price (TWAP) or a Chainlink price feed.");
|
|
60505
60639
|
}
|
|
@@ -60513,6 +60647,22 @@ function web3Audit(code, file) {
|
|
|
60513
60647
|
continue;
|
|
60514
60648
|
push(out, file, code, m.index, "unbounded_loop", line.trim(), "A loop iterates over a user-controlled array length with no bound — an attacker can grow the array to force an out-of-gas DoS. Cap the iteration or use a pull-based pattern.");
|
|
60515
60649
|
}
|
|
60650
|
+
const packedRe = /keccak256\s*\(\s*abi\.encodePacked\s*\(/g;
|
|
60651
|
+
while ((m = packedRe.exec(clean)) !== null) {
|
|
60652
|
+
push(out, file, code, m.index, "encodePacked_collision", (ls[lineNo4(code, m.index) - 1] ?? "").trim(), "`keccak256(abi.encodePacked(...))` over dynamic types (string/bytes/array) is ambiguous — ['a','bc'] and ['ab','c'] pack identically, enabling hash collisions and signature forgery (CWE-701). Use `abi.encode` (which pads + length-prefixes each argument) for any hash or signature digest.");
|
|
60653
|
+
}
|
|
60654
|
+
const zeroCheckRe = /\b(constructor|initialize|setOwner|transferOwnership|setAdmin|setFeeRecipient|setPendingOwner)\s*\(/g;
|
|
60655
|
+
const cleanLines = lines3(clean);
|
|
60656
|
+
while ((m = zeroCheckRe.exec(clean)) !== null) {
|
|
60657
|
+
const ln = lineNo4(code, m.index);
|
|
60658
|
+
const line = ls[ln - 1] ?? "";
|
|
60659
|
+
if (!/\baddress\b/.test(line))
|
|
60660
|
+
continue;
|
|
60661
|
+
const cleanLine = cleanLines[ln - 1] ?? "";
|
|
60662
|
+
if (/address\s*\(\s*0\s*\)/.test(cleanLine) || /!=?\s*address\s*\(\s*0\s*\)/.test(cleanLine))
|
|
60663
|
+
continue;
|
|
60664
|
+
push(out, file, code, m.index, "address_zero_check", line.trim(), "An address parameter is assigned in a privileged function (owner/admin) without a `!= address(0)` check — a zero-address owner can permanently lock the contract. Validate the address before assignment.");
|
|
60665
|
+
}
|
|
60516
60666
|
const seen = new Set;
|
|
60517
60667
|
return out.filter((f) => {
|
|
60518
60668
|
const k = `${f.class_}:${f.line}`;
|
|
@@ -60523,7 +60673,7 @@ function web3Audit(code, file) {
|
|
|
60523
60673
|
});
|
|
60524
60674
|
}
|
|
60525
60675
|
function web3Rank(findings) {
|
|
60526
|
-
const order = { critical: 0, high: 1, medium: 2 };
|
|
60676
|
+
const order = { critical: 0, high: 1, medium: 2, low: 3 };
|
|
60527
60677
|
const agg = new Map;
|
|
60528
60678
|
for (const f of findings) {
|
|
60529
60679
|
const e = agg.get(f.class_) ?? { count: 0, severity: f.severity, cwe: f.cwe };
|
|
@@ -60639,6 +60789,18 @@ contract Evil {
|
|
|
60639
60789
|
for (uint i = 0; i < 100_000; i++) target.add(address(uint160(i)));
|
|
60640
60790
|
vm.expectRevert(); // or assert gas consumption
|
|
60641
60791
|
target.processAll();
|
|
60792
|
+
}`,
|
|
60793
|
+
encodePacked_collision: ` function testEncodePackedCollision() public {
|
|
60794
|
+
// two distinct inputs pack to the same hash
|
|
60795
|
+
bytes32 a = target.hashFor("a", "bc");
|
|
60796
|
+
bytes32 b = target.hashFor("ab", "c");
|
|
60797
|
+
assertEq(a, b, "abi.encodePacked collision");
|
|
60798
|
+
}`,
|
|
60799
|
+
address_zero_check: ` function testAddressZeroCheck() public {
|
|
60800
|
+
// assign the zero address as owner — should revert
|
|
60801
|
+
vm.expectRevert();
|
|
60802
|
+
target.setOwner(address(0));
|
|
60803
|
+
assertTrue(target.owner() != address(0), "zero address became owner");
|
|
60642
60804
|
}`
|
|
60643
60805
|
};
|
|
60644
60806
|
return base + (exploit[cls] ?? exploit.missing_access_control) + `
|
|
@@ -60997,7 +61159,7 @@ function createServer2() {
|
|
|
60997
61159
|
` + `- 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).
|
|
60998
61160
|
` + `- 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.
|
|
60999
61161
|
|
|
61000
|
-
` + "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. 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. (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().\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. 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: 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. WEB3: for Solidity/EVM, call web3_audit(code|path) — a deterministic 10-class smart-contract audit (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, unbounded loop) returning ranked findings (class/CWE/severity/line), then foundry_poc(class, contract) to generate an executable Foundry test that PROVES the bug. A web3 hit is a HYPOTHESIS until the Foundry PoC reproduces it.\n" + `PRECISION ANALYSIS — chrome-devtools MCP is MANDATORY, not optional:
|
|
61162
|
+
` + "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. 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. (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().\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. 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: 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. 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 that PROVES the bug. A web3 hit is a HYPOTHESIS until the Foundry PoC reproduces it.\n" + `PRECISION ANALYSIS — chrome-devtools MCP is MANDATORY, not optional:
|
|
61001
61163
|
` + `- 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.
|
|
61002
61164
|
` + `- 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.
|
|
61003
61165
|
` + "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."
|
|
@@ -61949,8 +62111,8 @@ ${statusLine}` : statusLine },
|
|
|
61949
62111
|
return { content: [{ type: "text", text: JSON.stringify(oobList()) }] };
|
|
61950
62112
|
});
|
|
61951
62113
|
server.registerTool("web3_audit", {
|
|
61952
|
-
title: "Solidity / smart-contract audit (
|
|
61953
|
-
description: "WEB3: deterministic Solidity audit for the
|
|
62114
|
+
title: "Solidity / smart-contract audit (13 bug classes + Foundry PoC)",
|
|
62115
|
+
description: "WEB3: deterministic Solidity audit for the 13 highest-value smart-contract bug classes — reentrancy (incl. ERC721/ERC1155 safeTransfer callback reentrancy), unchecked return value, unchecked arithmetic, tx.origin auth, signature replay, unprotected selfdestruct, delegatecall-to-user-input, missing access control, timestamp dependence, spot-price oracle manipulation (getReserves/slot0/latestRoundData), unbounded loops, abi.encodePacked hash collision, and missing address(0) validation. Pass raw Solidity source (or a path) to get ranked findings (class, CWE, severity, line, evidence). Then call foundry_poc(class, contract) to generate an executable Foundry test template that proves the bug. A hit is a HYPOTHESIS until the Foundry PoC reproduces it.",
|
|
61954
62116
|
inputSchema: {
|
|
61955
62117
|
code: string2().optional().describe("Raw Solidity source"),
|
|
61956
62118
|
path: string2().optional().describe("Path to a .sol file")
|
|
@@ -62586,7 +62748,7 @@ ${statusLine}` : statusLine },
|
|
|
62586
62748
|
});
|
|
62587
62749
|
server.registerTool("complex_scan", {
|
|
62588
62750
|
title: "Complex-bug scan (deserialization / type juggling / mass assignment / prototype pollution / CRLF / path confusion / SSRF / XXE / SSTI / wrong-context sanitization / missing authz+nonce)",
|
|
62589
|
-
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),
|
|
62751
|
+
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).",
|
|
62590
62752
|
inputSchema: { path: string2().describe("Source file path") }
|
|
62591
62753
|
}, async ({ path }) => {
|
|
62592
62754
|
const code = readFileSync27(path, "utf8");
|
|
@@ -342,6 +342,11 @@
|
|
|
342
342
|
"cwe": "CWE-525",
|
|
343
343
|
"name": "Use of Web Browser Cache Containing Sensitive Information",
|
|
344
344
|
"category": "cryptographic_failure"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"id": "cors_misconfiguration",
|
|
348
|
+
"cwe": "CWE-942",
|
|
349
|
+
"name": "Overly Permissive Cross-domain Whitelist (CORS)"
|
|
345
350
|
}
|
|
346
351
|
]
|
|
347
352
|
}
|
|
@@ -840,6 +840,119 @@
|
|
|
840
840
|
"payout_min": 1000,
|
|
841
841
|
"payout_max": 10000,
|
|
842
842
|
"typical_payout": "$1K–$10K"
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
"id": "cors_misconfiguration",
|
|
846
|
+
"name": "CORS Misconfiguration",
|
|
847
|
+
"cwe": "CWE-942",
|
|
848
|
+
"severity": "high",
|
|
849
|
+
"signature": "Access-Control-Allow-Origin reflects the request Origin (or is *) while credentials are allowed",
|
|
850
|
+
"chains": [
|
|
851
|
+
"cors_misconfig_data_theft",
|
|
852
|
+
"cors_misconfig_to_session_theft"
|
|
853
|
+
],
|
|
854
|
+
"references": [
|
|
855
|
+
"CWE-942",
|
|
856
|
+
"OWASP WSTG-CLNT-01",
|
|
857
|
+
"PortSwigger — CORS vulnerability with basic origin reflection"
|
|
858
|
+
],
|
|
859
|
+
"real_world": "A server echoes the request Origin header into Access-Control-Allow-Origin while also sending Access-Control-Allow-Credentials: true. Any website the victim visits can then make credentialed requests and read the victim's authenticated responses cross-origin (session theft, account data exfil).",
|
|
860
|
+
"detection_signatures": [
|
|
861
|
+
"Access-Control-Allow-Origin = request Origin (reflected)",
|
|
862
|
+
"Access-Control-Allow-Origin: * + Access-Control-Allow-Credentials: true",
|
|
863
|
+
"allow_origins=[\"*\"] + allow_credentials=True (Flask/Django CORS)"
|
|
864
|
+
],
|
|
865
|
+
"chain_templates": [
|
|
866
|
+
"cors_misconfig_data_theft",
|
|
867
|
+
"cors_misconfig_to_session_theft"
|
|
868
|
+
],
|
|
869
|
+
"bypass_techniques": [
|
|
870
|
+
"null origin (sandboxed iframe) reflected",
|
|
871
|
+
"subdomain of the attacker reflected by a naive suffix/prefix check",
|
|
872
|
+
"Origin with the target as a suffix (evil.com-target.com)"
|
|
873
|
+
],
|
|
874
|
+
"crown_jewels": [
|
|
875
|
+
"authenticated JSON API responses",
|
|
876
|
+
"session/CSRF tokens",
|
|
877
|
+
"account settings + PII"
|
|
878
|
+
],
|
|
879
|
+
"payout_min": 500,
|
|
880
|
+
"payout_max": 5000,
|
|
881
|
+
"typical_payout": "$500–$5K"
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
"id": "xss",
|
|
885
|
+
"name": "Cross-Site Scripting (XSS)",
|
|
886
|
+
"cwe": "CWE-79",
|
|
887
|
+
"severity": "high",
|
|
888
|
+
"signature": "user-controlled input reaches a DOM/JS sink (innerHTML / dangerouslySetInnerHTML / document.write / .html / eval)",
|
|
889
|
+
"chains": [
|
|
890
|
+
"xss_to_account_takeover"
|
|
891
|
+
],
|
|
892
|
+
"references": [
|
|
893
|
+
"CWE-79",
|
|
894
|
+
"OWASP WSTG-INPV-02",
|
|
895
|
+
"PortSwigger — DOM-based XSS"
|
|
896
|
+
],
|
|
897
|
+
"real_world": "A DOM sink (innerHTML, document.write, dangerouslySetInnerHTML, jQuery .html(), eval) is fed user-controlled input without sanitization/encoding. The injected script runs in the victim's origin, stealing cookies, hijacking the session, or exfiltrating data.",
|
|
898
|
+
"detection_signatures": [
|
|
899
|
+
"dangerouslySetInnerHTML={{__html: <var>}}",
|
|
900
|
+
"element.innerHTML = <var>",
|
|
901
|
+
"document.write(<var>) / .html(<var>) with a request/location source nearby"
|
|
902
|
+
],
|
|
903
|
+
"chain_templates": [
|
|
904
|
+
"xss_to_account_takeover"
|
|
905
|
+
],
|
|
906
|
+
"bypass_techniques": [
|
|
907
|
+
"context-specific encoding (HTML/attribute/JS/URL) mismatches",
|
|
908
|
+
"DOM clobbering (form/iframe name overrides)",
|
|
909
|
+
"CSP bypass via nonce reuse / unsafe-inline gaps"
|
|
910
|
+
],
|
|
911
|
+
"crown_jewels": [
|
|
912
|
+
"session cookies (document.cookie)",
|
|
913
|
+
"admin panel actions via CSRF tokens",
|
|
914
|
+
"victim PII in the DOM"
|
|
915
|
+
],
|
|
916
|
+
"payout_min": 500,
|
|
917
|
+
"payout_max": 5000,
|
|
918
|
+
"typical_payout": "$500–$5K"
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
"id": "subdomain_takeover",
|
|
922
|
+
"name": "Subdomain Takeover",
|
|
923
|
+
"cwe": "CWE-404",
|
|
924
|
+
"severity": "high",
|
|
925
|
+
"signature": "a DNS CNAME/AliasTarget points at a service that can be claimed by an attacker (GitHub Pages/S3/Heroku/…)",
|
|
926
|
+
"chains": [
|
|
927
|
+
"subdomain_takeover",
|
|
928
|
+
"subdomain_takeover_to_cookie_theft"
|
|
929
|
+
],
|
|
930
|
+
"references": [
|
|
931
|
+
"CWE-404",
|
|
932
|
+
"OWASP WSTG-CONFIG-10",
|
|
933
|
+
"Can I Take Over XYZ (EdOverflow)"
|
|
934
|
+
],
|
|
935
|
+
"real_world": "A dangling DNS record (CNAME/AliasTarget) points to a service the org no longer owns (e.g. a deleted GitHub Pages repo, S3 bucket, or Heroku app). An attacker re-registers that name and serves arbitrary content from the victim's subdomain — phishing, cookie theft via a parent-domain cookie, and same-origin attacks.",
|
|
936
|
+
"detection_signatures": [
|
|
937
|
+
"CNAME/AliasTarget/DNSName -> *.github.io / *.herokuapp.com / *.amazonaws.com / …",
|
|
938
|
+
"aws_route53_record type=CNAME with an unclaimed service target"
|
|
939
|
+
],
|
|
940
|
+
"chain_templates": [
|
|
941
|
+
"subdomain_takeover",
|
|
942
|
+
"subdomain_takeover_to_cookie_theft"
|
|
943
|
+
],
|
|
944
|
+
"bypass_techniques": [
|
|
945
|
+
"check the CNAME resolves to an NXDOMAIN / 'not found' / unclaimed page",
|
|
946
|
+
"verify via the service's provisioning page (GitHub 404 'repo not found')"
|
|
947
|
+
],
|
|
948
|
+
"crown_jewels": [
|
|
949
|
+
"wildcard-scoped parent-domain cookies",
|
|
950
|
+
"subdomains of SSO/portal/main domains",
|
|
951
|
+
"email-deliverability subdomains (SPF/DKIM trust)"
|
|
952
|
+
],
|
|
953
|
+
"payout_min": 500,
|
|
954
|
+
"payout_max": 5000,
|
|
955
|
+
"typical_payout": "$500–$5K"
|
|
843
956
|
}
|
|
844
957
|
]
|
|
845
958
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blitzstrike",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.86",
|
|
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": {
|