@profullstack/threatcrush 0.13.71 → 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/dist/index.js
CHANGED
|
@@ -49964,6 +49964,9 @@ var import_node_path42 = require("path");
|
|
|
49964
49964
|
|
|
49965
49965
|
// src/daemon/rules/default-rules.ts
|
|
49966
49966
|
var AT_CRS_THRESHOLD = { field: "severity", operator: "regex", value: "^(high|critical)$" };
|
|
49967
|
+
var SSHD_IDENT = String.raw`\[sshd(?:-session|-auth)?\]`;
|
|
49968
|
+
var SSHD_LINE = `^${SSHD_IDENT}`;
|
|
49969
|
+
var NOT_SSHD_LINE = `^(?!${SSHD_IDENT})`;
|
|
49967
49970
|
var DEFAULT_RULES = [
|
|
49968
49971
|
{
|
|
49969
49972
|
id: "ssh-brute-force",
|
|
@@ -50364,7 +50367,14 @@ var DEFAULT_RULES = [
|
|
|
50364
50367
|
match: {
|
|
50365
50368
|
field: "severity",
|
|
50366
50369
|
operator: "equals",
|
|
50367
|
-
value: "critical"
|
|
50370
|
+
value: "critical",
|
|
50371
|
+
// sshd's pre-auth failures are logged at syslog priority 2, so they used
|
|
50372
|
+
// to land here and every SSH bot arrived titled "Critical System Error".
|
|
50373
|
+
// They belong to `ssh-preauth-rejected` below. Excluded on `message`, not
|
|
50374
|
+
// on `details.process`: matchesCondition fails a condition whose field is
|
|
50375
|
+
// undefined, so an `and` on `process` would stop this rule matching every
|
|
50376
|
+
// critical line that has no process (the kernel's, for one).
|
|
50377
|
+
and: [{ field: "message", operator: "regex", value: NOT_SSHD_LINE }]
|
|
50368
50378
|
},
|
|
50369
50379
|
threshold: 1,
|
|
50370
50380
|
window_seconds: 60,
|
|
@@ -50372,6 +50382,42 @@ var DEFAULT_RULES = [
|
|
|
50372
50382
|
tags: ["system", "critical"],
|
|
50373
50383
|
enabled: true
|
|
50374
50384
|
},
|
|
50385
|
+
{
|
|
50386
|
+
// Anthony, 2026-11-04, on being called for these: "it can call me when
|
|
50387
|
+
// unauthorized access, i want to know" — so this stays `critical` and pages
|
|
50388
|
+
// exactly as `system-critical-error` did (store.ts pages on `critical`, or
|
|
50389
|
+
// on a rule in PAGED_ATTEMPT_RULES). What changes is what the page says.
|
|
50390
|
+
//
|
|
50391
|
+
// sshd logs a rejected handshake at priority 2 — "fatal: userauth_pubkey:
|
|
50392
|
+
// parse publickey packet: incomplete message [preauth]", "banner exchange:
|
|
50393
|
+
// ... invalid format" — so a bot that never authenticated used to raise
|
|
50394
|
+
// "Critical System Error", and because `dedupe_key` is
|
|
50395
|
+
// `detection:<server>:<rule_id>` it shared ONE incident with unrelated
|
|
50396
|
+
// critical lines (a local `sudo` password typo, say). A rule of its own
|
|
50397
|
+
// splits those apart and names what actually happened.
|
|
50398
|
+
//
|
|
50399
|
+
// No `remediation`: like the rule it came from, this one only reports. The
|
|
50400
|
+
// ban for these addresses comes from the ssh-* rules that match the
|
|
50401
|
+
// accompanying "Invalid user" line, which carries a source_ip to ban.
|
|
50402
|
+
id: "ssh-preauth-rejected",
|
|
50403
|
+
title: "SSH Connection Rejected Before Login",
|
|
50404
|
+
description: "A remote client failed the SSH handshake before authenticating; no session was established",
|
|
50405
|
+
version: "1.0.0",
|
|
50406
|
+
category: "auth",
|
|
50407
|
+
severity: "critical",
|
|
50408
|
+
source_types: ["user-journal", "system"],
|
|
50409
|
+
match: {
|
|
50410
|
+
field: "severity",
|
|
50411
|
+
operator: "equals",
|
|
50412
|
+
value: "critical",
|
|
50413
|
+
and: [{ field: "message", operator: "regex", value: SSHD_LINE }]
|
|
50414
|
+
},
|
|
50415
|
+
threshold: 1,
|
|
50416
|
+
window_seconds: 60,
|
|
50417
|
+
cooldown_seconds: 300,
|
|
50418
|
+
tags: ["ssh", "auth", "pre-auth", "reconnaissance"],
|
|
50419
|
+
enabled: true
|
|
50420
|
+
},
|
|
50375
50421
|
{
|
|
50376
50422
|
id: "exploit-probe-pattern",
|
|
50377
50423
|
title: "Exploit Probe Pattern",
|