Detection rules › Sigma

Elevated System Shell Spawned From Uncommon Parent Location

Severity
medium
Author
frack113, Tim Shelton (update fp)
Source
upstream

Detects when a shell program such as the Windows command prompt or PowerShell is launched with system privileges from a uncommon parent location.

MITRE ATT&CK coverage

TacticTechniques
ExecutionT1059 Command and Scripting Interpreter

Event coverage

ProviderEvent IDTitle
Sysmon1Process creation

Stages and Predicates

Stage 1: all of selection_shell

or:
Image|endswith: '\cmd.exe'
Image|endswith: '\powershell.exe'
Image|endswith: '\powershell_ise.exe'
Image|endswith: '\pwsh.exe'
OriginalFileName: Cmd.Exe
OriginalFileName: PowerShell.EXE
OriginalFileName: powershell_ise.EXE
OriginalFileName: pwsh.dll

Stage 2: all of selection_user

or:
User|contains: AUTHORI
User|contains: AUTORI
LogonId: 0x3e7

Stage 3: not 1 of filter_main_*

or:
ParentImage: ''
ParentImage: -
ParentImage: null
ParentImage|contains: ':\Program Files (x86)\'
ParentImage|contains: ':\Program Files\'
ParentImage|contains: ':\ProgramData\'
ParentImage|contains: ':\Windows\SysWOW64\'
ParentImage|contains: ':\Windows\System32\'
ParentImage|contains: ':\Windows\Temp\'
ParentImage|contains: ':\Windows\WinSxS\'

Stage 4: not 1 of filter_optional_*

or:
CommandLine|contains: ':\IBM\SpectrumProtect\webserver\scripts\'
ParentImage|contains: ':\IBM\SpectrumProtect\webserver\scripts\'
CommandLine|contains: ':\WINDOWS\system32\cmd.exe /c "'
CurrentDirectory|contains: ':\WINDOWS\Temp\asgard2-agent\'
Image|endswith: '\cmd.exe'
ParentImage|endswith: ':\ManageEngine\ADManager Plus\pgsql\bin\postgres.exe'

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
CommandLinematch
  • :\IBM\SpectrumProtect\webserver\scripts\
  • :\WINDOWS\system32\cmd.exe /c "
CurrentDirectorymatch
  • :\WINDOWS\Temp\asgard2-agent\
Imageends_with
  • \cmd.exe corpus 92 (sigma 92)
  • \powershell.exe corpus 143 (sigma 143)
  • \powershell_ise.exe corpus 27 (sigma 27)
  • \pwsh.exe corpus 140 (sigma 140)
LogonIdeq
  • 0x3e7 corpus 2 (sigma 2)
OriginalFileNameeq
  • Cmd.Exe corpus 32 (sigma 30, splunk 2)
  • PowerShell.EXE corpus 64 (sigma 60, splunk 4)
  • powershell_ise.EXE corpus 8 (sigma 4, splunk 4)
  • pwsh.dll corpus 72 (sigma 68, splunk 4)
ParentImageends_with
  • :\ManageEngine\ADManager Plus\pgsql\bin\postgres.exe
ParentImageeq
  • - corpus 5 (sigma 5)
ParentImagematch
  • :\IBM\SpectrumProtect\webserver\scripts\
  • :\Program Files (x86)\
  • :\Program Files\
  • :\ProgramData\
  • :\Windows\SysWOW64\ corpus 2 (sigma 2)
  • :\Windows\System32\ corpus 2 (sigma 2)
  • :\Windows\Temp\ corpus 4 (sigma 4)
  • :\Windows\WinSxS\
Usermatch
  • AUTHORI corpus 16 (sigma 16)
  • AUTORI corpus 16 (sigma 16)