Detection rules › Sigma

Suspicious WindowsTerminal Child Processes

Severity
medium
Author
Nasreddine Bencherchali (Nextron Systems)
Source
upstream

Detects suspicious children spawned via the Windows Terminal application which could be a sign of persistence via WindowsTerminal (see references section)

Event coverage

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

Stages and Predicates

Stage 1: all of selection_parent

or:
ParentImage|endswith: '\WindowsTerminal.exe'
ParentImage|endswith: '\wt.exe'

Stage 2: all of selection_susp

or:
CommandLine|contains: ' /c '
CommandLine|contains: ' /k '
CommandLine|contains: ' /r '
CommandLine|contains: ' icm'
CommandLine|contains: ' iex '
CommandLine|contains: 'DownloadString('
CommandLine|contains: 'Import-Module '
CommandLine|contains: Invoke-
CommandLine|contains: 'ipmo '
Image|endswith: '\certutil.exe'
Image|endswith: '\csc.exe'
Image|endswith: '\cscript.exe'
Image|endswith: '\regsvr32.exe'
Image|endswith: '\rundll32.exe'
Image|endswith: '\wscript.exe'
Image|contains: 'C:\Users\Public\'
Image|contains: '\AppData\Local\Temp\'
Image|contains: '\Desktop\'
Image|contains: '\Downloads\'
Image|contains: '\Windows\TEMP\'

Stage 3: not 1 of filter_*

or:
CommandLine|contains: 'C:\Program Files\Microsoft Visual Studio\'
CommandLine|contains: '\Common7\Tools\VsDevCmd.bat'
CommandLine|contains: Enter-VsDevShell
CommandLine|contains: Import-Module
CommandLine|contains: 'Microsoft.VisualStudio.DevShell.dll'
CommandLine|contains: '\AppData\Local\Packages\Microsoft.WindowsTerminal_'
CommandLine|contains: '\LocalState\settings.json'

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
  • /c corpus 2 (sigma 2)
  • /k
  • /r
  • icm
  • iex
  • C:\Program Files\Microsoft Visual Studio\
  • DownloadString(
  • Enter-VsDevShell
  • Import-Module
  • Import-Module corpus 2 (sigma 2)
  • Invoke- corpus 5 (sigma 5)
  • Microsoft.VisualStudio.DevShell.dll
  • \AppData\Local\Packages\Microsoft.WindowsTerminal_
  • \Common7\Tools\VsDevCmd.bat
  • \LocalState\settings.json
  • ipmo corpus 2 (sigma 2)
Imageends_with
  • \certutil.exe corpus 34 (sigma 34)
  • \csc.exe corpus 5 (sigma 5)
  • \cscript.exe corpus 64 (sigma 64)
  • \regsvr32.exe corpus 57 (sigma 57)
  • \rundll32.exe corpus 76 (sigma 76)
  • \wscript.exe corpus 64 (sigma 64)
Imagematch
  • C:\Users\Public\ corpus 2 (sigma 2)
  • \AppData\Local\Temp\ corpus 9 (sigma 9)
  • \Desktop\ corpus 6 (sigma 6)
  • \Downloads\ corpus 8 (sigma 8)
  • \Windows\TEMP\
ParentImageends_with
  • \WindowsTerminal.exe corpus 3 (sigma 3)
  • \wt.exe