PowerShell Script Block Collection of Documents via Recursive Get-ChildItem

Alerts on PowerShell file enumeration that recursively searches and includes common document extensions via Get-ChildItem.

FreeReviewedSigma · Medium · v2
Product
windows
Category
ps_script
Author
frack113 (SigmaHQ), DRL 1.1
Published
2021-07-28
Updated
2026-07-31

ATT&CK techniques

Collection
  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. C2

  12. Exfiltration

  13. Impact

What it detects

This rule flags PowerShell script blocks that both recursively enumerate files and include common document extensions such as .doc/.docx, .xls/.xlsx, .ppt/.pptx, .rtf, .pdf, and .txt. Adversaries can use this automated discovery behavior to locate and stage internal data for later collection or exfiltration. It relies on ScriptBlockText contents from PowerShell script block logging on Windows and matches specific text patterns within the script block.

Related detections7 linkedT1119 — drag to rearrange
Suspicious LameHug Staging Directory and Info File Creation on Windows
Suspicious Recursive Credential and Wallet Search Written to Temp Inventory File
Malicious Shai-Hulud Data Exfiltration Script Execution via Process Creation
Linux File Events: Malicious GitHub Workflow File Creation (shai-hulud-workflow*.yml/yaml)
Windows PowerShell Recon via Export-Oriented Commands in Script Block Logging
Windows Process Creation: Recon Data Export via Command Prompt Redirection
Windows Process Creation: Automated Document and Directory Discovery via dir and findstr
PowerShell Script Block Collection of Documents via Recursive Get-ChildItem
Pivot detection · T1119 · 7 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.