analyst@nohacky:~/mitre $
mitre/t1497
analyst@nohacky:~/mitre/t1497-virtualization-sandbox-evasion.html
reading mode20 min read
technique_idT1497
categoryMITRE ATT&CK
tactics
Defense EvasionDiscovery
publishedMarch 2026

T1497: Virtualization/Sandbox Evasion

Adversaries detect and avoid virtualized analysis environments by probing for artifacts of virtual machines, sandboxes, and automated security tools. When a controlled environment is identified, the malware alters its behavior — suppressing malicious activity, delaying execution, deploying decoy code, or terminating entirely. The payload never detonates. The sandbox sees nothing. The analyst's report says "benign."

surging threat

Virtualization/Sandbox Evasion surged to the #4 most prevalent technique in the Picus Red Report 2026 after being absent from the Top 10 for two consecutive years. Found in 20% of analyzed malware samples, this means one in five modern malware strains will "play dead" if they detect an automated analysis environment.

T1497 maps to two ATT&CK tactics simultaneously: Defense Evasion and Discovery. The malware actively queries system properties — hardware identifiers, installed software, running processes, registry keys, user activity patterns, timing characteristics — to determine whether it is in a virtual or physical environment. This environmental reconnaissance constitutes discovery activity. The subsequent decision to alter behavior based on those findings — terminating, delaying, or deploying decoy code — constitutes defense evasion.

The return of T1497 to the top ten signals a fundamental shift in adversary priorities. As the Picus Red Report describes it, attackers have moved from "predatory" smash-and-grab operations to "parasitic" silent residency. Sandbox evasion is the gatekeeper of this strategy: before a parasite can embed itself in a host, it must first verify that the host is real.

How Sandbox Evasion Works

The core logic of T1497 is a decision gate. Before executing any malicious payload, the malware runs a series of environmental checks. If the checks indicate a real user workstation, execution proceeds. If they indicate a sandbox, VM, or analysis tool, the malware takes an alternative path — typically one of four responses:

Terminate silently. The malware exits without performing any malicious action. The sandbox records a clean execution, and the file passes through security controls marked as safe.

Delay indefinitely. The malware enters a sleep loop or waits for a condition that will never occur in an automated environment (such as human mouse activity or a specific system uptime threshold). The sandbox times out and reports no activity.

Deploy decoy behavior. The malware performs benign or plausible actions — opening a legitimate document, displaying a fake error message, connecting to a harmless URL — to provide analysts with a "clean" behavioral profile while concealing its true capabilities.

Degrade functionality. The malware executes a reduced version of its payload, avoiding the highest-value or most detectable operations (such as credential theft or C2 communication) until it determines it has reached a real target.

Sub-Techniques

MITRE ATT&CK defines three sub-techniques under T1497, each targeting a different category of environmental indicator:

T1497.001 — System Checks

System checks inspect hardware, software, and configuration attributes that differ between physical workstations and virtualized environments. These are the most common and most varied category of sandbox evasion techniques. Malware performing system checks may probe for:

Check CategoryWhat the Malware Looks For
VM vendor artifactsRegistry keys, device drivers, services, or BIOS strings containing "VBOX," "VMware," "Hyper-V," "QEMU," or "Xen" — indicators that the system is a virtual machine
Hardware constraintsLow CPU core counts (1-2 cores), small memory allocations (under 4GB), small disk sizes (under 60GB), or absence of physical components like audio devices, USB controllers, or hardware sensors
MAC address prefixesNetwork adapter MAC addresses with vendor prefixes assigned to virtualization platforms (e.g., 08:00:27 for VirtualBox, 00:0C:29 for VMware, 00:15:5D for Hyper-V)
Process enumerationRunning processes associated with analysis tools: wireshark.exe, procmon.exe, x64dbg.exe, fiddler.exe, ollydbg.exe, VM guest agent processes
File system artifactsFiles or directories specific to VM environments: VMware Tools installation paths, VirtualBox Guest Additions, sandbox-specific driver files
Hypervisor instructionsDirect interaction with hypervisor-specific CPU instructions or I/O ports (e.g., the VMware backdoor I/O port 0x5658) to detect virtualization at the hardware level
Screen resolutionDefault sandbox screen sizes (1024x768, 800x600, 640x480) that do not match typical user workstation configurations

