CmdID

CmdID / Rules / Windows

Potentially Suspicious PowerShell Child Processes

A Sigma rule for process creation on Windows, from SigmaHQ’s threat hunting rules, by Florian Roth (Nextron Systems), Tim Shelton.

medium 1 ATT&CK technique 17 programs it names

What it looks for

its detection, as SigmaHQ writes it
detection:
  filter_main_certutil_verify_store:
    CommandLine|contains: '-verifystore '
    Image|endswith: '\certutil.exe'
  filter_main_wmic:
    CommandLine|contains:
      - 'qfe list'
      - 'diskdrive '
      - 'csproduct '
      - 'computersystem '
      - ' os '
      - ''
    Image|endswith: '\wmic.exe'
  filter_optional_amazon:
    CommandLine|contains: '\Program Files\Amazon\WorkspacesConfig\Scripts\'
    ParentCommandLine|contains: '\Program Files\Amazon\WorkspacesConfig\Scripts\'
  selection:
    Image|endswith:
      - '\bash.exe'
      - '\bitsadmin.exe'
      - '\certutil.exe'
      - '\cscript.exe'
      - '\forfiles.exe'
      - '\hh.exe'
      - '\mshta.exe'
      - '\regsvr32.exe'
      - '\rundll32.exe'
      - '\schtasks.exe'
      - '\scrcons.exe'
      - '\scriptrunner.exe'
      - '\sh.exe'
      - '\wmic.exe'
      - '\wscript.exe'
    ParentImage|endswith:
      - '\powershell_ise.exe'
      - '\powershell.exe'
      - '\pwsh.exe'
  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 Florian Roth (Nextron Systems), Tim Shelton, 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

their pages here

ATT&CK

the techniques it is tagged with
T1059.001Command and Scripting Interpreter: PowerShell