Sigma rule: Invoke-Obfuscation Obfuscated IEX Invocation - PowerShell
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-8be296131ae7, updated 2022-12-31T00:00:00.000Z.
Rule
- Title
- Invoke-Obfuscation Obfuscated IEX Invocation - PowerShell
- Status
- test
- Level
- high
- Author
- Daniel Bohannon (@Mandiant/@FireEye), oscd.community
- Date
- 2019-11-08
- Modified
- 2022-12-31
- File
- rules/windows/powershell/powershell_script/posh_ps_invoke_obfuscation_obfuscated_iex.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects all variations of obfuscated powershell IEX invocation code generated by Invoke-Obfuscation framework from the following code block \u2014
Log source
- product
- windows
- category
- ps_script
- definition
- Requirements: Script Block Logging must be enabled
Detection
selection_iex:
- ScriptBlockText|re: '\$PSHome\[\s*\d{1,3}\s*\]\s*\+\s*\$PSHome\['
- ScriptBlockText|re: '\$ShellId\[\s*\d{1,3}\s*\]\s*\+\s*\$ShellId\['
- ScriptBlockText|re: '\$env:Public\[\s*\d{1,3}\s*\]\s*\+\s*\$env:Public\['
- ScriptBlockText|re: '\$env:ComSpec\[(\s*\d{1,3}\s*,){2}'
- ScriptBlockText|re: '\*mdr\*\W\s*\)\.Name'
- ScriptBlockText|re: '\$VerbosePreference\.ToString\('
condition: selection_iexFalse positives (as the rule lists them)
- Unknown
Tags
- attack.stealth
- attack.t1027
- attack.execution
- attack.t1059.001
MITRE ATT&CK ids this rule names
References
Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_invoke_obfuscation_obfuscated_iex.yml
Sources and licences
SigmaHQ
"Invoke-Obfuscation Obfuscated IEX Invocation - PowerShell" by Daniel Bohannon (@Mandiant/@FireEye), oscd.community (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_invoke_obfuscation_obfuscated_iex.yml.
Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License
Cite this page
Dragons Eye Ransomware Tracker, "Sigma rule: Invoke-Obfuscation Obfuscated IEX Invocation - PowerShell",
entity page, dataset version ref-8be296131ae7, updated 2022-12-31T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/1b9dc62e-6e9e-42a3-8990-94d7a10007f7 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 1b9dc62e-6e9e-42a3-8990-94d7a10007f7, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.
Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.