A June 2025 analysis by Palo Alto Unit 42 of Blitz malware demonstrated a combination approach: the malware checks for a minimum of four CPU cores, validates that the screen resolution does not match known sandbox defaults, and searches for specific driver strings associated with analysis tools like ANY.RUN. If any check fails, the malware aborts execution entirely.

T1497.002 — User Activity Based Checks

User activity checks verify that a real human is interacting with the system. Automated sandboxes simulate operating system environments but often fail to generate realistic user activity patterns. Malware exploiting this gap may check for:

Mouse movement. The malware monitors cursor position over time and requires movement that demonstrates natural human characteristics: acceleration, deceleration, curved paths, and varied timing between movements. Automated tools that teleport the cursor or move it in perfectly straight lines at constant speeds fail this check.

Click and keyboard events. The malware waits for genuine user input events before proceeding. A system with no mouse clicks or keystrokes over an extended period is unlikely to be a real workstation.

Recent user artifacts. The malware checks for evidence of normal usage: browser history, recent documents in the Start menu, email client data, or a populated desktop. A freshly installed OS with no user artifacts is a strong indicator of a sandbox.

Installed applications. Real user workstations typically have a diverse set of installed software (browsers, office suites, communication tools). A system with only default OS components suggests an analysis environment.

LummaC2 v4.0 represents the state of the art in user activity evasion. The malware uses the GetCursorPos() Windows API to record five consecutive cursor positions with 50ms delays between samples. It then applies Euclidean distance calculations to each pair of movement vectors and uses trigonometric analysis to evaluate the angles and smoothness of the motion. If the cursor positions form patterns that are too linear, too evenly spaced, or lack the natural micro-variations of human hand movement, the malware loops back and starts sampling again. The payload never executes until it determines a real human is operating the machine.

T1497.003 — Time Based Checks

Time-based checks exploit the fact that sandboxes typically analyze files for only a few minutes before moving to the next sample. More sophisticated variants detect the timing distortions that hypervisors introduce at the CPU level.

Sleep evasion. The simplest form: the malware calls Sleep(), SleepEx(), or Start-Sleep with a delay long enough to outlast the sandbox analysis window — typically 10 to 30 minutes. When the sandbox times out and reports no activity, the malware later wakes on the real victim system and executes.

Uptime checks. The malware queries GetTickCount or reads system uptime from the registry. A system that has been running for only a few minutes is likely a sandbox that was just spun up. Real user workstations typically show hours or days of uptime.

CPU timing analysis. The most sophisticated variant. Blitz malware, documented by Unit 42 in June 2025, measures the execution time of one million loop iterations on the main thread and compares it against the execution time of a secondary floating-point operation thread. In a physical environment, these timings are predictable and consistent. In a virtualized environment, the hypervisor introduces subtle timing inconsistencies as it schedules CPU access across virtual machines. By comparing expected vs. observed execution timing, the malware can detect virtualization even when all other VM artifacts have been removed.

Timestamp acceleration detection. Sandboxes that attempt to "fast-forward" through sleep calls by manipulating the system clock create detectable inconsistencies. The malware samples timestamps before and after a sleep call using multiple independent sources (system time, performance counters, RDTSC instruction) and compares them. If the timestamps from different sources disagree, the sandbox has been caught manipulating time.

Why T1497 Has Surged in 2026

The Picus Red Report 2026 found that Defense Evasion, Persistence, and C2 techniques now account for 80% of the top ten ATT&CK techniques — the highest concentration of stealth-focused tradecraft ever recorded. T1497's return to the top ten after a two-year absence reflects a specific strategic evolution:

Detonation-based security is the first line of defense for enterprises. Cloud-based sandboxes (CrowdStrike Falcon Sandbox, Palo Alto WildFire, Microsoft Defender for Endpoint, FireEye AX/Trellix) intercept files before they reach endpoints. If malware can pass through these sandboxes without detonating, it arrives on the endpoint undetected and pre-cleared. T1497 has become the critical first checkpoint in modern malware — the gate that determines whether the payload enters or aborts.

