CmdID

CmdID / Rules / Windows

Suspicious PowerShell Invocations - Specific - ProcessCreation

A Sigma rule for process creation on Windows, by Nasreddine Bencherchali (Nextron Systems).

medium

What it looks for

its detection, as SigmaHQ writes it
detection:
  filter_chocolatey:
    CommandLine|contains:
      - '(New-Object System.Net.WebClient).DownloadString(''https://community.chocolatey.org/install.ps1'
      - 'Write-ChocolateyWarning'
  selection_convert_b64:
    CommandLine|contains|all:
      - '-nop'
      - ' -w '
      - 'hidden'
      - ' -c '
      - '[Convert]::FromBase64String'
  selection_enc:
    CommandLine|contains|all:
      - ' -w '
      - 'hidden'
      - '-ep'
      - 'bypass'
      - '-Enc'
  selection_iex:
    CommandLine|contains|all:
      - ' -w '
      - 'hidden'
      - '-noni'
      - '-nop'
      - ' -c '
      - 'iex'
      - 'New-Object'
  selection_iex_webclient:
    CommandLine|contains|all:
      - 'iex'
      - 'New-Object'
      - 'Net.WebClient'
      - '.Download'
  selection_reg:
    CommandLine|contains|all:
      - 'powershell'
      - 'reg'
      - 'add'
      - '\software\'
  selection_webclient:
    CommandLine|contains|all:
      - 'bypass'
      - '-noprofile'
      - '-windowstyle'
      - 'hidden'
      - 'new-object'
      - 'system.net.webclient'
      - '.download'
  condition: 1 of selection_* and not 1 of filter_*

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 Nasreddine Bencherchali (Nextron Systems), 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.

Command lines that trip it

documented abuse, read by CmdID

The commands documented for syncappvpublishingserver.exe, syncappvpublishingserver.vbs trip it: each is on its program’s page, read by CmdID.