Back to Intelligence

Unmanaged VMs and Shadow Virtualization: Detection, Hunting, and Remediation Guide for Defenders

SA
Security Arsenal Team
November 28, 2026
12 min read

Security teams spend enormous effort hardening the perimeter — next-gen firewalls, segmentation, EDR on every managed endpoint, tight patch SLAs. Then an incident kicks off and the initial access point turns out to be a virtual machine nobody knew existed: a developer's test box spun up in a cloud tenant, a forgotten Hyper-V guest on a decommissioned server, a VirtualBox instance on a workstation running an unpatched web app. That VM never enrolled in your EDR deployment, never appeared in your vulnerability scans, and never showed up in the CMDB. Your firewall rules were never written with it in mind.

This is the core message of the recent coverage on unmanaged virtual machines: the traditional network perimeter does not protect assets you cannot see, and virtualization — on-prem hypervisors, workstation hypervisors, and especially cloud IaaS — makes it trivially easy for anyone with credentials to instantiate infrastructure outside every control you own. Attackers have figured this out. Red teams have known it for years. In our own engagements at Security Arsenal, unmanaged VMs are one of the most reliable paths we find into otherwise well-defended environments.

This post breaks down why unmanaged VMs are such a dangerous blind spot, how adversaries abuse them, and — most importantly — how to detect, hunt, and remediate them with concrete rules, queries, and scripts you can deploy this week.

Technical Analysis: Why Unmanaged VMs Are the Perfect Foothold

What Counts as an "Unmanaged VM"

