Authentifizierung (sec-auth)
Überwacht fehlgeschlagene Login-Versuche, Root-/Administrator-Anmeldungen und SSH-Konfiguration. Erkennt Brute-Force-Angriffe und unsichere SSH-Einstellungen.
Konfiguration
| Parameter | Typ | Default | Beschreibung |
|---|---|---|---|
enabled | bool | true | Modul aktivieren/deaktivieren |
failed_login_threshold | int | 5 | Schwellwert für fehlgeschlagene Logins pro IP |
failed_login_window_minutes | int | 15 | Zeitfenster für Login-Zählung (Minuten) |
alert_on_root_login | bool | true | Bei Root-/Admin-Login alarmieren |
root_login_allowed_ips | list | [] | IPs, von denen Root-Login erlaubt ist |
audit_ssh_config | bool | true | SSH-Konfiguration prüfen (nur Linux) |
ssh_config_path | string | /etc/ssh/sshd_config | Pfad zur sshd_config |
expected_permit_root_login | string | no | Erwarteter PermitRootLogin-Wert |
expected_password_auth | string | no | Erwarteter PasswordAuthentication-Wert |
log_paths | list | [] | Zusätzliche Auth-Log-Pfade |
use_journalctl | bool/null | null | journalctl erzwingen (true) oder automatisch erkennen (null) |
YAML-Beispiel
sec_auth:
enabled: true
failed_login_threshold: 10
failed_login_window_minutes: 30
alert_on_root_login: true
root_login_allowed_ips:
- "10.0.0.1"
audit_ssh_config: true
expected_permit_root_login: "no"
expected_password_auth: "no"
Diagnose-Codes
| Code | Severity | Bedeutung | Empfehlung |
|---|---|---|---|
| 4000 | 0 | Keine Authentifizierungsprobleme erkannt | — |
| 4001 | 1–2 | Viele fehlgeschlagene Logins von einer IP | IP prüfen, ggf. sperren (fail2ban) |
| 4002 | 1–2 | Root-/Admin-Login von externer IP erkannt | Zugriff einschränken, SSH-Keys nutzen |
| 4003 | 1 | Fehlgeschlagene Sudo-Versuche oder Kontoänderungen | Betroffene Konten prüfen |
| 4090 | 1 | Auth-Logs nicht lesbar | Berechtigungen prüfen, journalctl testen |
| 6001 | 1 | SSH erlaubt Root-Login | PermitRootLogin no in sshd_config setzen |
| 6002 | 1 | SSH erlaubt Passwort-Authentifizierung | PasswordAuthentication no setzen, SSH-Keys nutzen |
Plattform-Unterstützung
- Linux: Liest
/var/log/auth.logoderjournalctl -u ssh. SSH-Konfigurationsprüfung. - Windows: Wertet das Security Event Log aus (Event-IDs 4625, 4624, etc.).