Splunk Guide: Detect Suspicious Activity Before ESXi Ransomware
1) Data you must onboard (minimum)
-
ESXi host syslog → forward
/var/log/*
(notablyshell.log
,hostd.log
,syslog.log
,auth.log
,ssh.log
) to Splunk. Use Splunk Add-on for VMware ESXi Logs (Splunk_TA_esxilogs). Splunk Documentation+1 -
ESXi log paths & what they contain (for validation):
shell.log
= interactive shell commands;auth.log
= local logins;ssh.log
= SSH events;hostd.log
= VM power/management ops. Support PortalNakivovStack -
Optional but recommended: vCenter logs (audit, plugin access) via the Splunk Add-on for vCenter Logs. Splunk Documentation
-
Transport tip: prefer TCP/SSL; avoid UDP behind load balancers (can corrupt/ reorder vSphere syslog). splunk.github.io
Why now? ESXi ransomware waves (e.g., ESXiArgs) abused exposed/ unpatched vCenter & ESXi to gain code execution, then used shell/SSH to mass stop VMs and encrypt configs. CISAVMwarevaronis.com
2) High-signal precursor behaviors (what to hunt)
TTP themes: enable shell/SSH, new accounts, persistence (/etc/rc.local.d/local.sh
), bulk VM operations, exploitation of old vCenter plugin paths (CVE-2021-21972/21985), use of vim-cmd
/esxcli
. Tenable®+1Rapid7Support Portal
3) Ready-to-use SPL (adjust index=
and sourcetype=
to your environment)
Tip: If you use the ESXi Logs TA defaults, you’ll typically match a syslog sourcetype (e.g.,
vmware:vsphere:esx:syslog
/vmw-syslog
). Validate with| tstats count where index=<your_index> by sourcetype
. Splunk Documentation
A. ESXi Shell / SSH enabled (DCUI or API), or first use
(Watch for sudden SSH/ Shell starts on production hosts.) techdocs.broadcom.com
B. Interactive shell commands (look for vim-cmd
/esxcli
)
Spike of vim-cmd vmsvc/*
, hostsvc/enable_ssh
, maintenance_mode_enter
, esxcli network firewall set -e false
is suspicious. Nakivo
C. Mass VM power/ unregister operations in short window
(High burst often precedes encryption.) vStack
D. New/changed local accounts or root password change attempts
(Attackers often add users for persistence.)
E. Persistence via boot script or SSH keys
(Unauthorized edits to local.sh
persist commands across reboots; SSH keys cement access.) Support Portal
F. ESXi firewall tampering or syslog changes
G. vCenter exploitation probes for legacy plugin paths (outside ESXi but relevant precursor)
(Indicators tied to CVE-2021-21972; add vSAN plugin checks for CVE-2021-21985.) Tenable®+1Rapid7
H. ESXiArgs-style operator behavior (quick sweep)
(Adapt to your observed actor TTPs; see ESXiArgs advisories for context.) CISAVMware
4) Correlation searches (Enterprise Security friendly)
CS-1: “ESXi Pre-Ransomware—Shell + Bulk VM Ops”
-
Logic: A + C within 30 minutes on same host.
-
Risk=90; Urgency=High; MITRE: TA0002/TA0003/TA0040.
CS-2: “ESXi Persistence—local.sh or SSH Keys Modified”
-
Logic: E AND (A OR B) within 2 hours. Risk=80.
CS-3: “External Exposure—vCenter Exploit + New ESXi User”
-
Logic: G (from internet IP) AND D on any ESXi behind that vCenter within 60 minutes. Risk=95.
5) Dashboards (one-page triage)
-
Panel 1: SSH/Shell state timeline per host (search A).
-
Panel 2: Top commands (
vim-cmd
,esxcli
) last 24h (search B). -
Panel 3: Burst VM power/unregister (search C).
-
Panel 4: Persistence edits (search E).
-
Panel 5: vCenter exploit URIs (search G).
6) Response playbook (quick)
-
Isolate host mgmt (firewall block SSH/HTTPS to mgmt VLAN except admin jump hosts).
-
Revoke persistence (revert
local.sh
, remove rogue accounts/keys). Support Portal -
Patch & close exposure (prioritize KEV/vCenter plugin CVEs; verify no internet-exposed vCenter/ESXi). CISATenable®+1
-
Review logs for staging (bulk
vim-cmd
& VM ops, odd backups/archives). NakivovStack -
Hunt for ESXiArgs IOCs in historical data. CISAcloudsek.com
7) Hardening checklist (prevention boosts)
-
Disable/limit Shell & SSH; use DCUI only when needed; alert on state changes. techdocs.broadcom.com
-
Aggressive patching of vCenter/ESXi; CVE-2021-21972/21985/21974 were heavily abused in past ESXi waves. Tenable®+1varonis.com
-
No external exposure of management interfaces; restrict by firewall/VPN; send syslog to Splunk TA. Splunk Documentation
Comments
Post a Comment