Wie erhalte ich dauerhafte Prüfprotokolle?

Wie erhalte ich dauerhafte Prüfprotokolle?

Ich versuche gerade herauszufinden, welche Anwendung eine mysteriöse Socket-Datei namens „no“ in meinem Home-Verzeichnis erstellt. Das passiert nur alle paar Wochen, deshalb habe ich auditd mit der folgenden Regel eingerichtet /etc/audit.d/rules.d/no:

# This is to clear out old rules, so we don't append to them.
-D

# Feel free to add below this line. See auditctl man page
-w /home/philipp/no

Das Ausführen einiger Tests hat touch /home/philipp/nobestätigt, dass dies funktioniert. Die Protokolldateien sind jedoch nicht dauerhaft.

Ich habe gerade festgestellt, dass die Datei offenbar gestern erstellt wurde, das Auditd-Protokoll jedoch verschwunden ist. Es wurde heute beim Booten der Maschine durch ein neues Protokoll überschrieben, obwohl die Protokolle in der Konfiguration auf „Rotieren“ eingestellt sind.

Wie kann ich auditd so einstellen, dass alle Protokolle gespeichert werden? Ich verwende Gentoo mit systemd und Version 3.0 von audit.

auditd.conf:

#
# This file controls the configuration of the audit daemon
#

local_events = yes
write_logs = yes
log_file = /var/log/audit/audit.log
log_group = root
log_format = ENRICHED
flush = INCREMENTAL_ASYNC
freq = 50
max_log_file = 8
num_logs = 5
priority_boost = 4
name_format = NONE
##name = mydomain
max_log_file_action = KEEP_LOGS
space_left = 75
space_left_action = SYSLOG
verify_email = yes
action_mail_acct = root
admin_space_left = 50
admin_space_left_action = SUSPEND
disk_full_action = SUSPEND
disk_error_action = SUSPEND
use_libwrap = yes
##tcp_listen_port = 60
tcp_listen_queue = 5
tcp_max_per_addr = 1
##tcp_client_ports = 1024-65535
tcp_client_max_idle = 0
transport = TCP
krb5_principal = auditd
##krb5_key_file = /etc/audit/audit.key
distribute_network = no
q_depth = 400
overflow_action = SYSLOG
max_restarts = 10
plugin_dir = /etc/audit/plugins.d

verwandte Informationen