T1564.006 IBM QRadar · QRadar

Detect Run Virtual Instance in IBM QRadar

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.

MITRE ATT&CK

Tactic
Defense Evasion
Technique
T1564 Hide Artifacts
Sub-technique
T1564.006 Run Virtual Instance
Canonical reference
https://attack.mitre.org/techniques/T1564/006/

QRadar Detection Query

IBM QRadar (QRadar)
sql
SELECT
  DATEFORMAT(devicetime, 'yyyy-MM-dd HH:mm:ss') AS event_time,
  logsourceid,
  LOGSOURCENAME(logsourceid) AS log_source,
  sourceip,
  username,
  QIDNAME(qid) AS event_name,
  "processname",
  "commandline",
  "parentprocessname",
  CASE
    WHEN LOWER("commandline") MATCHES '.*(--(headless|type headless|startvm)|-headless|-nographic).*' THEN 1
    ELSE 0
  END AS headless_mode,
  CASE
    WHEN LOWER("commandline") MATCHES '.*(sharedfolder add|mappedfolder|sharedlocation|-virtfs|--shared).*' THEN 1
    ELSE 0
  END AS shared_folder_config,
  CASE
    WHEN LOWER("parentprocessname") MATCHES '.*(powershell\.exe|pwsh\.exe|cmd\.exe|wscript\.exe|cscript\.exe|mshta\.exe|rundll32\.exe|regsvr32\.exe|winword\.exe|excel\.exe|outlook\.exe|acrord32\.exe)' THEN 1
    ELSE 0
  END AS suspicious_parent,
  CASE
    WHEN LOWER("processname") MATCHES '.*(vboxheadless|vboxmanage|vboxsvc|virtualbox|vboxsdl|qemu-system|qemu-img|vmrun|windowssandbox)\.exe'
    AND NOT LOWER("processpath") MATCHES '.*(program files\\(oracle|vmware|qemu|windows sandbox)|windows\\system32|windows\\syswow64).*' THEN 1
    ELSE 0
  END AS unexpected_path,
  CASE
    WHEN LOWER("commandline") MATCHES '.*\.wsb.*' THEN 1
    ELSE 0
  END AS wsb_invocation
FROM events
WHERE
  LOGSOURCETYPEID IN (12, 13, 14, 15) -- Windows Security/Sysmon log sources
  AND (
    LOWER("processname") MATCHES '.*(vboxheadless|vboxmanage|vboxsvc|virtualbox|vboxsdl|qemu-system-x86_64|qemu-system-i386|qemu-system-aarch64|qemu-img|vmrun|windowssandbox)\.exe'
    OR LOWER("commandline") MATCHES '.*\.wsb.*'
  )
  AND devicetime > (CURRENT_TIMESTAMP - 86400000)
ORDER BY
  (headless_mode + shared_folder_config + suspicious_parent + unexpected_path + wsb_invocation) DESC,
  devicetime DESC
LAST 24 HOURS
high severity medium confidence

QRadar AQL query detecting virtual instance execution (VirtualBox, QEMU, VMware, Windows Sandbox) with risk scoring for headless mode, shared folder configuration, suspicious parent process, unexpected installation path, and .wsb file invocation. Targets Windows Security and Sysmon log sources.

Data Sources

QRadar Windows Security Event Log DSMQRadar Sysmon DSMMicrosoft Windows Security Event Log

Required Tables

events

False Positives & Tuning

  • Enterprise virtual desktop infrastructure (VDI) solutions that legitimately execute VBoxHeadless.exe or vmrun.exe from automated management scripts
  • Developer workstations with VirtualBox or QEMU installed to non-default paths by package managers (Chocolatey, Scoop, winget)
  • Security operations platforms that use Windows Sandbox .wsb configurations for malware detonation in a controlled manner
Download portable Sigma rule (.yml)

Other platforms for T1564.006


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Windows Sandbox .wsb Execution with MappedFolder and LogonCommand

    Expected signal: Sysmon Event ID 1: Process Create with Image=WindowsSandbox.exe, CommandLine containing 'argus_test_T1564006.wsb'. Sysmon Event ID 11: File Create for the .wsb file in %TEMP%. Security Event ID 4688 (if command-line auditing enabled) for the PowerShell process writing the .wsb file.

  2. Test 2VBoxManage Shared Folder Add Targeting Host Root Drive

    Expected signal: Sysmon Event ID 1: Process Create with Image=C:\Program Files\Oracle\VirtualBox\VBoxManage.exe, CommandLine containing 'sharedfolder add' and '--hostpath C:\' and '--automount'. The command returns an error (VM not found) but the process creation event is generated.

  3. Test 3QEMU Headless Execution from Non-Standard Path

    Expected signal: Sysmon Event ID 11: File Create for svchost32.exe in %TEMP% (copy of QEMU binary). Sysmon Event ID 1: Process Create with Image=%TEMP%\svchost32.exe, CommandLine containing '-nographic -m 64 -snapshot'. The QEMU binary copy will also generate a DeviceFileEvents entry in MDE.

  4. Test 4QEMU Virtual Machine Execution on Linux

    Expected signal: Syslog/auditd: process creation for qemu-system-x86_64 with arguments '-m 64 -nographic -snapshot -hda /dev/null'. Linux auditd EXECVE syscall event showing full argument list. If using Defender for Endpoint Linux agent: DeviceProcessEvents entry with FileName=qemu-system-x86_64 and ProcessCommandLine containing '-nographic'.

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