Windows PowerShell Recon via Export-Oriented Commands in Script Block Logging

Detects PowerShell script blocks performing recon queries (services/processes) and writing output to TEMP.

FreeReviewedSigma · Medium · v2
Product
windows
Category
ps_script
Author
frack113 (SigmaHQ), DRL 1.1
Published
2021-07-30
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 identifies PowerShell script block content that includes service, filesystem, and process discovery activity along with evidence of redirecting output to a temporary path under %TEMP%. Such collection behavior can be used to inventory internal assets and prepare data for later export or analysis by an attacker. It relies on Script Block Logging telemetry capturing ScriptBlockText and matching specific command and redirection patterns.

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 Process Creation: Recon Data Export via Command Prompt Redirection
PowerShell Script Block Collection of Documents via Recursive Get-ChildItem
Windows Process Creation: Automated Document and Directory Discovery via dir and findstr
Windows PowerShell Recon via Export-Oriented Commands in Script Block Logging
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.