Invoke-Obfuscation Obfuscated IEX Invocation - PowerShell Module
Detects all variations of obfuscated powershell IEX invocation code generated by Invoke-Obfuscation framework from the code block cited in the reference section below
Sigma rule (View on GitHub)
1title: Invoke-Obfuscation Obfuscated IEX Invocation - PowerShell Module
2id: 2f211361-7dce-442d-b78a-c04039677378
3related:
4 - id: 1b9dc62e-6e9e-42a3-8990-94d7a10007f7
5 type: derived
6status: test
7description: Detects all variations of obfuscated powershell IEX invocation code generated by Invoke-Obfuscation framework from the code block cited in the reference section below
8references:
9 - https://github.com/danielbohannon/Invoke-Obfuscation/blob/f20e7f843edd0a3a7716736e9eddfa423395dd26/Out-ObfuscatedStringCommand.ps1#L873-L888
10author: Daniel Bohannon (@Mandiant/@FireEye), oscd.community
11date: 2019-11-08
12modified: 2022-12-31
13tags:
14 - attack.defense-evasion
15 - attack.t1027
16 - attack.execution
17 - attack.t1059.001
18logsource:
19 product: windows
20 category: ps_module
21 definition: 0ad03ef1-f21b-4a79-8ce8-e6900c54b65b
22detection:
23 selection_payload:
24 - Payload|re: '\$PSHome\[\s*\d{1,3}\s*\]\s*\+\s*\$PSHome\['
25 - Payload|re: '\$ShellId\[\s*\d{1,3}\s*\]\s*\+\s*\$ShellId\['
26 - Payload|re: '\$env:Public\[\s*\d{1,3}\s*\]\s*\+\s*\$env:Public\['
27 - Payload|re: '\$env:ComSpec\[(\s*\d{1,3}\s*,){2}'
28 - Payload|re: '\*mdr\*\W\s*\)\.Name'
29 - Payload|re: '\$VerbosePreference\.ToString\('
30 - Payload|re: '\[String\]\s*\$VerbosePreference'
31 condition: selection_payload
32falsepositives:
33 - Unknown
34level: high
References
Related rules
- ConvertTo-SecureString Cmdlet Usage Via CommandLine
- Invoke-Obfuscation CLIP+ Launcher
- Invoke-Obfuscation CLIP+ Launcher - PowerShell
- Invoke-Obfuscation CLIP+ Launcher - PowerShell Module
- Invoke-Obfuscation CLIP+ Launcher - Security