Windows Process Creation: Detect Obfuscated PowerShell IEX Invocation from Invoke-Obfuscation
Detects PowerShell commands showing obfuscation markers consistent with Invoke-Obfuscation-powered IEX invocation.
- Product
- windows
- Category
- process_creation
- Author
- Daniel Bohannon (@Mandiant/@FireEye), oscd.community (SigmaHQ), DRL 1.1
- Published
- 2019-11-08
- Updated
- 2026-07-31
ATT&CK techniques
Execution → Defense EvasionRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule flags Windows process creation events where the PowerShell command line contains multiple string/variable patterns consistent with obfuscated IEX-style invocation generated by the Invoke-Obfuscation framework. Obfuscated invocation helps attackers reduce readability, evade basic detections, and execute code with less attention to intent. Detection relies on CommandLine telemetry captured at process start, matching several regular expressions tied to specific obfuscation artifacts.
Reporting behind it
- github.comhttps://github.com/danielbohannon/Invoke-Obfuscation/blob/f20e7f843edd0a3a7716736e9eddfa423395dd26/Out-ObfuscatedStringCommand.ps1#L873-L888
- github.comhttps://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_hktl_invoke_obfuscation_obfuscated_iex_commandline.yml
Changelog
v2- v2Candidate ingested via manual entry.2026-07-31
- v1No 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.
title: "Windows Process Creation: Detect Obfuscated PowerShell IEX Invocation from Invoke-Obfuscation"
id: 57577c3e-766b-41c6-a20b-29e1250173ea
status: test
description: This rule flags Windows process creation events where the PowerShell command line contains multiple string/variable patterns consistent with obfuscated IEX-style invocation generated by the Invoke-Obfuscation framework. Obfuscated invocation helps attackers reduce readability, evade basic detections, and execute code with less attention to intent. Detection relies on CommandLine telemetry captured at process start, matching several regular expressions tied to specific obfuscation artifacts.
references:
- https://github.com/danielbohannon/Invoke-Obfuscation/blob/f20e7f843edd0a3a7716736e9eddfa423395dd26/Out-ObfuscatedStringCommand.ps1#L873-L888
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_hktl_invoke_obfuscation_obfuscated_iex_commandline.yml
author: Daniel Bohannon (@Mandiant/@FireEye), oscd.community, Huntrule Team
date: 2019-11-08
modified: 2026-03-16
tags:
- attack.stealth
- attack.t1027
- attack.execution
- attack.t1059.001
logsource:
category: process_creation
product: windows
detection:
selection:
- CommandLine|re: \$PSHome\[\s*\d{1,3}\s*\]\s*\+\s*\$PSHome\[
- CommandLine|re: \$ShellId\[\s*\d{1,3}\s*\]\s*\+\s*\$ShellId\[
- CommandLine|re: \$env:Public\[\s*\d{1,3}\s*\]\s*\+\s*\$env:Public\[
- CommandLine|re: \$env:ComSpec\[(?:\s*\d{1,3}\s*,){2}
- CommandLine|re: \*mdr\*\W\s*\)\.Name
- CommandLine|re: \$VerbosePreference\.ToString\(
- CommandLine|re: \[String\]\s*\$VerbosePreference
condition: selection
falsepositives:
- Unknown
level: high
license: DRL-1.1
related:
- id: 4bf943c6-5146-4273-98dd-e958fd1e3abf
type: derived