Elevated System Shell Spawned From Uncommon Parent Location
A Sigma rule for process creation on Windows, by frack113, Tim Shelton (update fp).
medium 1 ATT&CK technique 5 programs it names
What it looks for
detection:
filter_main_generic:
ParentImage|contains:
- ':\Program Files (x86)\'
- ':\Program Files\'
- ':\ProgramData\'
- ':\Windows\System32\'
- ':\Windows\SysWOW64\'
- ':\Windows\Temp\'
- ':\Windows\WinSxS\'
filter_main_parent_empty:
ParentImage:
- ''
- '-'
filter_main_parent_null:
ParentImage: null
filter_optional_asgard:
CommandLine|contains: ':\WINDOWS\system32\cmd.exe /c "'
CurrentDirectory|contains: ':\WINDOWS\Temp\asgard2-agent\'
filter_optional_ibm_spectrumprotect:
CommandLine|contains: ':\IBM\SpectrumProtect\webserver\scripts\'
ParentImage|contains: ':\IBM\SpectrumProtect\webserver\scripts\'
filter_optional_manageengine:
Image|endswith: '\cmd.exe'
ParentImage|endswith: ':\ManageEngine\ADManager Plus\pgsql\bin\postgres.exe'
selection_shell:
- Image|endswith:
- '\powershell.exe'
- '\powershell_ise.exe'
- '\pwsh.exe'
- '\cmd.exe'
- OriginalFileName:
- 'PowerShell.EXE'
- 'powershell_ise.EXE'
- 'pwsh.dll'
- 'Cmd.Exe'
selection_user:
LogonId: '0x3e7'
User|contains:
- 'AUTHORI'
- 'AUTORI'
condition: all of 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 frack113, Tim Shelton (update fp), 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
T1059Command and Scripting Interpreter