Linux Shell History File Deletion via rm/unlink/shred

Alert on Linux command-line history file deletions using rm/unlink/shred targeting bash/zsh history files.

FreeReviewedSigma · High · v2
Product
linux
Category
process_creation
Author
Florian Roth (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2022-06-20
Updated
2026-07-31

ATT&CK techniques

Impact
  1. Recon

  2. Resource Dev

  3. Initial Access

  4. Execution

  5. Persistence

  6. Priv Esc

  7. Defense Evasion

  8. Cred Access

  9. Discovery

  10. Lateral Movement

  11. Collection

  12. C2

  13. Exfiltration

What it detects

This rule flags process creation events where the executed command name ends with rm, unlink, or shred and the command line targets shell history files such as .bash_history or .zsh_history. Attackers may delete these files to remove traces of prior commands and reduce forensic visibility. It relies on Linux process creation telemetry that includes the image path and full command line.

Related detections5 linkedT1565.001 — drag to rearrange
Linux process-created writes to sensitive or critical files via shell redirection or editors
Linux Commands Clearing or Removing /var/log/syslog
Azure Activity Logs: Device or Device Configuration Modified or Deleted
Azure Activity Logs: DNS Zone Write or Delete Operations
Cisco AAA commands: shutdown or config-register changes to boot into alternate modes
Linux Shell History File Deletion via rm/unlink/shred
Pivot detection · T1565.001 · 5 related

Changelog

v2
  1. v2
    Candidate ingested via manual entry.2026-07-31
  2. v1
    No changelog recorded for this version.2026-07-30

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.