PowerShell Data Exfiltration Using Audio File (WAV BinaryWriter) on Windows

Alerts on PowerShell script blocks that appear to write data into an audio (WAV) file for potential exfiltration.

FreeReviewedSigma · Medium · v2
Product
windows
Category
ps_script
Author
Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2023-01-16
Updated
2026-07-31

What it detects

This rule identifies PowerShell script content that assembles audio/WAV-like binary output using BinaryWriter and file mode operations, along with byte patterns consistent with a WAV header. Attackers can use this technique to conceal exfiltrated data inside media-like files to evade straightforward network or content inspection. It relies on Script Block Logging telemetry capturing the PowerShell ScriptBlockText that matches the specified .NET and header byte strings.

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.