cscli scenarios install sigmahq/proc_creation_win_hktl_invoke_obfuscation_obfuscated_iex_commandline
1type: trigger2name: sigmahq/proc_creation_win_hktl_invoke_obfuscation_obfuscated_iex_commandline3description: |4 Detects all variations of obfuscated powershell IEX invocation code generated by Invoke-Obfuscation framework from the following code block5filter: |6 (evt.Meta.service == 'sysmon' && evt.Parsed.EventID == '1') && (evt.Parsed.CommandLine matches '\\$PSHome\\[\\s*\\d{1,3}\\s*\\]\\s*\\+\\s*\\$PSHome\\[' || evt.Parsed.CommandLine matches '\\$ShellId\\[\\s*\\d{1,3}\\s*\\]\\s*\\+\\s*\\$ShellId\\[' || evt.Parsed.CommandLine matches '\\$env:Public\\[\\s*\\d{1,3}\\s*\\]\\s*\\+\\s*\\$env:Public\\[' || evt.Parsed.CommandLine matches '\\$env:ComSpec\\[(\\s*\\d{1,3}\\s*,){2}' || evt.Parsed.CommandLine matches '\\*mdr\\*\\W\\s*\\)\\.Name' || evt.Parsed.CommandLine matches '\\$VerbosePreference\\.ToString\\(' || evt.Parsed.CommandLine matches '\\[String\\]\\s*\\$VerbosePreference')7blackhole: 2m8#status: test9labels:10 service: windows11 confidence: 112 spoofable: 013 classification:14 - attack.t102715 - attack.t1059.0011617 label: "Invoke-Obfuscation Obfuscated IEX Invocation"18 behavior : "windows:audit"19 remediation: false2021scope:22 type: ParentProcessId23 expression: evt.Parsed.ParentProcessId2425