CmdID

CmdID / Rules / Windows

Windows Suspicious Child Process from Node.js - React2Shell

A Sigma rule for process creation on Windows, from SigmaHQ’s emerging threats rules, by Swachchhanda Shrawan Poudel (Nextron Systems), Nasreddine Bencherchali.

high 2 ATT&CK techniques 37 programs it names

What it looks for

its detection, as SigmaHQ writes it
detection:
  filter_main_cli_git:
    CommandLine|contains: 'git config --local --get remote.origin.url'
  filter_main_cli_mkcert_caroot:
    CommandLine|contains|all:
      - '\mkcert\'
      - ' -CAROOT'
  filter_main_cli_mkcert_install:
    CommandLine|contains|all:
      - '\mkcert\'
      - ' -install '
  filter_main_cli_netstat:
    CommandLine|contains|all:
      - 'netstat -ano | findstr /C:'
      - ' | findstr LISTENING'
  filter_main_default_shell_flag:
    CommandLine|contains: '/d /s /c '
  selection_generic_child_cli_susp_pattern:
    CommandLine|contains:
      - '\net'
      - 'bitsadmin'
      - 'certutil '
      - 'conhost --headless'
      - 'cscript '
      - 'curl'
      - 'ipconfig'
      - 'java'
      - 'lua'
      - 'mshta'
      - 'netsh'
      - 'nslookup '
      - 'perl'
      - 'ping '
      - 'powershell'
      - 'pwsh'
      - 'python'
      - 'reg '
      - 'reg.exe'
      - 'regsvr32'
      - 'ruby'
      - 'rundll32'
      - 'sc.exe'
      - 'systeminfo'
      - 'wget'
      - 'whoami'
      - 'wmic'
      - 'wscript'
  selection_generic_child_img:
    - Image|endswith:
        - '\bash.exe'
        - '\bitsadmin.exe'
        - '\certutil.exe'
        - '\cscript.exe'
        - '\curl.exe'
        - '\ipconfig.exe'
        - '\mshta.exe'
        - '\net.exe'
        - '\net1.exe'
        - '\netsh.exe'
        - '\nslookup.exe'
        - '\OpenConsole.exe'
        - '\perl.exe'
        - '\ping.exe'
        - '\powershell.exe'
        - '\pwsh.exe'
        - '\py.exe'
        - '\python.exe'
        - '\pythonw.exe'
        - '\pyw.exe'
        - '\reg.exe'
        - '\regsvr32.exe'
        - '\rundll32.exe'
        - '\sc.exe'
        - '\sh.exe'
        - '\systeminfo.exe'
        - '\wget.exe'
        - '\whoami.exe'
        - '\wmic.exe'
        - '\wscript.exe'
        - '\wt.exe'
    - Image|contains: '\python'
  selection_parent:
    ParentCommandLine|contains:
      - '--experimental-https'
      - '--experimental-next-config-strip-types'
      - '\node_modules\next'
      - 'next dev'
      - 'next start'
      - 'next" start'
      - 'node_modules\\.bin\\\\..\\next'
      - 'react-scripts start'
      - 'start-server.js'
    ParentImage|endswith: '\node.exe'
  selection_specific_cli:
    CommandLine|contains: '/d /s /c '
  selection_specific_cmd:
    Image|endswith: '\cmd.exe'
  condition: selection_parent and ( 1 of selection_generic_* or (selection_specific_cmd and not filter_main_default_shell_flag) or (all of selection_specific_* and not 1 of filter_main_cli_*) )

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 Swachchhanda Shrawan Poudel (Nextron Systems), Nasreddine Bencherchali, 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
T1059Command and Scripting Interpreter
T1190Exploit Public-Facing Application