netsec-scan: three-tick web-port gate (2 still leaked ~2 lines per CI build)

Measured on the 00:40 run: a second-tick gate cut a 21-line CDN burst to 2 lines,
still noise for a channel whose whole value is being quiet. A beacon/exfil
destination persists for hours (rule 8 catches periodicity at >=20 conns/2h), a
CDN endpoint used by one job does not survive 15 minutes. Stated cost documented
in config + README.
This commit is contained in:
sirius 2026-11-27 00:41:41 -05:00
commit f4001d589e
3 changed files with 44 additions and 28 deletions

View file

@ -81,12 +81,15 @@ BEACON_MAX_INTERVAL = 900.0 # mean interval ceiling; 30s beacons fit, 1h cron-i
# Severity for a first-seen egress tuple: standard web ports are common CDN
# churn, everything else is a much stronger beacon/exfil signal.
WEB_PORTS = frozenset({80, 443, 8080, 8443})
# A first-seen *web-port* tuple must also be observed in a second tick before it
# alerts. Measured 2026-11-27: one CI run produced 20 one-shot AWS/GitHub CDN
# destinations in a single 5-minute window, which is a 20-line message and
# exactly how a channel gets muted. CDN rotation is one-shot; a beacon or an
# exfil destination is retried. Non-web ports still alert on first sight.
EGRESS_WEB_MIN_TICKS = 2
# A first-seen *web-port* tuple must also be observed in three distinct ticks
# (~15 min) before it alerts. Measured 2026-11-27: one CI run produced 20
# one-shot AWS/GitHub CDN destinations inside a single 5-minute window, and a
# second-tick gate still let ~2 through per build. CDN rotation is one-shot or
# short-lived; a beacon or an exfil destination persists. Stated cost: a
# smash-and-grab that contacts a brand-new host twice and stops is NOT alerted
# on 80/443/8080/8443 (it is on any other port, and on any DROPPED verdict),
# and periodic C2 is rule 8's job (`beacon-shape`, >= 20 conns in 2 h).
EGRESS_WEB_MIN_TICKS = 3
MAX_EGRESS_COUNTS = 20000
# Re-alert cooldown for *state* tripwires (current-condition rules). Flow