Non Interactive PowerShell Process Spawned
A Sigma rule for process creation on Windows, by Roberto Rodriguez @Cyb3rWard0g (rule), oscd.community (improvements).
low 1 ATT&CK technique 5 programs it names
What it looks for
detection:
filter_main_generic:
ParentImage|endswith:
- ':\Windows\explorer.exe'
- ':\Windows\System32\CompatTelRunner.exe'
- ':\Windows\SysWOW64\explorer.exe'
filter_main_windows_update:
ParentImage|endswith: ':\$WINDOWS.~BT\Sources\SetupHost.exe'
filter_optional_defender:
ParentImage|endswith: ':\Program Files\Windows Defender Advanced Threat Protection\SenseIR.exe'
filter_optional_terminal:
ParentImage|contains: ':\Program Files\WindowsApps\Microsoft.WindowsTerminal_'
ParentImage|endswith: '\WindowsTerminal.exe'
filter_optional_vscode:
ParentCommandLine|contains: ' --ms-enable-electron-run-as-node '
ParentImage|endswith: '\AppData\Local\Programs\Microsoft VS Code\Code.exe'
selection:
- Image|endswith:
- '\powershell.exe'
- '\pwsh.exe'
- OriginalFileName:
- 'PowerShell.EXE'
- 'pwsh.dll'
condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
The rule’s detection, its selections and fields in order of name. The whole rule, with its references and false positives, is on SigmaHQ, by Roberto Rodriguez @Cyb3rWard0g (rule), oscd.community (improvements), under the Detection Rule License 1.1. CmdID evaluates it on a command line alone: a test on what a command line cannot show, such as the parent process or the user, is not met.
None of the everyday examples and documented commands on CmdID’s program pages trips it. To see whether a command line does, paste it into CmdID.
Programs and files it names
ATT&CK
T1059.001Command and Scripting Interpreter: PowerShell