Multiple System Log Files Deletion
Description
Monitors for the deletion of multiple sensitive Linux system logs. This may indicate an attempt to evade detection or destroy forensic evidence on a system.
Query · eql
sequence by process.parent.entity_id with maxspan=10s
[file where event.type == "deletion" and process.executable != null and file.path in (
"/var/run/utmp", "/var/log/wtmp", "/var/log/btmp", "/var/log/lastlog", "/var/log/faillog",
"/var/log/syslog", "/var/log/messages", "/var/log/secure", "/var/log/auth.log", "/var/log/boot.log",
"/var/log/kern.log", "/var/log/dmesg"
) and
not process.executable like (
"/kaniko/executor", "/var/lib/docker/overlay2/*/merged/kaniko/executor", "/kaniko/kaniko-executor"
)] as event0
[file where event.type == "deletion" and process.executable != null and
not startswith~(file.path, event0.file.path) and file.path in (
"/var/run/utmp", "/var/log/wtmp", "/var/log/btmp", "/var/log/lastlog", "/var/log/faillog",
"/var/log/syslog", "/var/log/messages", "/var/log/secure", "/var/log/auth.log", "/var/log/boot.log",
"/var/log/kern.log", "/var/log/dmesg"
) and
not process.executable like (
"/kaniko/executor", "/var/lib/docker/overlay2/*/merged/kaniko/executor", "/kaniko/kaniko-executor"
)] as event1
[file where event.type == "deletion" and process.executable != null and
not startswith~(file.path, event1.file.path) and file.path in (
"/var/run/utmp", "/var/log/wtmp", "/var/log/btmp", "/var/log/lastlog", "/var/log/faillog",
"/var/log/syslog", "/var/log/messages", "/var/log/secure", "/var/log/auth.log", "/var/log/boot.log",
"/var/log/kern.log", "/var/log/dmesg"
) and
not process.executable like (
"/kaniko/executor", "/var/lib/docker/overlay2/*/merged/kaniko/executor", "/kaniko/kaniko-executor"
)]