Malware-as-a-Service has commoditized evasion. Sandbox evasion is no longer the province of advanced APT groups. MaaS platforms like LummaC2 ($250-$1,000/month) build sophisticated evasion into their default configurations. This means that even low-skill operators deploying commodity infostealers benefit from techniques that were once reserved for state-sponsored actors.

The "Digital Parasite" model requires stealth above all else. When the goal is long-term silent residency rather than immediate impact, getting caught at the sandbox stage is catastrophic. An attacker who plans to dwell for months cannot afford to have their payload flagged before it reaches the target. T1497 ensures the payload only activates in environments where it can operate undisturbed.

Real-World Case Studies

LummaC2 — The Trigonometry-Based Turing Test

LummaC2, a Malware-as-a-Service infostealer active since December 2022, introduced what researchers have termed a "trigonometry-based Turing test" in version 4.0. The malware captures five consecutive cursor positions using GetCursorPos() with 50ms intervals, calculates the Euclidean distance between each pair of points using the standard distance formula, then applies trigonometric analysis to the angles formed by successive movement vectors. The system requires cursor movement that demonstrates natural human characteristics: non-linear paths, varied velocity, and organic micro-variations. If these conditions are not met, the malware resets and starts the measurement cycle over, indefinitely. The payload — a credential harvester targeting browser passwords, cookies, and cryptocurrency wallets — never executes until it is satisfied a human is present. Combined with control flow flattening obfuscation, XOR-encrypted strings, and dynamic configuration files, LummaC2 v4.0 represents one of the most sophisticated evasion packages available in the commodity malware market.

Blitz — Multi-Layered Environment Profiling

Blitz malware, analyzed by Palo Alto Unit 42 in June 2025, demonstrates a multi-check approach that layers system checks with time-based analysis. The malware first performs hardware profiling: it checks for a minimum of four CPU cores, validates that the screen resolution does not match known sandbox defaults, and searches for analysis tool driver strings (including the specific string \\?\A3E64E55_fl associated with ANY.RUN). If these checks pass, it proceeds to timing analysis: measuring the execution duration of one million loop iterations on the main thread and comparing the result against a secondary floating-point thread. Any discrepancy beyond the expected variance threshold triggers abort. This layered approach means that defenders must defeat every check simultaneously — hardening VM artifacts alone is insufficient if the timing analysis still catches the environment.

WhisperGate — Destructive Malware with Sleep Evasion

WhisperGate, the destructive wiper malware deployed against Ukrainian organizations beginning in January 2022, incorporated time-based evasion as part of its delivery chain. The malware used the PowerShell Start-Sleep cmdlet to pause execution for 20 seconds (running the command twice for a total of 20 seconds of delay) before proceeding with destructive operations. While simple compared to LummaC2's trigonometric analysis, this technique was effective at evading sandboxes with short analysis windows. The WhisperGate case demonstrates that even wipers designed for immediate destruction — not stealth or persistence — incorporate sandbox evasion to ensure they reach real targets rather than detonating in analysis environments.

NOBELIUM/Cozy Bear — State-Sponsored Multi-Stage Evasion

The Russian state-sponsored group behind the SolarWinds supply chain attack deployed multiple tools with sandbox evasion capabilities. GoldMax (SUNSHUTTLE), a second-stage backdoor, implemented system checks to detect virtualized environments before establishing C2 communication. The group's toolset included Sibot, which performed environment fingerprinting before loading its next-stage payload. NOBELIUM's approach illustrates how state-sponsored actors use T1497 as an operational security measure — not just to evade automated analysis, but to ensure their implants only activate in environments that match the expected characteristics of their actual targets.

Egregor Ransomware — Sandbox Evasion in Ransomware-as-a-Service

Egregor, a Ransomware-as-a-Service operation that emerged as the successor to Maze, required a specific command-line key to decrypt and execute its payload. Without the correct key, the ransomware binary appeared inert — it would not execute any malicious code. This effectively served as an analyst-proof evasion mechanism: sandboxes that detonated the binary without the correct key would observe no malicious behavior and classify the file as clean. Only when an operator provided the runtime key during an active intrusion would the ransomware decrypt and deploy. This technique sits at the boundary between T1497 and manual operator control, demonstrating how ransomware groups architect evasion into their deployment process.

