Detectionmediumstable
Linux Logs Clearing Attempts
Detects logs clearing attempts on Linux systems via utilities such as 'rm', 'rmdir', 'shred', and 'unlink' targeting log files and directories. Adversaries often try to clear logs to cover their tracks after performing malicious activities.
Convert In Phoenix Studio
Open this Sigma rule in the converter with the YAML preloaded and ready for backend selection.
Launch
Ömer Günal, oscd.communityCreated Wed Oct 07Updated Wed Mar 1880915f59-9b56-4616-9de0-fd0dea6c12felinux
Log Source
LinuxProcess Creation
ProductLinux← raw: linux
CategoryProcess Creation← raw: process_creation
Events generated when a new process is spawned on the system. Covers command-line arguments, parent/child relationships, and process metadata.
Detection Logic
Detection Logic3 selectors
detection:
selection:
Image|endswith:
- '/rm' # covers /rmdir as well
- '/rmdir'
- '/shred'
- '/unlink'
CommandLine|contains:
- '/var/log'
- '/var/spool/mail'
filter_main_legit_systat:
Image|endswith: '/rm'
CommandLine|startswith: 'rm -f /var/log/sysstat/'
filter_main_dmseg:
Image|endswith: '/rm'
CommandLine|startswith: 'rm -f -- /var/log//dmesg' # // before dmesg is not typo
condition: selection and not 1 of filter_main_*False Positives
Legitimate administration activities
References
MITRE ATT&CK
Tactics
Sub-techniques
Rule Metadata
Rule ID
80915f59-9b56-4616-9de0-fd0dea6c12fe
Status
stable
Level
medium
Type
Detection
Created
Wed Oct 07
Modified
Wed Mar 18
Author
Path
rules/linux/process_creation/proc_creation_lnx_clear_logs.yml
Raw Tags
attack.defense-evasionattack.t1070.002