Has cleared logs including .bash_history, auth.log, lastlog, wtmp, and btmp.1
Clear Linux or Mac System Logs T1685.006
- Tactic
- Defense Impairment
- Platforms
- Linux, macOS
- Version
- 1.0
- Created
- 14 April 2026
- Last modified
- 12 May 2026
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:[1]
Clear Linux or Mac System Logs MITRE reference T1685.006
4 groups have been recorded using this technique. Newest first; each entry carries MITRE’s procedure text and a link to the group’s full record. Click a name to filter the rules below.
Has overwritten Linux system logs and unsets the Bash history file (effectively removing logging) during intrusions.1
Has removed system logs from /var/log/syslog.1
Has cleared log files within the /var/log/ folder.1
All 4 groups for this technique
4 software entries are documented implementing this technique. MITRE files each as a tool or as malware; newest first, then by how many groups carry them.
Can clear logs on all devices used along its connection path to compromised network infrastructure.1
Clears error logs after reading embedded commands for execution.1
Can clear possible malware traces such as application logs.1
Removes logs from /var/logs and /Library/logs.1
All 4 software entries for this technique
Offense vs defense T1685.006
Is defensive coverage keeping up with adversary use? Eight counts, each ranked against all 697 ATT&CK techniques. Attack sits left, defense right, so a shape leaning left means adversaries are better documented here than defenders are equipped. Hover any spoke for its percentile and the share of techniques that have more. The timeline below shows when each side arrived.
How it got here
Adversary activity (campaign spans) over cumulative rule output. Each source is plotted independently from zero, so neither line includes the other. Campaign dates are year-granularity.
Clear Linux or Mac System Logs detection strategy DET0520
MITRE names one behaviour worth catching for this technique and breaks it into 2 analytics, one per platform. Each carries the log sources it needs and the fields you tune per environment.
Behavioral Detection of Log File Clearing on Linux and macOS
AN1438 · Linux
Detects log-clearing behavior by correlating suspicious command execution targeting log files under /var/log/, anomalous deletions or truncations of system logs, and unusual child processes (e.g., shell pipelines or redirections).
Log sources
The data this analytic draws on. You do not need every component — each one you already collect covers part of it. Each links to its ATT&CK record.
| Data component | Name | Channel |
|---|---|---|
| Process CreationDC0032 | auditd:SYSCALL | execve |
| File DeletionDC0040 | auditd:SYSCALL | PATH |
Tunable fields
MITRE calls these the analytic’s mutable elements: the thresholds and filters you set for your own environment.
| Field | What you tune |
|---|---|
| TimeWindow | The time window used to correlate log file interaction and suspicious command execution. |
| LogFilePathPattern | Regex pattern used to match monitored log file paths (e.g., /var/log/auth.log). |
| UserContext | User or group (e.g., root) that should trigger higher severity detection. |
AN1439 · macOS
Detects adversary clearing log files on macOS by correlating calls to shell utilities (e.g., echo >, rm, truncate) targeting files in /var/log/ with unusual context (non-administrative users or abnormal process lineage).
Log sources
The data this analytic draws on. You do not need every component — each one you already collect covers part of it. Each links to its ATT&CK record.
| Data component | Name | Channel |
|---|---|---|
| Process CreationDC0032 | macos:unifiedlog | process |
| File ModificationDC0061 | fs:fsusage | truncate, unlink, write |
Tunable fields
MITRE calls these the analytic’s mutable elements: the thresholds and filters you set for your own environment.
| Field | What you tune |
|---|---|
| TimeWindow | Duration in which process activity and file I/O should be temporally linked. |
| LogFilePathPattern | Tunable path filter for macOS logs such as /var/log/system.log or /var/log/asl.log. |
| UserContext | Detects higher risk when log deletion is performed by unusual users (e.g., interactive vs. system users). |
Obfuscate/encrypt event files locally and in transit to avoid giving feedback to an adversary.
Automatically forward events to a log server or data repository to prevent conditions in which the adversary can locate and manipulate data on the local system. When possible, minimize time delay on event reporting to avoid prolonged storage on the local system.
Protect generated event files that are stored locally with proper permissions and authentication and limit opportunities for adversaries to increase privileges by preventing Privilege Escalation opportunities.
Tests from Atomic Red Team (MIT licence) · technique definition