@profullstack/threatcrush 0.13.72 → 0.13.73
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 +47 -1
- package/dist/daemon.js.map +1 -1
- package/dist/index.js +47 -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) + 4 ThreatCrush rules 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) + 4 ThreatCrush rules with CRS anomaly scoring, runs 24 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
|
@@ -20590,6 +20590,9 @@ var import_node_path25 = require("path");
|
|
|
20590
20590
|
|
|
20591
20591
|
// src/daemon/rules/default-rules.ts
|
|
20592
20592
|
var AT_CRS_THRESHOLD = { field: "severity", operator: "regex", value: "^(high|critical)$" };
|
|
20593
|
+
var SSHD_IDENT = String.raw`\[sshd(?:-session|-auth)?\]`;
|
|
20594
|
+
var SSHD_LINE = `^${SSHD_IDENT}`;
|
|
20595
|
+
var NOT_SSHD_LINE = `^(?!${SSHD_IDENT})`;
|
|
20593
20596
|
var DEFAULT_RULES = [
|
|
20594
20597
|
{
|
|
20595
20598
|
id: "ssh-brute-force",
|
|
@@ -20990,7 +20993,14 @@ var DEFAULT_RULES = [
|
|
|
20990
20993
|
match: {
|
|
20991
20994
|
field: "severity",
|
|
20992
20995
|
operator: "equals",
|
|
20993
|
-
value: "critical"
|
|
20996
|
+
value: "critical",
|
|
20997
|
+
// sshd's pre-auth failures are logged at syslog priority 2, so they used
|
|
20998
|
+
// to land here and every SSH bot arrived titled "Critical System Error".
|
|
20999
|
+
// They belong to `ssh-preauth-rejected` below. Excluded on `message`, not
|
|
21000
|
+
// on `details.process`: matchesCondition fails a condition whose field is
|
|
21001
|
+
// undefined, so an `and` on `process` would stop this rule matching every
|
|
21002
|
+
// critical line that has no process (the kernel's, for one).
|
|
21003
|
+
and: [{ field: "message", operator: "regex", value: NOT_SSHD_LINE }]
|
|
20994
21004
|
},
|
|
20995
21005
|
threshold: 1,
|
|
20996
21006
|
window_seconds: 60,
|
|
@@ -20998,6 +21008,42 @@ var DEFAULT_RULES = [
|
|
|
20998
21008
|
tags: ["system", "critical"],
|
|
20999
21009
|
enabled: true
|
|
21000
21010
|
},
|
|
21011
|
+
{
|
|
21012
|
+
// Anthony, 2026-11-04, on being called for these: "it can call me when
|
|
21013
|
+
// unauthorized access, i want to know" — so this stays `critical` and pages
|
|
21014
|
+
// exactly as `system-critical-error` did (store.ts pages on `critical`, or
|
|
21015
|
+
// on a rule in PAGED_ATTEMPT_RULES). What changes is what the page says.
|
|
21016
|
+
//
|
|
21017
|
+
// sshd logs a rejected handshake at priority 2 — "fatal: userauth_pubkey:
|
|
21018
|
+
// parse publickey packet: incomplete message [preauth]", "banner exchange:
|
|
21019
|
+
// ... invalid format" — so a bot that never authenticated used to raise
|
|
21020
|
+
// "Critical System Error", and because `dedupe_key` is
|
|
21021
|
+
// `detection:<server>:<rule_id>` it shared ONE incident with unrelated
|
|
21022
|
+
// critical lines (a local `sudo` password typo, say). A rule of its own
|
|
21023
|
+
// splits those apart and names what actually happened.
|
|
21024
|
+
//
|
|
21025
|
+
// No `remediation`: like the rule it came from, this one only reports. The
|
|
21026
|
+
// ban for these addresses comes from the ssh-* rules that match the
|
|
21027
|
+
// accompanying "Invalid user" line, which carries a source_ip to ban.
|
|
21028
|
+
id: "ssh-preauth-rejected",
|
|
21029
|
+
title: "SSH Connection Rejected Before Login",
|
|
21030
|
+
description: "A remote client failed the SSH handshake before authenticating; no session was established",
|
|
21031
|
+
version: "1.0.0",
|
|
21032
|
+
category: "auth",
|
|
21033
|
+
severity: "critical",
|
|
21034
|
+
source_types: ["user-journal", "system"],
|
|
21035
|
+
match: {
|
|
21036
|
+
field: "severity",
|
|
21037
|
+
operator: "equals",
|
|
21038
|
+
value: "critical",
|
|
21039
|
+
and: [{ field: "message", operator: "regex", value: SSHD_LINE }]
|
|
21040
|
+
},
|
|
21041
|
+
threshold: 1,
|
|
21042
|
+
window_seconds: 60,
|
|
21043
|
+
cooldown_seconds: 300,
|
|
21044
|
+
tags: ["ssh", "auth", "pre-auth", "reconnaissance"],
|
|
21045
|
+
enabled: true
|
|
21046
|
+
},
|
|
21001
21047
|
{
|
|
21002
21048
|
id: "exploit-probe-pattern",
|
|
21003
21049
|
title: "Exploit Probe Pattern",
|