T1059.012 Splunk · SPL

Detect Hypervisor CLI in Splunk

Adversaries may abuse hypervisor command line interpreters (CLIs) to execute malicious commands. Hypervisor CLIs enable functionality for managing both the hypervisor and guest virtual machines. On ESXi systems, tools such as esxcli and vim-cmd allow administrators to configure firewall rules, manage log forwarding, list/start/stop virtual machines, and more. Adversaries leverage these tools for discovery, VM termination (ransomware), firewall manipulation, and persistence. UNC3886 used esxcli extensively for malware installation and artifact removal. Ransomware families including Cheerscrypt, Royal, and BlackBasta use esxcli to enumerate and terminate VMs before encryption.

MITRE ATT&CK

Tactic
Execution
Technique
T1059 Command and Scripting Interpreter
Sub-technique
T1059.012 Hypervisor CLI
Canonical reference
https://attack.mitre.org/techniques/T1059/012/

SPL Detection Query

Splunk (SPL)
spl
index=esxi OR index=vmware OR index=syslog sourcetype="vmware:esxi:syslog" OR sourcetype="syslog"
  ("esxcli" OR "vim-cmd" OR "esxcfg-")
| eval VMKill=if(match(_raw, "(vm process kill|vmsvc/power\.off)"), 1, 0)
| eval VMList=if(match(_raw, "(vm process list|vmsvc/getallvms)"), 1, 0)
| eval VIBInstall=if(match(_raw, "(vib install|vib remove|acceptance set)"), 1, 0)
| eval FirewallChange=if(match(_raw, "network firewall"), 1, 0)
| eval SSHEnable=if(match(_raw, "(enable_ssh|start_ssh)"), 1, 0)
| eval SyslogModify=if(match(_raw, "system syslog"), 1, 0)
| eval SuspicionScore=VMKill*3 + VIBInstall*3 + FirewallChange*2 + SSHEnable*2 + SyslogModify*2 + VMList
| where SuspicionScore > 0
| table _time, host, sourcetype, _raw, VMKill, VIBInstall, FirewallChange, SSHEnable, SyslogModify, SuspicionScore
| sort - SuspicionScore, - _time
critical severity high confidence

Detects suspicious ESXi CLI commands from syslog. Evaluates for VM termination (ransomware), VIB installation (persistence), firewall manipulation, SSH enablement, and syslog modification. VM killing and VIB installation scored highest (3x) as they indicate active ransomware or advanced persistent threat activity.

Data Sources

Process: Process CreationCommand: Command ExecutionVMware ESXi syslog

Required Sourcetypes

vmware:esxi:syslogsyslog

False Positives & Tuning

  • VMware administrators performing routine VM management during maintenance
  • Patching operations installing legitimate VIBs
  • Infrastructure automation tools managing ESXi hosts
Download portable Sigma rule (.yml)

Other platforms for T1059.012


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1ESXi VM Enumeration Simulation

    Expected signal: Syslog message with facility local7 containing 'esxcli vm process list'. This validates that ESXi-format syslog messages are being ingested by the SIEM.

  2. Test 2ESXi VIB Installation Simulation

    Expected signal: Syslog message with facility local7 containing 'vib install' and '--no-sig-check'. The --no-sig-check flag bypasses signature verification.

  3. Test 3ESXi VM Kill Simulation

    Expected signal: Syslog message with facility local7 containing 'vm process kill --type=force'. The force kill type is used by ransomware to immediately terminate VMs.

Unlock Pro Content

Get the full detection package for T1059.012 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections