Windows PowerShell Directory Enumeration via Get-ChildItem and Output Redirection

Flags PowerShell directory enumeration patterns using Get-ChildItem, error suppression, and appended output to a file.

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

ATT&CK techniques

Discovery
  1. Recon

  2. Resource Dev

  3. Initial Access

  4. Execution

  5. Persistence

  6. Priv Esc

  7. Defense Evasion

  8. Cred Access

  9. Lateral Movement

  10. Collection

  11. C2

  12. Exfiltration

  13. Impact

What it detects

This rule identifies PowerShell script block content that enumerates directories using Get-ChildItem with a -Path parameter, suppresses errors with SilentlyContinue, and writes results to a file via Out-File with -append. Attackers commonly enumerate filesystem structure to locate files for discovery, targeting, or staging prior to further actions. It relies on Script Block Logging telemetry that contains the script text elements used in the enumeration and output workflow.

Related detections9 linkedT1083 — drag to rearrange
Possible Local File Inclusion Path Traversal Targeting CentreStack Web.config
PUA: TruffleHog Execution on Windows via trufflehog.exe Process Launch
Linux Process Execution of TruffleHog with Secret-Scanning Platforms
Windows: Notepad Password File Discovery via Process Creation
Linux process execution of shell via nice utility
Linux: Shell Command Execution Using flock -u with Common Shell Paths
Linux Find Command Used to Execute a Shell via -exec
Linux Process Creation: GCC/C89/C99 Wrapper Executing Shell via -wrapper
Linux Process Execution via Vim/Vi/Rvim/Vimdiff Shell and Script Escapes
Windows PowerShell Directory Enumeration via Get-ChildItem and Output Redirection
Pivot detection · T1083 · 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.