Detection rules › Sigma

Suspicious RunAs-Like Flag Combination

Severity
medium
Author
Florian Roth (Nextron Systems)
Source
upstream

Detects suspicious command line flags that let the user set a target user and command as e.g. seen in PsExec-like tools

Event coverage

ProviderEvent IDTitle
Sysmon1Process creation
Security-Auditing4688A new process has been created.

Stages and Predicates

Stage 1: all of selection_user

or:
CommandLine|contains: ' --system '
CommandLine|contains: ' --user system '
CommandLine|contains: ' -u ''NT'
CommandLine|contains: ' -u NT'
CommandLine|contains: ' -u "NT'
CommandLine|contains: ' -u administrator '
CommandLine|contains: ' -u system '

Stage 2: all of selection_command

or:
CommandLine|contains: ' --command cmd'
CommandLine|contains: ' --command powershell'
CommandLine|contains: ' -c "cmd'
CommandLine|contains: ' -c "powershell'
CommandLine|contains: ' -c cmd'
CommandLine|contains: ' -c cscript'
CommandLine|contains: ' -c powershell'
CommandLine|contains: ' -c whoami'
CommandLine|contains: ' -c wscript'

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
  • --command cmd
  • --command powershell
  • --system
  • --user system
  • -c "cmd
  • -c "powershell
  • -c cmd
  • -c cscript
  • -c powershell
  • -c whoami
  • -c wscript
  • -u "NT
  • -u 'NT
  • -u NT
  • -u administrator
  • -u system