Windows PowerShell Clears Console History via Clear-History

Flags PowerShell attempts to clear or delete console/PSReadline command history to hinder command forensics.

FreeReviewedSigma · High · v2
Product
windows
Category
ps_script
Author
Austin Songer @austinsonger (SigmaHQ), DRL 1.1
Published
2021-11-25
Updated
2026-07-31

ATT&CK techniques

Defense Evasion
  1. Recon

  2. Resource Dev

  3. Initial Access

  4. Execution

  5. Persistence

  6. Priv Esc

  7. Cred Access

  8. Discovery

  9. Lateral Movement

  10. Collection

  11. C2

  12. Exfiltration

  13. Impact

What it detects

This rule flags PowerShell script activity that attempts to clear console or command history, including commands containing Clear-History and related filesystem or history path operations. Attackers may use this to reduce forensic visibility by removing traces of interactive commands from the affected host. The detection relies on Script Block Logging telemetry and matches specific keywords and filename/path indicators within the captured script text.

Related detections9 linkedT1070 — drag to rearrange
Suspicious PlugX Self-Cleanup Batch Execution
Suspicious Choice Command Self-Destruct Delete Loop via Command Line
Suspicious Shell History Anti-Forensics via HISTFILE Manipulation
Malicious Ivanti Log Clearing via logClear Perl Script (via process_creation)
Suspicious Shell History and Log Clearing on Linux
Suspicious Shell History Disabling via HISTFILE Redirection on Linux
Suspicious Browser History Wipe via Rundll32 ClearMyTracksByProcess (via process_creation)
Suspicious Shell History Clearing or Disabling (via process_creation)
USN Change Journal Deletion via Fsutil (via process_creation)
Windows PowerShell Clears Console History via Clear-History
Pivot detection · T1070 · 9 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.