CrowdStrike Hunts Shell Command Obfuscation on VMware ESXi
Detection stack
- AIDR
- Alert
- ETL
- Query
Summary
Adversaries are increasingly targeting VMware ESX hypervisors with sophisticated shell command obfuscation designed to evade detection. Threat actors use techniques ranging from basic hex encoding to advanced cryptographic ciphers and invisible Unicode characters injected into the BusyBox shell. These methods allow attackers to execute malicious commands, including disabling syslogs or encrypting virtual machines, while minimizing readable traces in standard shell logs.
Investigation
CrowdStrike researchers systematically evaluated 21 different obfuscation techniques within a controlled ESX 7.0.3 environment. They grouped these methods into six categories: escape sequences, character generation, Unicode injection, cryptographic encoding, infrastructure-keyed payloads, and alternative encoding systems. The research confirmed that these techniques can bypass traditional keyword-based detection by exploiting differences between how commands are parsed and ultimately executed.
Mitigation
Security teams should move beyond basic keyword-based detection and adopt regex-based correlation rules that identify the syntactic patterns commonly associated with obfuscation. Advanced SIEM platforms such as CrowdStrike Falcon Next-Gen SIEM can help detect these behaviors across ESX shell telemetry. Maintaining a reliable baseline of normal administrative activity is also essential for identifying anomalous shell execution.
Response
If obfuscated command execution is detected, incident responders should isolate the affected ESX host immediately to limit lateral movement or VM encryption. Shell logs should be analyzed for known obfuscation patterns to reconstruct the commands that were actually executed. Responders should also investigate persistence through scheduled tasks or modified system configurations and verify the integrity of the VMFS filesystem.
Attack Flow
Detections
Possible ESXCLI System Enumeration [Windows] (via cmdline)
Proof of Value
Possible SSHd Configuration File Enumeration Or Modification Attempt (via cmdline)
Proof of Value
Possible ESXCLI System Enumeration [Linux] (via cmdline)
Proof of Value
Suspicious ESXCLI Syslog Service Reload [Linux] (via cmdline)
Proof of Value
Detection of Obfuscated Command on VMware ESX [Linux Process Creation]
Proof of Value
Simulation Execution
Prerequisite: The Telemetry & Baseline Pre-flight Check must have passed.
Rationale: This section details the precise execution of the adversary technique (TTP) designed to trigger the detection rule. The commands and narrative MUST directly reflect the TTPs identified and aim to generate the exact telemetry expected by the detection logic.
-
Attack Narrative & Commands: The adversary has gained shell access to a VMware ESX host. To avoid detection by security tools scanning for the keyword
esxcli, the attacker uses anawkcommand to generate the stringesxcliusing ASCII decimal values and then passes it tosystem(). This technique is used to perform configuration changes (e.g., resetting log hosts) while remaining invisible to simple pattern-matching filters. -
Regression Test Script: This script executes one of the specific payloads defined in the detection logic to verify the rule triggers.
#!/bin/bash # Simulation script to trigger the 'Detection of Obfuscated Command on VMware ESX' rule. echo "[+] Starting Simulation: Obfuscated Command Execution" # Payload 1: Using printf within a subshell to hide 'esxcli' echo "[+] Executing Payload 1 (printf obfuscation)..." $(printf "x65x73x78x63x6cx69") system syslog config get # Payload 2: Using awk to reconstruct 'esxcli' via ASCII decimal codes echo "[+] Executing Payload 2 (awk ASCII reconstruction)..." awk 'BEGIN{printf "%c%c%c%c%c%c",101,115,120,99,108,105} system " syslog config get"' echo "[+] Simulation Complete. Check SIEM for alerts." -
Cleanup Commands: Since these commands are designed to be non-destructive (using
getorconfig get), minimal cleanup is required. However, to ensure no persistent changes were made if asetcommand was used:# No destructive actions were taken in this simulation. # If a 'set' command was used, revert to original configuration. echo "[+] Cleanup: No changes were made to the system configuration."