Detection rules › Sigma

VMToolsd Suspicious Child Process

Status
test
Severity
high
Log source
category process_creation, product windows
Author
bohops, Bhabesh Raj
Source
github.com/SigmaHQ/sigma

Detects suspicious child process creations of VMware Tools process which may indicate persistence setup

Known false positives

  • Legitimate use by VM administrator

MITRE ATT&CK coverage

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

title: VMToolsd Suspicious Child Process
id: 5687f942-867b-4578-ade7-1e341c46e99a
status: test
description: Detects suspicious child process creations of VMware Tools process which may indicate persistence setup
references:
    - https://bohops.com/2021/10/08/analyzing-and-detecting-a-vmtools-persistence-technique/
    - https://user-images.githubusercontent.com/61026070/136518004-b68cce7d-f9b8-4e9a-9b7b-53b1568a9a94.png
    - https://github.com/vmware/open-vm-tools/blob/master/open-vm-tools/tools.conf
author: bohops, Bhabesh Raj
date: 2021-10-08
modified: 2023-07-25
tags:
    - attack.execution
    - attack.persistence
    - attack.t1059
logsource:
    category: process_creation
    product: windows
detection:
    selection_parent:
        ParentImage|endswith: '\vmtoolsd.exe'
    selection_img:
        - Image|endswith:
              - '\cmd.exe'
              - '\cscript.exe'
              - '\mshta.exe'
              - '\powershell.exe'
              - '\pwsh.exe'
              - '\regsvr32.exe'
              - '\rundll32.exe'
              - '\wscript.exe'
        - OriginalFileName:
              - 'Cmd.Exe'
              - 'cscript.exe'
              - 'MSHTA.EXE'
              - 'PowerShell.EXE'
              - 'pwsh.dll'
              - 'REGSVR32.EXE'
              - 'RUNDLL32.EXE'
              - 'wscript.exe'
    filter_main_vmwaretools_script:
        Image|endswith: '\cmd.exe'
        CommandLine|contains:
            - '\VMware\VMware Tools\poweron-vm-default.bat'
            - '\VMware\VMware Tools\poweroff-vm-default.bat'
            - '\VMware\VMware Tools\resume-vm-default.bat'
            - '\VMware\VMware Tools\suspend-vm-default.bat'
    filter_main_empty:
        Image|endswith: '\cmd.exe'
        CommandLine: ''
    filter_main_null:
        Image|endswith: '\cmd.exe'
        CommandLine: null
    condition: all of selection* and not 1 of filter_main_*
falsepositives:
    - Legitimate use by VM administrator
level: high

Stages and Predicates

Stage 0: condition

all of selection* and not 1 of filter_main_*

Stage 1: selection_parent

selection_parent:
    ParentImage|endswith: '\vmtoolsd.exe'

Stage 2: selection_img

selection_img:
    - Image|endswith:
          - '\cmd.exe'
          - '\cscript.exe'
          - '\mshta.exe'
          - '\powershell.exe'
          - '\pwsh.exe'
          - '\regsvr32.exe'
          - '\rundll32.exe'
          - '\wscript.exe'
    - OriginalFileName:
          - 'Cmd.Exe'
          - 'cscript.exe'
          - 'MSHTA.EXE'
          - 'PowerShell.EXE'
          - 'pwsh.dll'
          - 'REGSVR32.EXE'
          - 'RUNDLL32.EXE'
          - 'wscript.exe'

Stage 3: not filter_main_*

filter_main_vmwaretools_script:
    Image|endswith: '\cmd.exe'
    CommandLine|contains:
        - '\VMware\VMware Tools\poweron-vm-default.bat'
        - '\VMware\VMware Tools\poweroff-vm-default.bat'
        - '\VMware\VMware Tools\resume-vm-default.bat'
        - '\VMware\VMware Tools\suspend-vm-default.bat'
filter_main_empty:
    Image|endswith: '\cmd.exe'
    CommandLine: ''
filter_main_null:
    Image|endswith: '\cmd.exe'
    CommandLine: null

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
CommandLinematch\VMware\VMware Tools\poweroff-vm-default.batexcludes:CommandLine field:"CommandLine" value:"\VMware\VMware Tools\poweroff-vm-default.bat"
CommandLinematch\VMware\VMware Tools\poweron-vm-default.batexcludes:CommandLine field:"CommandLine" value:"\VMware\VMware Tools\poweron-vm-default.bat"
CommandLinematch\VMware\VMware Tools\resume-vm-default.batexcludes:CommandLine field:"CommandLine" value:"\VMware\VMware Tools\resume-vm-default.bat"
CommandLinematch\VMware\VMware Tools\suspend-vm-default.batexcludes:CommandLine field:"CommandLine" value:"\VMware\VMware Tools\suspend-vm-default.bat"
Imageends_with\cmd.exeexcludes:Image field:"Image" value:"\cmd.exe"
CommandLineis_null(no value, null check)excludes:CommandLine

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Imageends_with
  • \cmd.exe corpus 130 (sigma 130)
  • \cscript.exe corpus 72 (sigma 72)
  • \mshta.exe corpus 66 (sigma 66)
  • \powershell.exe corpus 179 (sigma 178, kusto 1)
  • \pwsh.exe corpus 165 (sigma 164, kusto 1)
  • \regsvr32.exe corpus 64 (sigma 64)
  • \rundll32.exe corpus 94 (sigma 94)
  • \wscript.exe corpus 74 (sigma 74)
field:"Image" kind:ends_with
OriginalFileNameeq
  • Cmd.Exe corpus 81 (sigma 43, elastic 21, splunk 17)
  • MSHTA.EXE corpus 40 (elastic 21, sigma 13, splunk 6)
  • PowerShell.EXE corpus 138 (sigma 84, splunk 30, elastic 24)
  • REGSVR32.EXE corpus 37 (sigma 17, elastic 15, splunk 5)
  • RUNDLL32.EXE corpus 78 (sigma 35, elastic 22, splunk 21)
  • cscript.exe corpus 32 (sigma 17, elastic 15)
  • pwsh.dll corpus 112 (sigma 79, splunk 30, elastic 3)
  • wscript.exe corpus 38 (elastic 21, sigma 17)
field:"OriginalFileName" kind:eq
ParentImageends_with
  • \vmtoolsd.exe
field:"ParentImage" kind:ends_with value:"\vmtoolsd.exe"