cscli scenarios install sigmahq/proc_creation_win_powershell_decrypt_pattern1type: trigger2name: sigmahq/proc_creation_win_powershell_decrypt_pattern3description: |4 Detects PowerShell commands that decrypt an ".LNK" "file to drop the next stage of the malware.5filter: |6 (evt.Meta.service == 'sysmon' && evt.Parsed.EventID == '1') && ((evt.Parsed.Image endsWith '\\powershell.exe' || evt.Parsed.Image endsWith '\\pwsh.exe') && (evt.Parsed.OriginalFileName in ['PowerShell.EXE', 'pwsh.dll']) && (evt.Parsed.CommandLine contains 'Get-ChildItem ' || evt.Parsed.CommandLine contains 'dir ' || evt.Parsed.CommandLine contains 'gci ' || evt.Parsed.CommandLine contains 'ls ') && (evt.Parsed.CommandLine contains 'Get-Content ' || evt.Parsed.CommandLine contains 'gc ' || evt.Parsed.CommandLine contains 'cat ' || evt.Parsed.CommandLine contains 'type ' || evt.Parsed.CommandLine contains 'ReadAllBytes') && (evt.Parsed.CommandLine contains ' ^| ' && evt.Parsed.CommandLine contains '*.lnk' && evt.Parsed.CommandLine contains '-Recurse' && evt.Parsed.CommandLine contains '-Skip ' || evt.Parsed.CommandLine contains ' -ExpandProperty ' && evt.Parsed.CommandLine contains '*.lnk' && evt.Parsed.CommandLine contains 'WriteAllBytes' && evt.Parsed.CommandLine contains ' .length '))7blackhole: 2m8#status: test9labels:10 service: windows11 confidence: 112 spoofable: 013 classification:1415 label: "PowerShell Execution With Potential Decryption Capabilities"16 behavior : "windows:audit"17 remediation: false1819scope:20 type: ParentProcessId21 expression: evt.Parsed.ParentProcessId2223