Indicator Removal: Clear Linux or Mac System Logs T1070.002

Tactic: Stealth

Adversaries may clear system logs to hide evidence of an intrusion. macOS and Linux both keep track of system or user-initiated actions via system logs. The majority of native system logging is stored under the /var/log/ directory. Subfolders in this directory categorize logs by their related functions, such as:

Authoring guide

Patterns shared across the 4 rules above: which fields they filter on, what specific values they look for, and what they exclude. The catalog normalizes field names across vendors so Sigma's Image, Elastic's process.name, and Splunk's process_name collapse into one row. Each rule contributes at most once per row.

Fields filtered most (9 distinct)

The fields most rules look at when detecting this technique. The How column shows the operators authors use (eq, wildcard, regex_match, match) and how often each appears. Sample values are concrete examples to start from, not an exhaustive list.

FieldRulesHowSample values
host.os.type4eq 4
EventType3in 3ProcessRollup2, exec, exec_event, creation, file_create_event
event.type3eq 3start, deletion
process_name3eq 2, starts_with 1., dmesg, journalctl
TargetFilename2in 1, starts_with 1/var/log/, /var/log/auth.log, /var/log/boot.log, /var/log/btmp
process.args2in 1, starts_with 1--clear, --read-clear, --vacuum-files=, --vacuum-size=, --vacuum-time=
Image1starts_with 1./, /boot/, /dev/shm/
event.category1eq 1file
process.parent.args1ne 1/etc/cron.daily/clean-journal-logs

Top indicator values (41 distinct)

Specific (field, operator, value) combinations the rules check for, ranked by how many rules under this technique use each one. The Corpus reach column counts how many rules across the entire catalog (any technique) check the same combination. High numbers point to widely-used indicators that are likely noisy on their own; combine them with another condition for useful signal. Blank means the combination is specific to rules under this technique. Click a value to expand the rules under this technique that use it.

FieldKindValueRules (here)Corpus reach
EventTypein
ProcessRollup2
2117
EventTypein
exec
2171
EventTypein
exec_event
2139
EventTypein
executed
288
EventTypein
process_started
274
EventTypein
start
2134
EventTypein
creation
123
EventTypein
file_create_event
19
EventTypein
file_rename_event
14
EventTypein
rename
118
event.typeeq
start
2606
Imagestarts_with
./
110
Imagestarts_with
/boot/
110
Imagestarts_with
/dev/shm/
123
Imagestarts_with
/tmp/
125
Imagestarts_with
/var/tmp/
124
TargetFilenamein
/var/log/auth.log
1
TargetFilenamein
/var/log/boot.log
1
TargetFilenamein
/var/log/btmp
1
TargetFilenamein
/var/log/dmesg
1
TargetFilenamein
/var/log/faillog
1
TargetFilenamein
/var/log/kern.log
1
TargetFilenamein
/var/log/lastlog
1
TargetFilenamein
/var/log/messages
1
TargetFilenamein
/var/log/secure
1
TargetFilenamein
/var/log/syslog
1
TargetFilenamein
/var/log/wtmp
1
TargetFilenamein
/var/run/utmp
1
TargetFilenamestarts_with
/var/log/
1
event.categoryeq
file
131

Exclusions (10 distinct)

Field/operator/value combinations excluded by rules under this technique (top-level not() clauses), sorted by how many rules exclude each. These are the false-positive paths the community has learned to filter out. A new rule that ignores the high-count entries here will likely fire on the same noisy paths. Click a value to expand the rules under this technique that exclude it.

FieldKindValueRules excluding
Imageeq
./install
1
Imageeq
./usr/bin/podman
1
Imagein
/dev/fd/3
1
Imagein
/usr/bin/podman
1
Imagestarts_with
/tmp/ubuntu-release-upgrader-
1
Imagewildcard
/tmp/vmis.*/install/vmware-installer/vmis-launcher
1
file.nameeq
lastlog
1
process_namein
dockerd
1
process_namein
executor
1
process_namein
gzip
1

Rules under this technique

Every rule in the catalog tagged with this technique, grouped by vendor. Click a rule title for its full predicates, exclusions, and indicators.

Platform (all)
Domain (all)

Elastic 4 rules