Invoke-Obfuscation Obfuscated IEX Invocation

Detects all variations of obfuscated powershell IEX invocation code generated by Invoke-Obfuscation framework (See reference section for code block)

Sigma rule (View on GitHub)

 1title: Invoke-Obfuscation Obfuscated IEX Invocation
 2id: e75c48bd-3434-4d61-94b7-ddfaa2c08487
 3related:
 4    - id: 51aa9387-1c53-4153-91cc-d73c59ae1ca9
 5      type: derived
 6description: Detects all variations of obfuscated powershell IEX invocation code generated by Invoke-Obfuscation framework (See reference section for code block)
 7references:
 8    - https://github.com/danielbohannon/Invoke-Obfuscation/blob/f20e7f843edd0a3a7716736e9eddfa423395dd26/Out-ObfuscatedStringCommand.ps1#L873-L888
 9status: unsupported
10author: Daniel Bohannon (@Mandiant/@FireEye), oscd.community
11date: 2019/11/08
12modified: 2022/07/07
13tags:
14    - attack.defense_evasion
15    - attack.t1027
16logsource:
17    product: windows
18    category: driver_load
19detection:
20    selection:
21        - ImagePath|re: '\$PSHome\[\s*\d{1,3}\s*\]\s*\+\s*\$PSHome\['
22        - ImagePath|re: '\$ShellId\[\s*\d{1,3}\s*\]\s*\+\s*\$ShellId\['
23        - ImagePath|re: '\$env:Public\[\s*\d{1,3}\s*\]\s*\+\s*\$env:Public\['
24        - ImagePath|re: '\$env:ComSpec\[(\s*\d{1,3}\s*,){2}'
25        - ImagePath|re: '\\*mdr\*\W\s*\)\.Name'
26        - ImagePath|re: '\$VerbosePreference\.ToString\('
27        - ImagePath|re: '\String\]\s*\$VerbosePreference'
28    condition: selection
29falsepositives:
30    - Unknown
31level: high

References

Related rules

to-top