An unmanaged VM is any virtualized workload that operates outside your standard governance pipeline. In practice, this includes:

  • Shadow cloud VMs: Instances created directly in the Azure Portal, AWS Console, or GCP console by developers, data scientists, or IT staff using legitimate credentials but bypassing IaC pipelines, tagging policies, and security baselines. No EDR extension, no vulnerability agent, no NSG review, often public IPs by default.
  • Rogue workstation hypervisors: VirtualBox, VMware Workstation, QEMU, or Hyper-V guests running on user endpoints — frequently standing up vulnerable services (old web frameworks, test databases, default-credential appliances) that are reachable from the LAN.
  • Orphaned hypervisor guests: VMs left running on hosts after projects end, migrations complete, or admins leave. These quietly rot: no patches, no monitoring, but full network connectivity.
  • Attacker-created VMs: A post-compromise technique where an adversary with admin rights creates VMs to evade EDR (running tooling inside a guest where the host's sensor has no visibility), establish persistence that survives endpoint reimaging, or stage data exfiltration. This technique — running payloads inside a local VM to blind host-based detection — has been documented in ransomware operations and is mapped in MITRE ATT&CK as T1564.006 (Hide Artifacts: Run Virtual Instance).

Why the Firewall Doesn't Save You

The firewall model assumes you know what you're protecting. Unmanaged VMs break three foundational assumptions:

  1. Inventory assumption: Firewall rules, segmentation policy, and scan scopes are all derived from asset inventories. An asset that isn't in the inventory isn't in the policy.
  2. Agent assumption: EDR, vulnerability management, and compliance tooling require an installed agent or an enrolled extension. A VM created outside the pipeline has neither. From your SOC's perspective, it generates zero telemetry.
  3. Identity assumption: Cloud VMs can be created with their own managed identities, SSH keys, or local admin accounts that never touch your IdP or PAM solution. Credential hygiene controls are silently bypassed.

An attacker who compromises or discovers one of these VMs gains a persistent, unmonitored pivot point inside your network boundary — often with line-of-sight to production segments, because nobody wrote a deny rule for a machine that "doesn't exist."

The Attack Chain, From the Defender's Seat

A typical exploitation path looks like this:

  1. Reconnaissance: The attacker scans your public IP ranges and cloud tenants (passively via certificate transparency logs, Shodan, or cloud IP range enumeration) and finds a publicly exposed VM with an unpatched service, an open RDP/SSH port, or a forgotten management interface.
  2. Initial access: Exploitation of whatever is exposed — outdated software, weak SSH keys, default credentials on a test appliance.
  3. Entrenchment: Because the VM has no EDR and ships no logs, the attacker operates indefinitely. They harvest any credentials stored on the box (cloud metadata service tokens are a prime target on cloud VMs), map internal reachability, and stage tooling.
  4. Lateral movement: From the unmanaged VM into managed territory — SMB, WinRM, database connections, or abused trust relationships. This is usually the first point where your SOC has any chance of seeing the activity, and only if your east-west monitoring is competent.
  5. Optional: shadow VM creation: With harvested admin credentials, the attacker creates new VMs inside your environment to run encryption, exfiltration staging, or C2 — workloads your endpoint sensors cannot see into.

Exploitation status: This is not a theoretical risk or a single-CVE story — it is a structural exposure class actively used in real intrusions. Ransomware affiliates and initial access brokers routinely target exposed, unmonitored infrastructure, and EDR-evasion-via-VM is a documented, observed technique. Treat unmanaged VM discovery as an ongoing hunt, not a one-time cleanup.

Detection & Response

The good news: unmanaged VMs leave fingerprints. VM creation is an auditable control-plane event in every major cloud, hypervisor processes are observable on endpoints, and shadow VMs generate anomalous network behavior. Below are production-ready detections.

Sigma Rules

These two rules target the endpoint side of the problem: (1) execution of workstation hypervisors on endpoints where they shouldn't run, and (2) interactive VM-creation tooling launched from suspicious contexts. Tune the hypervisor rule against a known-good list of sanctioned VM hosts — that single filter is the difference between a useful alert and a rule that gets disabled.

YAML
---
title: Workstation Hypervisor Execution on Non-Sanctioned Endpoint
id: 3f8a2b14-9c6d-4e7a-b1f2-5d8e0a4c9b31
status: experimental
description: Detects execution of workstation virtualization platforms (VirtualBox, VMware Workstation, QEMU) which may indicate shadow VM usage or attacker EDR-evasion via local virtual instances. Filter against authorized VM host inventory.
references:
  - https://attack.mitre.org/techniques/T1564/006/
  - https://www.bleepingcomputer.com/news/security/your-firewall-isnt-enough-the-hidden-risk-of-unmanaged-vms/
author: Security Arsenal
date: 2026/02/10
tags:
  - attack.defense_evasion
  - attack.t1564.006
logsource:
  category: process_creation
  product: windows
detection:
  selection:
    Image|endswith:
      - '\VirtualBox.exe'
      - '\VBoxHeadless.exe'
      - '\VBoxManage.exe'
      - '\vmware.exe'
      - '\vmware-vmx.exe'
      - '\vmrun.exe'
      - '\qemu-system-x86_64.exe'
      - '\qemu-img.exe'
  filter_sanctioned_hosts:
    Computer|contains:
      - 'VDI-'
      - 'DEVVIRT-'
  condition: selection and not filter_sanctioned_hosts
falsepositives:
  - Developers and QA staff with approved local virtualization
  - VDI infrastructure hosts
level: medium
---
title: Hyper-V or WSL Virtual Machine Management via Command Line
id: 8c1e5f72-2a4b-4d93-8e61-7f0b3c5d2a94
status: experimental
description: Detects command-line creation, import, or startup of Hyper-V/WSL virtual machines, a technique used both by shadow IT and by attackers running payloads inside VMs to evade host EDR visibility.
references:
  - https://attack.mitre.org/techniques/T1564/006/
  - https://www.bleepingcomputer.com/news/security/your-firewall-isnt-enough-the-hidden-risk-of-unmanaged-vms/
author: Security Arsenal
date: 2026/02/10
tags:
  - attack.defense_evasion
  - attack.t1564.006
  - attack.execution
logsource:
  category: process_creation
  product: windows
detection:
  selection_img:
    Image|endswith:
      - '\powershell.exe'
      - '\pwsh.exe'
      - '\vmconnect.exe'
  selection_cli:
    CommandLine|contains:
      - 'New-VM '
      - 'Import-VM '
      - 'Start-VM '
      - 'Set-VM '
      - 'New-VHD '
  condition: selection_img and selection_cli
falsepositives:
  - Legitimate hypervisor administration on sanctioned hosts — scope to workstations and member servers
level: high

KQL Hunting (Microsoft Sentinel / Defender)

The highest-fidelity detection for shadow cloud VMs is the control plane itself: any VM creation that did not flow through your IaC pipeline. This query correlates Azure Activity Log VM-write operations against a sanctioned deployment identity list, and pairs it with a Defender endpoint hunt for hypervisor processes.

KQL — Microsoft Sentinel / Defender
// Hunt 1: Azure VMs created outside the approved IaC/deployment pipeline
// Requires Azure Activity Log ingestion (AzureActivity table)
let SanctionedDeployers = dynamic(["spn-terraform-prod", "azuredevops-deploy@contoso.com", "cicd-pipeline-identity"]);
AzureActivity
| where TimeGenerated > ago(14d)
| where OperationNameValue =~ "MICROSOFT.COMPUTE/VIRTUALMACHINES/WRITE"
| where ActivityStatusValue =~ "Success"
| extend CreatedBy = tostring(parse_json(Claims)["http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn"])
| where not(CreatedBy has_any (SanctionedDeployers)) and not(Caller has_any (SanctionedDeployers))
| project TimeGenerated, Caller, CallerIpAddress, ResourceGroup, _ResourceId, OperationNameValue, ActivityStatusValue, CorrelationId
| sort by TimeGenerated desc;

// Hunt 2: Hypervisor / VM tooling execution on endpoints (Defender for Endpoint)
DeviceProcessEvents
| where TimeGenerated > ago(14d)
| where FileName in~ ("VirtualBox.exe", "VBoxHeadless.exe", "VBoxManage.exe", "vmware-vmx.exe", "vmrun.exe", "qemu-system-x86_64.exe")
   or (ProcessCommandLine has_any ("New-VM", "Import-VM", "Start-VM") and FileName in~ ("powershell.exe", "pwsh.exe"))
| project TimeGenerated, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessAccountName, SHA256
| sort by TimeGenerated desc;

// Hunt 3: Outbound connections FROM hypervisor processes — attacker tooling running inside guest-to-host NAT
DeviceNetworkEvents
| where TimeGenerated > ago(7d)
| where InitiatingProcessFileName in~ ("VBoxHeadless.exe", "vmware-vmx.exe", "qemu-system-x86_64.exe", "vmwp.exe")
| where RemoteIPType =~ "Public"
| summarize ConnectionCount = count(), DistinctDestinations = dcount(RemoteIP) by DeviceName, InitiatingProcessFileName, RemoteIP, RemotePort
| sort by DistinctDestinations desc;

Velociraptor VQL

For on-prem DFIR hunts, this artifact enumerates running hypervisor processes and dropped VM disk artifacts across the fleet — useful for finding both shadow IT guests and attacker-staged VMs during an IR sweep.

VQL — Velociraptor
-- Hunt: Unmanaged Virtual Machine Artifacts and Hypervisor Processes
-- Deploy as a fleet-wide hunt; triage results against your authorized VM host list

SELECT Pid, Name, CommandLine, Exe, Username, CreateTime
FROM pslist()
WHERE Exe =~ '(?i)(virtualbox|vboxheadless|vboxmanage|vmware-vmx|vmrun|qemu-system|vmwp)'

UNION ALL

SELECT
  NULL AS Pid,
  'VM_DISK_ARTIFACT' AS Name,
  FullPath AS CommandLine,
  FullPath AS Exe,
  NULL AS Username,
  Mtime AS CreateTime
FROM glob(globs=['C:/Users/*/**/*.vmdk', 'C:/Users/*/**/*.vdi', 'C:/Users/*/**/*.vhdx', 'C:/Users/*/**/*.qcow2', 'C:/VMs/**/*.vhdx'])
WHERE Mtime > now() - 60 * 24 * 3600

Remediation / Audit Script

This PowerShell script performs a first-pass unmanaged-VM audit: enumerates local Hyper-V guests, flags running VMs on non-sanctioned hosts, checks whether your EDR sensor is present on the host, and lists network listeners that may indicate services exposed by rogue VMs. Run it fleet-wide via your RMM, GPO scheduled task, or Defender live response, and aggregate the CSV output centrally.

PowerShell
# Unmanaged-VM Audit — run as SYSTEM/Admin on Windows hosts
# Outputs findings to C:\ProgramData\SecAudit\unmanaged-vm-audit-<hostname>.csv

$outDir = "C:\ProgramData\SecAudit"
New-Item -ItemType Directory -Path $outDir -Force | Out-Null
$report = @()

# 1. Enumerate Hyper-V guests (if Hyper-V role/feature present)
if (Get-Command Get-VM -ErrorAction SilentlyContinue) {
    Get-VM | ForEach-Object {
        $report += [PSCustomObject]@{
            Finding   = "HyperV-Guest"
            Name      = $_.Name
            State     = $_.State
            Path      = $_.Path
            Created   = $_.CreationTime
            Detail    = "CPU:$($_.ProcessorCount) RAM:$([math]::Round($_.MemoryAssigned/1GB,1))GB"
        }
    }
}

# 2. Detect workstation hypervisor processes currently running
Get-Process -ErrorAction SilentlyContinue | Where-Object {
    $_.Name -match '^(VirtualBox|VBoxHeadless|VBoxManage|vmware|vmware-vmx|vmrun|qemu-system.*)$'
} | ForEach-Object {
    $report += [PSCustomObject]@{
        Finding = "Hypervisor-Process"; Name = $_.Name; State = "Running"
        Path = $_.Path; Created = $_.StartTime; Detail = "PID:$($_.Id)"
    }
}

# 3. Check EDR sensor presence on the host itself (example: Defender for Endpoint)
$mdr = Get-Service -Name "Sense" -ErrorAction SilentlyContinue
$report += [PSCustomObject]@{
    Finding = "Host-EDR-Status"; Name = "Sense"
    State   = if ($mdr) { $mdr.Status } else { "NOT INSTALLED" }
    Path = ""; Created = ""; Detail = "Host-level sensor check"
}

# 4. Flag non-standard listening services (common rogue-VM service indicators)
$baselinePorts = @(135,139,445,3389,5985,5986)
Get-NetTCPConnection -State Listen -ErrorAction SilentlyContinue | Where-Object {
    $_.LocalPort -notin $baselinePorts -and $_.LocalAddress -notmatch '^127\.'
} | ForEach-Object {
    $proc = Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue
    $report += [PSCustomObject]@{
        Finding = "NonStandard-Listener"; Name = $proc.Name; State = "Listen"
        Path = $proc.Path; Created = ""
        Detail = "Port:$($_.LocalPort) Addr:$($_.LocalAddress)"
    }
}

$report | Export-Csv -Path "$outDir\unmanaged-vm-audit-$env:COMPUTERNAME.csv" -NoTypeInformation
Write-Output "[+] Audit complete: $($report.Count) findings written to $outDir"

Remediation: Closing the Unmanaged-VM Gap

Detection finds the problem; governance prevents it. Prioritize the following:

  1. Establish a continuous VM inventory — not a point-in-time one. Enumerate every VM across cloud tenants (Azure Resource Graph, AWS Config, GCP Asset Inventory) and on-prem hypervisors (vCenter, Hyper-V, Proxmox) on a scheduled cadence, and diff against your CMDB. Any VM not in the CMDB is an incident until proven otherwise. Cloud-native attack surface management (Azure Defender for Cloud, AWS Security Hub) will flag internet-exposed, agentless VMs automatically — enable those recommendations and route them to your SOC.
  2. Deny-by-default on VM creation. In Azure, use Policy to block VM deployments without required tags, approved images, and the monitoring extension; in AWS, use SCPs and Service Control policies to restrict ec2:RunInstances to pipeline roles. If a human can click "Create VM" in a production subscription, your governance has failed by design.
  3. Restrict workstation virtualization. Use application control (WDAC/AppLocker) to block VirtualBox, VMware Workstation, and QEMU on endpoints without an approved exception. This kills both shadow IT guests and the attacker EDR-evasion-via-VM technique in one move.
  4. Enforce agent deployment at the control plane. Auto-deploy EDR and vulnerability agents via Azure VM extensions policy / AWS SSM association so that every VM — however it was created — phones home within minutes of first boot. An enrolled VM is a managed VM, even if its creation was rogue.
  5. Fix the network assumption. Apply default-deny east-west rules and treat any host not in inventory as untrusted at the switch/NSG level. Unknown MAC addresses and unexpected DHCP leases on server VLANs should alert.
  6. Hunt on a schedule. Run the Sigma/KQL/VQL content above weekly at minimum, and immediately during any IR engagement — attacker-created VMs are a persistence mechanism that survives endpoint reimaging.
  7. Decommission ruthlessly. Orphaned VMs from completed projects should have a documented sunset process: snapshot, power off, and delete after a defined retention window. Every month an unpatched orphan runs is a month of free dwell time for whoever finds it first.

The uncomfortable truth this news item surfaces is that most organizations' asset inventories are aspirational documents. Attackers don't read them — they scan reality. Close the gap between what you think you run and what you actually run, and you eliminate one of the cheapest, most reliable footholds available to an adversary.

Related Resources

Security Arsenal Red Team Services AlertMonitor Platform Book a SOC Assessment pen-testing Intel Hub

Is your security operations ready?

Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.