file where host.os.type == "linux" and event.type == "deletion" and
file.path :
(
"/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.name in ("gzip", "executor", "dockerd")
Install detection rules in Elastic Security
Detect System Log File Deletion in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(opens in a new tab or window).