T1564.006

Run Virtual Instance

Adversaries may carry out malicious operations using a virtual instance to avoid detection. By running malicious code inside a VM, adversaries hide artifacts from security tools that cannot monitor guest activity. Ransomware groups (Maze, Ragnar Locker) used VirtualBox with shared folders mapped to host drives to encrypt files while evading endpoint protection. LoudMiner ran XMRig inside QEMU/VirtualBox Linux VMs for cryptomining. On ESXi, adversaries create rogue VMs via /bin/vmx directly, bypassing vCenter visibility checks. Windows Sandbox .wsb configuration files support LogonCommand payloads and MappedFolder host filesystem access, abused by MirrorFace APT. The CronTrap campaign used QEMU to stage malware inside emulated Linux environments on Windows hosts.

Microsoft Sentinel / Defender
kusto
let VirtBinaries = dynamic([
    "VBoxHeadless.exe", "VBoxSVC.exe", "VBoxManage.exe", "VirtualBox.exe", "VBoxSDL.exe",
    "qemu-system-x86_64.exe", "qemu-system-i386.exe", "qemu-system-aarch64.exe",
    "qemu-img.exe", "vmrun.exe", "WindowsSandbox.exe"
]);
let SuspiciousParents = dynamic([
    "powershell.exe", "pwsh.exe", "cmd.exe", "wscript.exe", "cscript.exe",
    "mshta.exe", "rundll32.exe", "regsvr32.exe", "schtasks.exe",
    "winword.exe", "excel.exe", "outlook.exe", "acrord32.exe"
]);
let LegitPaths = dynamic([
    "\\Program Files\\Oracle\\",
    "\\Program Files (x86)\\Oracle\\",
    "\\Program Files\\VMware\\",
    "\\Program Files (x86)\\VMware\\",
    "\\Program Files\\QEMU\\",
    "\\Windows\\System32\\",
    "\\Windows\\SysWOW64\\"
]);
DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName has_any (VirtBinaries)
      or (ProcessCommandLine has ".wsb" and FileName !~ "explorer.exe")
| extend HeadlessMode = ProcessCommandLine has_any ("--headless", "--type headless", "--startvm", "-headless", "-nographic")
| extend SharedFolderConfig = ProcessCommandLine has_any ("sharedfolder add", "MappedFolder", "sharedlocation", "-virtfs", "--shared")
| extend SuspiciousParent = InitiatingProcessFileName has_any (SuspiciousParents)
| extend UnexpectedPath = FileName has_any (VirtBinaries) and not(FolderPath has_any (LegitPaths))
| extend WsbInvocation = ProcessCommandLine has ".wsb"
| extend SuspicionScore = toint(HeadlessMode) + toint(SharedFolderConfig)
      + toint(SuspiciousParent) + toint(UnexpectedPath) + toint(WsbInvocation)
| project Timestamp, DeviceName, AccountName, FileName, FolderPath, ProcessCommandLine,
         InitiatingProcessFileName, InitiatingProcessCommandLine,
         HeadlessMode, SharedFolderConfig, SuspiciousParent, UnexpectedPath, WsbInvocation, SuspicionScore
| sort by SuspicionScore desc, Timestamp desc
high severity medium confidence

Data Sources

Process: Process Creation Command: Command Execution Microsoft Defender for Endpoint

Required Tables

DeviceProcessEvents

False Positives

  • Developers and QA engineers running VirtualBox or VMware Workstation headlessly as part of automated build/test pipelines (e.g., Vagrant, Packer)
  • IT administrators using VBoxManage to manage shared folders for legitimate remote work or file transfer workflows
  • Security researchers or blue teams running malware analysis VMs headlessly in an isolated lab environment
  • Enterprise sandbox solutions (Bromium, Sandboxie) that legitimately invoke virtualization components from management processes
  • Windows Sandbox used for legitimate application compatibility testing or software evaluation by power users

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections