T1070.003 Clear Command History
Stealthon attack.mitre.org
ATT&CK Enterprise 20.0 · 20.1 released, update in review
How MITRE detects it
DET0165 Behavioral Detection of Command History Clearing
AN0467 Linux
Detects adversary behavior clearing command history via `history -c`, deletion or modification of ~/.bash_history, or manipulation of the HISTFILE environment variable post-login.
| MITRE log source | In Microsoft Sentinel |
|---|---|
auditd:SYSCALLexecve | Not mapped to Sentinel yet. |
auditd:SYSCALLPATH | Not mapped to Sentinel yet. |
AN0468 macOS
Detects adversary clearing shell history using `history -c` or deleting/altering ~/.zsh_history or ~/.bash_history. Focus on sessions with missing or wiped history.
| MITRE log source | In Microsoft Sentinel |
|---|---|
macos:unifiedlogprocess | Not mapped to Sentinel yet. |
fs:fsusageunlink, write | Not mapped to Sentinel yet. |
AN0469 Windows
Detects PowerShell `Clear-History` invocation or deletion of `ConsoleHost_history.txt` to erase past PowerShell session history.
| MITRE log source | In Microsoft Sentinel |
|---|---|
WinEventLog:PowerShellEventCode=4103, 4104, 4105, 4106 |
|
WinEventLog:SysmonEventCode=23 |
Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent. |
WinEventLog:SecurityEventCode=4663, 4670, 4656 |
The same events land in SecurityEvent (Windows Security Events connectors) or WindowsEvent (Windows Event Forwarding); many built-in rules read SecurityEvent only. |
AN0470 ESXi
Detects modification or truncation of `/var/log/shell.log` used to persist ESXi shell command history. Especially suspicious shortly after login or config changes.
| MITRE log source | In Microsoft Sentinel |
|---|---|
esxi:shell/var/log/shell.log | Not mapped to Sentinel yet. |
AN0471 Network Devices
Detects use of `clear history` or `clear logging` commands on network device CLI to remove past activity logs.
| MITRE log source | In Microsoft Sentinel |
|---|---|
networkdevice:syslogCLI command audit | Not mapped to Sentinel yet. |
Content Hub rules tagged with it (0)
No Content Hub rule is tagged with this technique.
In Sigma rules
9 SigmaHQ community rules name it in their tags.
- Cisco Clear Logs
- Clearing Windows Console History
- Disable Powershell Command History
- Linux Command History Tampering
- Clear PowerShell History - PowerShell
- Clear PowerShell History - PowerShell Module
- Suspicious IO.FileStream
- RunMRU Registry Key Deletion
- RunMRU Registry Key Deletion - Registry
Mitigations
M1022Restrict File and Directory PermissionsM1029Remote Data StorageM1039Environment Variable Permissions
MITRE ATT&CK® is a registered trademark of The MITRE Corporation. VeriKQL is not affiliated with or endorsed by MITRE. ATT&CK data © The MITRE Corporation, used under its terms of use.