Detection Strategies

Detecting T1497 is paradoxical: the technique specifically targets the tools used for detection. Sandboxes cannot easily detect malware that was designed to detect sandboxes. Detection must therefore focus on identifying the evasion behavior itself — the environmental probing that occurs before the payload decision gate.

Key Event IDs and Data Sources

Event / SourceWhat It Captures
Sysmon 1Process creation — captures command-line arguments for discovery commands used in system checks (WMI queries, registry reads, systeminfo)
Sysmon 11File creation — tracks creation of scripts or binaries that perform environment enumeration before payload deployment
Sysmon 13Registry value set — monitors registry queries for VM-related keys (HKLM\SYSTEM\ControlSet001\Services\Disk\Enum, HKLM\SOFTWARE\VMware, HKLM\HARDWARE\Description\System)
4688Process creation — with command-line logging enabled, captures WMI, PowerShell, and cmd queries used for environment profiling
API monitoringCalls to GetCursorPos(), GetTickCount(), GetSystemTimeAsFileTime(), IsDebuggerPresent(), and CPUID instructions before payload execution
Linux auditdExecution of dmesg, lscpu, lspci, queries to /sys/class/dmi/id/product_name, or enumeration of hypervisor interfaces

Detection Queries

Splunk SPL queries

These queries detect the environmental profiling phase of sandbox evasion, not the evasion decision itself. Tune to your environment to reduce false positives from legitimate IT management and monitoring tools.

VM and Sandbox Environment Discovery Commands — Detects WMI queries and command-line operations commonly used to profile the execution environment:

index=sysmon EventCode=1
| where (CommandLine="*win32_computersystem*" OR CommandLine="*win32_bios*"
    OR CommandLine="*win32_baseboard*" OR CommandLine="*VBOX*"
    OR CommandLine="*VMware*" OR CommandLine="*Hyper-V*"
    OR CommandLine="*QEMU*")
| where NOT ParentImage IN ("*\\sccm*", "*\\SCOM*", "*\\Intune*")
| table _time, Computer, User, ParentImage, Image, CommandLine

Analysis Tool Process Enumeration — Detects processes that query the process list looking for debuggers, packet captures, and other analysis tools:

index=sysmon EventCode=1
| where (CommandLine="*tasklist*" OR CommandLine="*wmic process*")
| eval analyst_tools=if(like(CommandLine, "%wireshark%") OR
    like(CommandLine, "%procmon%") OR like(CommandLine, "%x64dbg%") OR
    like(CommandLine, "%ollydbg%") OR like(CommandLine, "%fiddler%"), "yes", "no")
| where analyst_tools="yes"
| table _time, Computer, User, ParentImage, CommandLine

Suspicious Sleep/Delay Behavior Before Payload Execution — Identifies processes that execute extended sleep commands followed by suspicious activity, suggesting time-based evasion:

index=sysmon EventCode=1
| where (CommandLine="*Start-Sleep*" OR CommandLine="*timeout*"
    OR CommandLine="*ping -n*127.0.0.1*")
| stats count by ParentImage, Computer, User
| where count >= 2

Sandbox Hardening Strategies

Because T1497 specifically targets analysis environments, improving the realism of sandboxes is as important as endpoint detection:

Hardening AreaImplementation
Hardware profilesConfigure sandbox VMs with realistic specs: 4+ CPU cores, 8+ GB RAM, 100+ GB disk. Remove default VM names ("sandbox," "analysis," "malware")
VM artifact removalRemove or mask VM-specific registry keys, driver names, and BIOS strings. Use "stealth" VM configurations that eliminate vendor-identifiable markers
User activity simulationImplement realistic mouse movement patterns (with natural acceleration curves, not linear paths), keyboard input, and application usage during analysis. Populate the sandbox with browser history, recent documents, and installed applications
Time manipulation countermeasuresAllow genuine sleep calls to execute rather than fast-forwarding, or implement multi-source time consistency to prevent detection of clock manipulation
Extended analysis windowsRun samples for 15-30 minutes rather than the typical 2-5 minute window. Many evasion techniques rely on outlasting short analysis periods
Bare-metal analysisFor high-priority samples, use physical hardware analysis environments that have no virtualization artifacts to detect

Known Threat Actors and Malware Using T1497

Actor / MalwareContext
NOBELIUM / Cozy BearGoldMax, Sibot, and other SolarWinds-related tools with multi-layer environment fingerprinting
APT28 / Fancy BearSandbox evasion in Sofacy and Zebrocy implants
APT41DUSTPAN loader with sandbox detection before deploying Cobalt Strike beacons
DarkhotelJust-in-time decryption of strings triggered only outside sandbox environments
GamaredonSystem checks in malware targeting Ukrainian government entities
LummaC2Trigonometric mouse movement analysis as human detection gate before credential theft
BlitzCPU core count, screen resolution, driver string, and CPU timing analysis as multi-layer gate
BumblebeeVM detection and SleepEx() evasion in initial access loader operations
EgregorRuntime key requirement prevents sandbox detonation without operator-supplied decryption key
RedLine StealerEnvironment profiling before credential harvesting to avoid exposing capabilities in analysis
Agent TeslaAnti-sandbox and anti-virtualization checks before keylogging and credential theft
FormBook / XLoaderEncryption-based evasion combined with VM detection across Windows and macOS

Defensive Recommendations

sandbox limitation

If your security pipeline depends primarily on sandbox detonation to classify files, one in five modern malware samples will pass through undetected. Sandbox analysis must be supplemented with static analysis, behavioral monitoring on endpoints, and defense-in-depth controls that do not rely on triggering malware execution.

  1. Harden sandbox environments against fingerprinting: Configure analysis VMs with realistic hardware profiles (4+ cores, 8+ GB RAM, 100+ GB disk), remove VM vendor artifacts from registry and BIOS, implement realistic user activity simulation with natural mouse movement patterns, and populate the environment with browser history, documents, and installed applications. The goal is to make the sandbox indistinguishable from a real workstation.
  2. Extend sandbox analysis windows: Increase the default analysis duration from the typical 2-5 minutes to 15-30 minutes for suspicious samples. Time-based evasion relies on outlasting the observation period. For high-priority samples, consider manual analysis or bare-metal execution environments.
  3. Implement multi-stage detection: Do not rely on sandbox detonation as a single point of analysis. Combine dynamic analysis with static analysis (binary entropy, import table inspection, string analysis), heuristic signatures for known evasion patterns, and machine learning classifiers trained on evasion-aware malware families.
  4. Monitor for environmental profiling on endpoints: Deploy Sysmon rules and EDR detections for WMI queries targeting hardware profiles, registry reads of VM-specific keys, process enumeration looking for analysis tools, and unusual patterns of system discovery commands followed by sleep/delay behavior.
  5. Deploy forced execution and API manipulation: Use sandbox technologies that can force execution past sleep calls, intercept and modify environment queries to return realistic responses, and hook API calls that malware uses for VM detection. These "anti-anti-sandbox" techniques create an arms race, but they raise the cost for attackers.
  6. Layer endpoint behavioral analysis: EDR with behavioral detection provides a second chance to catch malware that evades sandbox analysis. Even if a sample passes through the sandbox clean, behavioral monitoring on the endpoint can detect the actual malicious activity when it finally executes on a real system.
  7. Track the evasion techniques as threat intelligence: Catalog the specific environment checks used by malware families your organization encounters. This allows sandbox engineers to proactively harden against the exact techniques being deployed against your analysis infrastructure.
  8. Use bare-metal analysis for high-value samples: When investigating targeted attacks or samples that fail to detonate in virtualized sandboxes, execute them on physical hardware with no hypervisor. This eliminates every virtualization artifact and timing discrepancy that malware can detect, though it requires more resources and careful isolation.

MITRE ATT&CK Mapping

FieldValue
Technique IDT1497
Technique NameVirtualization/Sandbox Evasion
TacticsDefense Evasion, Discovery
PlatformsWindows, Linux, macOS
Sub-TechniquesT1497.001 System Checks, T1497.002 User Activity Based Checks, T1497.003 Time Based Checks
Data SourcesProcess (OS API Execution, Process Creation), Command (Command Execution)
MITRE Referenceattack.mitre.org/techniques/T1497

Sources and References

— end of briefing