PowerShell FromBase64String Decoding of Base64 Gzip Content in Process Creation on Windows

Windows process command lines using PowerShell FromBase64String with MemoryStream and Gzip-like Base64 markers (H4sI) are flagged.

FreeReviewedSigma · Medium · v1
Product
windows
Category
process_creation
Author
frack113 (SigmaHQ), DRL 1.1
Published
2022-12-23
Updated
2026-07-30

ATT&CK techniques

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

  13. Impact

What it detects

This rule flags Windows process creation events where the command line contains PowerShell decoding of a Base64 payload using FromBase64String, combined with evidence of in-memory handling (MemoryStream) and a Gzip header marker (H4sI). Attackers commonly use this pattern to reconstruct compressed data and prepare it for execution or loading into memory without writing cleartext artifacts to disk. Detection relies on process command-line telemetry capturing these specific substrings within the PowerShell command line.

Related detections7 linkedT1132.001 — drag to rearrange
Malicious Project CAV3RN DNS Configuration Recovery via cloudlanecdn.com (via dns_query)
Malicious Credential Harvesting Request via All-in-1 PHP Endpoint (via proxy)
Suspicious Long Alphanumeric DNS Subdomain Indicative of DNS Tunneling
Suspicious DNS Tunneling With Hex Subdomain To info Domain (via dns_query)
PowerShell GzipStream Decompression Attempts on Windows
PowerShell: FromBase64String Decoding of Gzip (H4sI) into MemoryStream
Windows Execution of dnscat2 and iodine DNS Exfiltration/Tunneling Tools
PowerShell FromBase64String Decoding of Base64 Gzip Content in Process Creation on Windows
Pivot detection · T1132.001 · 7 related

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.