System Checks
Adversaries may employ various system checks to detect and avoid virtualization and analysis environments. Checks may include WMI queries for BIOS manufacturer, system model, temperature sensors, and fan hardware; registry queries for VMware/VirtualBox/QEMU/Hyper-V keys; file system checks for VM guest tools and drivers; hardware enumeration for VM-specific PCI vendor IDs; process enumeration for analysis and monitoring tools; and CPU core count / memory / disk size validation. Malware families including GravityRAT, Lumma Stealer, Bumblebee, QakBot, DarkTortilla, and FinFisher use extensive system checks before executing their core payloads.
let WMIVMQueries = dynamic(["MSAcpi_ThermalZoneTemperature", "Win32_Fan", "Win32_ComputerSystem", "Win32_BIOS", "Win32_BaseBoard", "Win32_DiskDrive", "Win32_PhysicalMemory", "Win32_Processor", "Win32_VideoController"]);
let VMRegistryPaths = dynamic(["VMware", "VirtualBox", "VBoxGuest", "QEMU", "Xen", "Hyper-V", "Red Hat VirtIO", "VEN_15AD", "VEN_80EE", "VEN_1AB8"]);
let VMDriverFiles = dynamic(["VBoxMouse.sys", "VBoxGuest.sys", "VBoxSF.sys", "vmhgfs.sys", "vmmouse.sys", "vmci.sys", "vboxdisp.dll", "vmGuestLib.dll"]);
let AnalysisTools = dynamic(["wireshark", "procmon", "procexp", "processhacker", "fiddler", "x64dbg", "x32dbg", "ollydbg", "ida64", "idaq", "windbg", "autoruns", "tcpdump", "dumpcap", "regmon", "filemon", "pestudio", "dnspy"]);
DeviceProcessEvents
| where Timestamp > ago(24h)
| where (FileName =~ "wmic.exe" and ProcessCommandLine has_any (WMIVMQueries))
or (FileName =~ "reg.exe" and ProcessCommandLine has_any (VMRegistryPaths))
or (FileName in~ ("cmd.exe", "powershell.exe") and ProcessCommandLine has_any (VMDriverFiles))
or (ProcessCommandLine has_any ("tasklist", "Get-Process") and ProcessCommandLine has_any (AnalysisTools))
or (FileName =~ "systeminfo.exe" and InitiatingProcessFileName !in~ ("cmd.exe", "explorer.exe", "svchost.exe"))
or ProcessCommandLine has_any ("VMwareHostOpen.exe", "HKLM\\SOFTWARE\\VMware", "Win32_ComputerSystem WHERE Model", "NumberOfCores", "TotalPhysicalMemory")
| extend WMICheck = FileName =~ "wmic.exe" and ProcessCommandLine has_any (WMIVMQueries)
| extend RegistryCheck = FileName =~ "reg.exe" and ProcessCommandLine has_any (VMRegistryPaths)
| extend DriverCheck = ProcessCommandLine has_any (VMDriverFiles)
| extend ToolScan = ProcessCommandLine has_any ("tasklist", "Get-Process") and ProcessCommandLine has_any (AnalysisTools)
| extend HardwareCheck = ProcessCommandLine has_any ("NumberOfCores", "TotalPhysicalMemory", "Win32_DiskDrive", "Win32_VideoController")
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine,
WMICheck, RegistryCheck, DriverCheck, ToolScan, HardwareCheck
| sort by Timestamp desc Data Sources
Required Tables
False Positives
- IT asset management tools (SCCM, Intune, ManageEngine, Lansweeper) running WMI hardware inventory queries
- System monitoring software collecting hardware sensor data for dashboards
- Endpoint security products performing hardware fingerprinting during enrollment
- Developers or QA teams running system information checks in VM test environments
References (6)
- https://attack.mitre.org/techniques/T1497/001/
- https://researchcenter.paloaltonetworks.com/2018/09/unit42-oilrig-targets-middle-eastern-government-adds-evasion-techniques-oopsie/
- https://securingtomorrow.mcafee.com/other-blogs/mcafee-labs/stopping-malware-fake-virtual-machine/
- https://drive.google.com/file/d/1t0jn3xr4ff2fR30oQAUn_RsWSnMpOAQc/edit
- https://github.com/a0rtega/pafish
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1497.001/T1497.001.md
Unlock Pro Content
Get the full detection package for T1497.001 including response playbook, investigation guide, and atomic red team tests.