T1673

Virtual Machine Discovery

This detection identifies adversaries attempting to enumerate virtual machines running on hypervisors or virtualization platforms. Attackers who gain access to a hypervisor host — such as VMware ESXi, Hyper-V, or KVM — commonly enumerate all running VMs as a precursor to destructive operations like ransomware deployment or service disruption. Key indicators include execution of hypervisor CLI tools (esxcli, vim-cmd, virsh, VBoxManage), PowerShell Hyper-V cmdlets (Get-VM, Get-VMHost), and unauthorized access to vSphere or vCenter management interfaces. This technique has been observed by ransomware groups including Cheerscrypt, Qilin, and Play, as well as nation-state actors like UNC3886 targeting ESXi infrastructure.

Microsoft Sentinel / Defender
kusto
let VMDiscoveryPatterns = dynamic(["vm process list", "vmsvc/getallvms", "vmsvc/power.getstate", "vmsvc/getallvms", "esxcli vm", "esxcli storage", "esxcli network vm"]);
let HyperVCmdlets = dynamic(["Get-VM", "Get-VHD", "Get-VMHost", "Get-VMSwitch", "Get-VMNetworkAdapter", "Get-VMSnapshot", "Get-VMReplication"]);
let VBoxCommands = dynamic(["list vms", "list runningvms", "list hdds"]);
DeviceProcessEvents
| where Timestamp > ago(1d)
| where (
    // VMware ESXi enumeration via esxcli or vim-cmd
    (ProcessCommandLine has_any ("esxcli", "vim-cmd") and ProcessCommandLine has_any (VMDiscoveryPatterns))
    // Hyper-V enumeration via PowerShell
    or (FileName in~ ("powershell.exe", "pwsh.exe") and ProcessCommandLine has_any (HyperVCmdlets))
    // VirtualBox management enumeration
    or (FileName =~ "VBoxManage.exe" and ProcessCommandLine has_any (VBoxCommands))
    // VMware Workstation/Fusion vmrun list
    or (FileName =~ "vmrun.exe" and ProcessCommandLine has "list")
    // virsh enumeration on Windows Subsystem or cross-platform tools
    or (FileName =~ "virsh.exe" and ProcessCommandLine has_any ("list", "dominfo", "nodeinfo"))
    // prlctl (Parallels) enumeration
    or (FileName =~ "prlctl" and ProcessCommandLine has "list")
)
| extend CommandType = case(
    ProcessCommandLine has_any ("esxcli", "vim-cmd"), "ESXi-CLI",
    FileName in~ ("powershell.exe", "pwsh.exe") and ProcessCommandLine has_any (HyperVCmdlets), "HyperV-PowerShell",
    FileName =~ "VBoxManage.exe", "VirtualBox-CLI",
    FileName =~ "vmrun.exe", "VMware-Workstation",
    FileName =~ "virsh.exe", "KVM-virsh",
    "Other"
)
| project
    Timestamp,
    DeviceName,
    AccountName,
    AccountDomain,
    FileName,
    ProcessCommandLine,
    InitiatingProcessFileName,
    InitiatingProcessCommandLine,
    InitiatingProcessAccountName,
    CommandType,
    FolderPath,
    ProcessId
| order by Timestamp desc
high severity high confidence

Data Sources

Microsoft Defender for Endpoint

Required Tables

DeviceProcessEvents

False Positives

  • VMware infrastructure administrators running routine health checks with esxcli or vim-cmd during scheduled maintenance windows
  • Backup and DR solutions (Veeam, Zerto, Commvault) enumerating VMs prior to snapshot-based backup jobs
  • Monitoring agents (vRealize Operations, Prometheus VMware exporter, Nagios XI with VMware plugins) polling VM inventory on a schedule
  • Ansible, Terraform, or PowerCLI automation scripts performing VM lifecycle management or infrastructure-as-code operations
  • IT asset discovery tools (ServiceNow Discovery, Qualys, Rapid7) enumerating virtualized infrastructure during scheduled scans

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections