@profullstack/threatcrush 0.13.48 → 0.13.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/daemon.js +70 -1
- package/dist/daemon.js.map +1 -1
- package/dist/index.js +70 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
---
|
|
44
44
|
|
|
45
|
-
ThreatCrush is a security daemon that runs on your server, **reading your logs and watching inbound connections** for live attacks. It checks every nginx request against 96 OWASP CRS rules (paranoia level 1) + 1 ThreatCrush rule with CRS anomaly scoring, runs
|
|
45
|
+
ThreatCrush is a security daemon that runs on your server, **reading your logs and watching inbound connections** for live attacks. It checks every nginx request against 96 OWASP CRS rules (paranoia level 1) + 1 ThreatCrush rule with CRS anomaly scoring, runs 18 detection rules over auth, web and network events, auto-bans attackers, scans your codebase, spot-checks your URLs, and alerts you in real-time.
|
|
46
46
|
|
|
47
47
|
```
|
|
48
48
|
$ threatcrush monitor
|
package/dist/daemon.js
CHANGED
|
@@ -18297,6 +18297,75 @@ var DEFAULT_RULES = [
|
|
|
18297
18297
|
},
|
|
18298
18298
|
enabled: true
|
|
18299
18299
|
},
|
|
18300
|
+
{
|
|
18301
|
+
// The slow twin of paywall-hammering. A caller that paces itself under 30 a
|
|
18302
|
+
// minute never trips that rule, yet twenty 402s in ten minutes from one
|
|
18303
|
+
// address is not a reader deciding whether to pay: it has been told the
|
|
18304
|
+
// price twenty times and kept walking. DataForSeoBot took ~21k pages a day
|
|
18305
|
+
// from ONE address on watchnews.now (2026-10-19), about 15 a minute.
|
|
18306
|
+
//
|
|
18307
|
+
// A podcast app polling a paid feed, or a person who hit the free limit and
|
|
18308
|
+
// clicks a few more links, stays far under this. FCrDNS-verified search
|
|
18309
|
+
// crawlers are spared by remediation whatever they trip, and every ban
|
|
18310
|
+
// follows the ladder, so a first offence is minutes, not days.
|
|
18311
|
+
id: "paywall-ignored",
|
|
18312
|
+
title: "Paywall Ignored",
|
|
18313
|
+
description: "One source kept requesting after twenty 402 Payment Required answers in ten minutes",
|
|
18314
|
+
version: "1.0.0",
|
|
18315
|
+
category: "web",
|
|
18316
|
+
severity: "high",
|
|
18317
|
+
source_types: ["log-watcher", "web"],
|
|
18318
|
+
match: {
|
|
18319
|
+
field: "message",
|
|
18320
|
+
operator: "regex",
|
|
18321
|
+
value: "Client error 402:"
|
|
18322
|
+
},
|
|
18323
|
+
threshold: 20,
|
|
18324
|
+
window_seconds: 600,
|
|
18325
|
+
cooldown_seconds: 600,
|
|
18326
|
+
tags: ["web", "scraper", "x402", "paywall"],
|
|
18327
|
+
remediation: {
|
|
18328
|
+
action: "block",
|
|
18329
|
+
description: "Block a caller that keeps requesting after being told the price"
|
|
18330
|
+
},
|
|
18331
|
+
enabled: true
|
|
18332
|
+
},
|
|
18333
|
+
{
|
|
18334
|
+
// A crawler that names itself as a scraper (a headless browser, an SEO
|
|
18335
|
+
// reseller) and is refused with a 402 has its answer; a fifth one inside five
|
|
18336
|
+
// minutes from the same address means it is ignoring it. The gateway charges
|
|
18337
|
+
// these by name (x402-gateway 0.8: HEADLESS_AGENTS + SCRAPER_AGENTS) and the
|
|
18338
|
+
// resellers are refused in robots.txt too, so nothing welcome matches here.
|
|
18339
|
+
// Search crawlers (Googlebot, bingbot, Applebot) are deliberately absent.
|
|
18340
|
+
id: "paywall-declared-scraper",
|
|
18341
|
+
title: "Declared Scraper Ignoring the Paywall",
|
|
18342
|
+
description: "A self-declared scraper or headless browser keeps requesting after 402 answers",
|
|
18343
|
+
version: "1.0.0",
|
|
18344
|
+
category: "web",
|
|
18345
|
+
severity: "high",
|
|
18346
|
+
source_types: ["log-watcher", "web"],
|
|
18347
|
+
match: {
|
|
18348
|
+
field: "message",
|
|
18349
|
+
operator: "regex",
|
|
18350
|
+
value: "Client error 402:",
|
|
18351
|
+
and: [
|
|
18352
|
+
{
|
|
18353
|
+
field: "ua",
|
|
18354
|
+
operator: "regex",
|
|
18355
|
+
value: "(Lightpanda|HeadlessChrome|PhantomJS|AhrefsBot|SemrushBot|MJ12bot|DataForSeoBot|DotBot|BLEXBot|serpstatbot|Barkrowler)"
|
|
18356
|
+
}
|
|
18357
|
+
]
|
|
18358
|
+
},
|
|
18359
|
+
threshold: 5,
|
|
18360
|
+
window_seconds: 300,
|
|
18361
|
+
cooldown_seconds: 600,
|
|
18362
|
+
tags: ["web", "scraper", "x402", "paywall", "headless"],
|
|
18363
|
+
remediation: {
|
|
18364
|
+
action: "block",
|
|
18365
|
+
description: "Block a declared scraper that keeps requesting after being told the price"
|
|
18366
|
+
},
|
|
18367
|
+
enabled: true
|
|
18368
|
+
},
|
|
18300
18369
|
{
|
|
18301
18370
|
// The distributed twin of paywall-hammering. A proxy swarm asks once per
|
|
18302
18371
|
// address — 189k 402s across 111k IPs, ~1.7 each, observed on dev2's
|
|
@@ -18760,7 +18829,7 @@ var import_node_net10 = require("net");
|
|
|
18760
18829
|
|
|
18761
18830
|
// src/daemon/firewall/crawlers.ts
|
|
18762
18831
|
var import_node_dns = require("dns");
|
|
18763
|
-
var CRAWLER_DOMAINS = ["googlebot.com", "google.com", "search.msn.com"];
|
|
18832
|
+
var CRAWLER_DOMAINS = ["googlebot.com", "google.com", "search.msn.com", "applebot.apple.com"];
|
|
18764
18833
|
var systemResolver = {
|
|
18765
18834
|
reverse: (ip) => import_node_dns.promises.reverse(ip),
|
|
18766
18835
|
lookup: async (host) => (await import_node_dns.promises.lookup(host, { all: true })).map((a) => a.address)
|