From 51e5fe83d90129b4e4ede1bd9da64c7da24eaa45 Mon Sep 17 00:00:00 2001 From: Debian Date: Tue, 18 Aug 2026 14:20:54 +0200 Subject: [PATCH] =?UTF-8?q?feat(crowdsec):=20http-crawl-non=5Fstatics=20pe?= =?UTF-8?q?r=20Default=20in=20Simulation=20=E2=80=94=20verhindert=20FP-Ban?= =?UTF-8?q?s=20legitimer=20App-Nutzer=20=E2=80=94=20v1.3.21?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit http-crawl-non_statics ist bei modernen SPAs/Apps strukturell FP-anfällig: ein Seiten-Load/Sync feuert 40+ distinkte /api/-URLs, der Leaky-Bucket (capacity=40, leak ~2/s) läuft in Sekunden über → False-Positive-Ban legitimer Nutzer/Kunden (mehrere Kunden meldeten das; Incident 2026-08-18 bannte die Admin-Telekom-IP). postinst setzt das Scenario jetzt per Default in SIMULATION (alarmiert weiter, bannt aber nicht). Echte Angriffe (ssh-bf, http-cve-*, backdoors, CVE-2021-41773) bleiben scharf. Marker-geschützt (/var/lib/edgeguard/.crowdsec-crawl-sim-applied) → nur bei Erst-Install; ein späteres manuelles `cscli simulation disable` des Operators wird bei Updates NICHT überschrieben. Überlebt damit auch Node-Neuaufbau. Co-Authored-By: Claude Opus 4.8 --- VERSION | 2 +- packaging/debian/edgeguard-api/DEBIAN/postinst | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 14d56a2..4da23fd 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.3.20 \ No newline at end of file +1.3.21 \ No newline at end of file diff --git a/packaging/debian/edgeguard-api/DEBIAN/postinst b/packaging/debian/edgeguard-api/DEBIAN/postinst index b6093a1..3f013ca 100755 --- a/packaging/debian/edgeguard-api/DEBIAN/postinst +++ b/packaging/debian/edgeguard-api/DEBIAN/postinst @@ -879,6 +879,23 @@ WL install -o "$EG_USER" -g "$EG_USER" -m 0644 /dev/null \ /etc/crowdsec/parsers/s02-enrich/edgeguard-admin-hosts-whitelist.yaml sudo -n -u "$EG_USER" /usr/bin/edgeguard-ctl render-config --only=crowdsec-whitelist 2>/dev/null || true + + # CrowdSec-Simulations-Default: http-crawl-non_statics ist bei modernen + # SPAs/Apps strukturell FP-anfaellig — ein Seiten-Load/Sync feuert 40+ + # distinkte /api/-URLs, der Leaky-Bucket (capacity=40, leak ~2/s) laeuft + # in Sekunden ueber → False-Positive-Ban legitimer Nutzer/Kunden. Daher + # per Default in SIMULATION: alarmiert weiter, bannt aber nicht. Echte + # Angriffe (ssh-bf, http-cve-*, backdoors, CVE-2021-41773 …) bleiben + # scharf. Nur bei ERST-Install setzen (Marker) → ein spaeteres manuelles + # 'cscli simulation disable …' des Operators wird bei Updates NICHT + # wieder ueberschrieben. + EG_CROWDSEC_SIM_MARKER=/var/lib/edgeguard/.crowdsec-crawl-sim-applied + if [ ! -f "$EG_CROWDSEC_SIM_MARKER" ]; then + cscli simulation enable crowdsecurity/http-crawl-non_statics 2>/dev/null || true + install -d -m 0755 /var/lib/edgeguard + : > "$EG_CROWDSEC_SIM_MARKER" + systemctl reload crowdsec 2>/dev/null || systemctl restart crowdsec 2>/dev/null || true + fi fi # ── Render initial service configs ───────────────────────────