| name | vmware-esx-vcenter-security-audit |
| description | Security audit and hardening guidance for VMware ESX/vCenter infrastructure. Use this skill when users need to assess VMware virtualization security, understand attack vectors for defensive purposes, enumerate ESXi hosts for authorized penetration testing, identify ransomware indicators in virtual environments, or harden vSphere deployments. Trigger on mentions of VMware, ESXi, vCenter, virtualization security, hypervisor auditing, or ESX pentesting. |
VMware ESX/vCenter Security Audit
A skill for security professionals to audit, harden, and defend VMware ESX/vCenter infrastructure. This skill provides guidance on understanding attack vectors, identifying indicators of compromise, and implementing defensive controls.
⚠️ Authorization Required
All activities described in this skill require explicit written authorization. Use only on systems you own or have permission to test.
Enumeration & Discovery
Network Scanning
Identify VMware services and versions:
nmap -sV --script "http-vmware-path-vuln or vmware-version" -p <PORT> <IP>
Metasploit Enumeration
msfconsole
use auxiliary/scanner/vmware/esx_fingerprint
set RHOSTS <target>
run
use auxiliary/scanner/http/ms15_034_http_sys_memory_dump
set RHOSTS <target>
run
Credential Testing (Authorized Only)
use auxiliary/scanner/vmware/vmware_http_login
set RHOSTS <target>
set RPORT 443
set USERNAME <username>
set PASSWORD <password>
run
Post-Exploitation Indicators
Hypervisor Takeover Signs
Monitor for these commands in ESXi logs:
| Command | Purpose | Detection Priority |
|---|
uname -a | Host fingerprinting | Medium |
esxcli network nic list | Network adapter enumeration | High |
esxcli network firewall set --enabled false | Firewall disablement | Critical |
/etc/init.d/vpxa stop | vCenter isolation | Critical |
passwd root | Credential rotation | Critical |
C2 Beacon Detection
Look for persistent processes polling external URIs:
netstat -anp | grep ESTABLISHED
cat /var/spool/cron/crontabs/*
ps -ef | grep -v "init\|vpxa\|hostd"
Ransomware Indicators
File Extensions Targeted
| Extension | Description | Risk Level |
|---|
.vmdk, .vmem, .vmsd, .vmsn, .vswp | VM disks, snapshots, swap | Critical |
.ova, .ovf | VM appliance bundles | High |
.vib | ESXi installation bundles | High |
.vbk, .vbm | Veeam backup files | Critical |
.emario, .marion, .mario | Encrypted files | Critical |
Detection Queries
find /vmfs/volumes -name "*.vmdk" -mtime -1
find / -name "*Restore*" -o -name "*ransom*" -o -name "*How To*" 2>/dev/null
find /vmfs/volumes -name "*.emario" -o -name "*.mario" 2>/dev/null
Hardening Recommendations
Network Security
- Segment management traffic - Isolate vCenter and ESXi management interfaces
- Disable unnecessary services - Turn off SSH, DCUI if not needed
- Implement network ACLs - Restrict access to management ports (443, 902, 22)
- Enable TLS 1.2+ - Disable older SSL/TLS versions
Access Control
- Strong authentication - Use MFA for vCenter access
- Principle of least privilege - Create role-based access controls
- Regular credential rotation - Change default passwords immediately
- Audit logging - Enable and monitor vCenter logs
Host Hardening
esxcli system settings advanced set -o /UserVars/ESXShellEnabled -i 0
esxcli system lockdown set -e true
esxcli network firewall ruleset set -e true -r sshServer
Backup Protection
- 3-2-1 backup rule - 3 copies, 2 media types, 1 offsite
- Immutable backups - Use write-once-read-many (WORM) storage
- Air-gapped recovery - Maintain offline backup copies
- Regular restore testing - Validate backup integrity monthly
Incident Response
Immediate Actions
- Isolate affected hosts - Disconnect from network
- Preserve evidence - Capture memory, logs, disk images
- Identify scope - Check all ESXi hosts and vCenter
- Notify stakeholders - Follow incident response procedures
Recovery Steps
- Clean rebuild - Reinstall ESXi from trusted media
- Restore from clean backups - Verify backup integrity first
- Patch vulnerabilities - Apply latest security updates
- Rotate all credentials - Change all passwords and certificates
- Monitor for persistence - Watch for re-infection indicators
References
Quick Reference
Common VMware Ports
| Port | Service | Protocol |
|---|
| 22 | SSH | TCP |
| 443 | vSphere Client | TCP |
| 902 | vSphere Agent | TCP |
| 903 | vSphere Agent | TCP |
| 902-903 | vSphere Services | TCP |
Critical Files to Monitor
/var/log/ - System logs
/var/log/vmware/ - VMware-specific logs
/etc/vmware/ - Configuration files
/vmfs/volumes/ - VM datastores
/var/lib/vmware/ - VMware state files