Windows PowerShell ScriptBlock Use of Remove-Item to Delete Files or Folders

Alerts on PowerShell ScriptBlockText containing Remove-Item/del/rm/rd-style -Path deletion commands.

FreeReviewedSigma · Low · v5
Product
windows
Category
ps_script
Author
frack113 (SigmaHQ), DRL 1.1
Published
2022-01-15
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. Defense Evasion

  8. Cred Access

  9. Discovery

  10. Lateral Movement

  11. Collection

  12. C2

  13. Exfiltration

  14. Impact

What it detects

This rule flags PowerShell ScriptBlock content that appears to delete files or folders by matching command aliases and parameters tied to removal operations. Attackers can use Remove-Item (and common aliases like del/erase/rm) with -Path and -Recurse to remove evidence or targeted data. It relies on ScriptBlock logging telemetry that records the executed PowerShell ScriptBlock text.

Related detections9 linkedT1070.004 — drag to rearrange
Suspicious Self-Delete Chain via Loopback Ping and File Deletion (via process_creation)
Suspicious Anti-Recovery Zeroing via fsutil setZeroData (via process_creation)
Suspicious Zone.Identifier Mark-of-the-Web Removal (via process_creation)
Suspicious Self-Deletion of Dropper via Command Line
Suspicious Self-Deletion via Choice Timer and Del Command via Cmd (via process_creation)
Suspicious Jump List AutomaticDestinations Deletion via Cmd (via process_creation)
Suspicious Self-Delete via cmd choice Timeout and Del
Suspicious Ping Loopback Delay Followed by File Deletion for Evasion
Suspicious Alternate Data Stream Self-Deletion via process_creation
Windows PowerShell ScriptBlock Use of Remove-Item to Delete Files or Folders
Pivot detection · T1070.004 · 9 related

Changelog

v5
  1. v5
    Candidate ingested via manual entry.2026-07-31
  2. v4
    Candidate ingested via manual entry.2026-07-31
  3. v3
    Candidate ingested via manual entry.2026-07-31
  4. v2
    Candidate ingested via manual entry.2026-07-31
  5. 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.