Securitylab•October 7, 2026•🇷🇺Translated from Russian

How Malware Evades Sandboxes: Detection Techniques and Defense Strategies

Sandboxes have long moved beyond rare laboratory tools. Documents, archives, installers, and links arrive daily through email, websites, messengers, and cloud storage, often bypassing traditional defenses. An antivirus may not recognize a new sample. A mail filter can let through a file without obvious attack indicators. A firewall sees connections but does not always understand what an opened document is doing inside a workstation.

A sandbox solves the problem differently. It executes the suspicious file in an isolated environment and monitors behavior and system changes. Defenders receive a verdict and a detailed report at the end of the analysis.

In many cases the malware does not directly break the sandbox. Instead it tries to determine whether it is running on a real computer or in an analysis environment. If the program detects signs of inspection, the malicious payload may stay dormant or display only legitimate behavior.

How a Sandbox Analyzes a Suspicious File

A sandbox does more than simply launch a file. It combines several analysis types, each revealing different aspects of the threat. First it may check the file against known indicators such as checksums, signatures, and database matches. Modified or previously unknown programs can still slip past signature detection.

Static analysis follows. Without executing the file, the sandbox examines its structure and strings. This method helps locate threats quickly but may miss logic hidden until runtime.

Dynamic analysis executes the file in a controlled environment and tracks system changes. Code analysis reveals not only the file itself but also the consequences of execution.

Behavioral analysis correlates individual events into a coherent scenario. Creating a file in a temporary folder alone does not always indicate an attack. When the same process also launches a script and attempts to disable protection, the intent becomes clear.

Can Malware Evade a Sandbox?

Yes, malware can evade sandboxes. The approach usually involves evasion rather than direct compromise of the protective solution. The malware inspects its surroundings and decides whether to reveal real activity. If it detects a virtual machine, analysis tools, or an overly clean system, the main malicious component may remain inactive.

MITRE ATT&CK classifies this behavior as technique T1497. MITRE divides the methods into system checks, user activity checks, and timing checks. For defenders, attempts to recognize the sandbox themselves become suspicious behavior.

Recent data confirm the problem’s relevance. The Picus Red Report 2026 placed technique T1497 back in the top five most common techniques, reaching fourth place after two years outside the top ten. The return signals attackers shifting toward greater stealth and deliberate analysis evasion.

Evasion can appear simple. The file launches, performs no noticeable actions, and exits. Or it waits several minutes until automated inspection ends. Or it displays decoy activity such as opening a normal window without touching the system. The sandbox report shows an almost clean sample, yet on an employee’s real workstation the malware could have downloaded additional modules, stolen data, or started encryption.

How Malware Detects Virtual Environments

A sandbox must resemble an ordinary computer. The more the analysis environment differs from a real workstation, the easier it is for malware to recognize inspection. Authors of malicious programs examine many small details: device names, system parameters, virtualization traces, network indicators, and even user habits.

Checking files, directories, and the registry

Virtual machines and analyzers leave traces. The system may contain drivers, services, directories, and registry keys linked to VMware, VirtualBox, Hyper-V, QEMU, and other environments. For defenders these elements are normal. For malware they serve as warning signals.

The malware searches for characteristic names in services, checks driver paths, inspects registry branches, and compares found strings against known indicator lists. Too many matches cause the program to stop activity or postpone the main payload. This technique works especially well against typical, poorly masked virtual machines.

Checking system parameters

A real workstation rarely looks empty. An employee usually has documents, browser history, installed programs, cache, bookmarks, multiple windows, printers, messengers, and traces of normal work. An analysis environment is often minimal: little RAM, one or two CPU cores, a small disk, standard screen resolution, a fresh user profile, and an almost empty desktop.

The malware compares these signs against the expected image of a real computer. Small disk size, absence of user files, template computer name, suspicious account names such as “test” or “sandbox,” and short system uptime can reveal the analysis environment. One sign rarely decides everything, but a combination helps the malware reach a decision.

A recent example is Blitz, described by Unit 42 in 2025. The malware checked the number of processors, low screen resolutions, the ANY.RUN driver, and known registry keys associated with sandboxes and virtual machines. If the environment matched an analysis setup, the program terminated.

Checking hardware signatures

A virtual machine often emulates hardware but does not always look like a physical computer. Malware can inspect BIOS information, disk manufacturer, network adapter identifier, processor data, presence of audio devices, video card parameters, and other details. If the hardware appears too artificial, the program hides its real logic.

Absence of an audio device or a low number of connected devices can look suspicious for a workstation. Malware uses such details to determine whether it faces a real computer or a laboratory construct.

Checking the network

Malware examines network information. If the address belongs to research infrastructure, a security vendor, or a known analysis center, the program may avoid contacting its command-and-control server.

Sometimes the decision is made not by the file itself but by the attackers’ remote infrastructure. The first module sends system information, and the server decides whether to deliver the next stage. If the environment resembles a sandbox, the server returns an empty response, a benign file, or no reply at all. Defenders see only the outer shell while the real payload stays with the attackers.

Why Timing Helps Malware Hide

Automated analysis cannot run indefinitely. A sandbox must process many files without delaying email or web traffic for hours. Many environments therefore observe a sample for a limited time. Malware authors exploit this limitation by adding delays before dangerous actions.

The simplest method is “sleep.” The program launches and waits longer than a standard analysis lasts. More sophisticated samples check system time, uptime, date, day of the week, sandbox reaction to accelerated clocks, and behavior after reboot. If the environment tries to fast-forward time artificially, malware can notice discrepancies between different time sources.

A good example is GootLoader. The malware actively uses long pauses before dangerous actions, and the limited computing resources of sandboxes make prolonged analysis of many samples difficult.

Timing logic also helps in link-based attacks. On weekends a link may lead to a harmless page, while on Monday, when an employee opens the email, the address serves malicious content. The sandbox inspected the link earlier and saw no threat because the dangerous content was not yet being delivered.

How Malware Checks for a Live User

An automated environment often fails to imitate a human. Malware can check whether the mouse moved, whether clicks occurred, whether the user scrolled a document, opened browser tabs, closed windows, or interacted with buttons. If no activity is detected, the program concludes the file was opened by a machine rather than an employee.

Modern samples analyze not only the fact of activity but also its character. Some versions of LummaC2, starting with v4.0, checked cursor movement using trigonometry: the program calculated angles between mouse movement directions and looked for overly straight, sharp, or artificial movements. If the behavior appeared robotic, the malware did not reveal its main activity.

For documents the check can be especially subtle. A malicious document waits for scrolling, page navigation, closing of warnings, or clicking interface elements. Attackers sometimes add images, tables, or long pages to distinguish human reading from automatic file opening.

Buttons may also be hidden, invisible, or reduced to tiny size. A human will not click them, while an automated script that clicks every element reveals itself.

Why a Sandbox Can Produce Errors

False results often stem from successful evasion. A “no threats found” verdict only means that dangerous behavior did not appear under the given conditions. The file may simply not have received a command from its server or may be waiting for user action.

Weak points also arise from configuration. If the sandbox sits out-of-band and receives file copies after delivery, malware can reach the user before results arrive. If encrypted web traffic is not inspected, some downloads remain invisible. If the analysis environment is always identical, malware authors can accumulate indicators and evade that specific configuration.

NIST guidance on preventing and handling malware incidents emphasizes that fighting malicious code requires combining prevention, detection, response, and recovery rather than relying on a single control. The NIST approach aligns well with sandbox practice: dynamic analysis must work together with endpoint protection, mail filtering, event logging, and network control.

How to Defend Against Sandbox Evasion

The first rule is not to rely on a single analysis method. A sandbox should combine signature checking, static analysis, dynamic execution, network monitoring, and behavioral evaluation. If a file performs no malicious actions yet actively searches for virtual-machine indicators, debugging tools, analyzers, or an empty user profile, that behavior itself deserves attention.

The second rule is to make the analysis environment resemble a real workplace. Profiles should contain documents, action history, installed programs, varied hardware parameters, realistic network settings, and plausible user-interaction scenarios. Realistic digital clutter such as browser cache, recent documents, bookmarks, varied screen resolutions, multiple accounts, and traces of normal work is also important. Diversity of configurations reduces the chance that malware will recognize all company sandboxes by one set of indicators.

The third rule is to inspect suspicious objects before delivery to users. For mail and web traffic a sandbox is especially useful when placed inline rather than analyzing copies after the fact. Encrypted traffic must be inspected where permitted by law, internal policy, and technical architecture. Without such inspection a significant portion of downloads remains in a blind spot.

The fourth rule is to connect the sandbox with other security tools. Reports must feed into incident response systems, endpoint protection, mail gateways, logging platforms, and network rules. When a sandbox detects suspicious behavior, the organization must quickly block similar files, addresses, domains, and processes on other nodes.

How to Choose and Deploy a Sandbox

When selecting a sandbox, organizations should look beyond attractive interfaces and marketing claims. It is more important to understand where the solution sits in the file-delivery chain, how many object types it supports, how quickly it delivers verdicts, how detailed its behavioral explanations are, and whether it handles modern anti-analysis techniques.

Integrations are critical. The sandbox must receive files from mail, web traffic, network storage, and endpoint protection tools, and analysis results must automatically flow to places where threats can be blocked. Separate checks should verify support for archives, office documents, scripts, executables, and links.

Two main deployment models exist: on-premises infrastructure and service-based models. On-premises gives more control but requires hardware, configuration, updates, and specialists. A service model reduces internal-team load but requires careful review of contracts, data storage, file-transfer channels, and confidentiality requirements.

During integration companies often make mistakes by treating the sandbox as a magic filter. While it reduces risk, updates and endpoint protection must not be neglected. Another mistake is focusing only on the final verdict. Analysts need details: which checks were performed, which processes contacted which addresses, and what actions occurred.

A third mistake is failing to update configurations. If a sandbox runs files for years in the same virtual machine with an empty profile, malware quickly learns to recognize that environment. Profiles must change, user-activity scenarios must grow more complex, and analysis time for questionable objects must increase.

Questions and Answers

  • Does a sandbox guarantee detection of any malicious file? No. A sandbox significantly raises the probability of detection but provides no 100 percent guarantee. Modern malware can recognize the analysis environment or receive commands from a remote server only after additional checks.
  • How does sandbox evasion differ from breaking the sandbox? In most cases malware does not attack the sandbox itself. The program tries to determine whether it is running in an analysis environment and hides its activity. This is evasion. Breaking the sandbox occurs far less often and requires separate vulnerability-exploitation techniques.
  • What indicators reveal a virtual environment? The most common indicators are traces of VMware, VirtualBox, and other virtualization systems, low RAM, few CPU cores, an empty user profile, absence of documents and browser history, and suspicious network parameters and addresses.
  • Why does malware check user actions? An automated analysis environment differs from real human behavior. Malware can therefore check window handling. Some families even analyze cursor-movement patterns to distinguish a human from a script.
  • How can organizations improve sandbox effectiveness against modern threats? The best approach combines multiple analysis methods and configurations and integrates the sandbox with other security tools. It is also important to analyze not only malicious actions but also attempts to evade the inspection environment itself.

Conclusion

Malware can indeed evade sandboxes. The core idea of evasion is to recognize the analysis environment and avoid showing real activity. A sandbox remains a powerful tool when used correctly. Defenders must remember that a clean sandbox report does not always mean the file is safe. Reliable protection is built not on a single verdict but on combined analysis and rapid response.

Related articles

BoletimSec•Malware & Botnets

Brute-Force Campaign Targets Exposed Microsoft SQL Server Instances with Monero Miner and Gh0st RAT

An active campaign since early October 2026 is brute-forcing passwords on internet-exposed Microsoft SQL Server instances and deploying a Monero cryptocurrency miner along with a variant of the Gh0st RAT remote access trojan. Fortinet detailed the infection chain in a report published on November 12, 2026, starting with the Go-based dllhost.exe binary that uses the Naabu port scanner to locate open TCP port 1433. The malware then downloads dwm.exe, a .NET brute-forcer that tests over 2,700 passwords against common accounts such as sa and admin using up to 500 concurrent threads. Successful logins enable xp_cmdshell to execute commands, after which the attackers drop a scheduled task mimicking Microsoft updates and install both the miner and the persistent RAT. The campaign relies solely on weak or reused passwords and does not exploit any software vulnerability. Fortinet rates the threat as high and recommends keeping SQL Server behind firewalls or VPNs while disabling xp_cmdshell when unused.

Habr•Malware & Botnets

Fake GTA VI Installer Distributed via Google Colab Steals Steam Credentials and Crypto Wallet Data

Researchers at cybersecurity firm Cynet have uncovered a fake Grand Theft Auto VI installer for PC that targets Steam accounts and cryptocurrency wallets. The malware is promoted through a Google Colab notebook that leads users to a fraudulent WooCommerce store page called Windows Software Hub. The download archive contains only a small 796 KB executable and a README file instructing victims to run the file as administrator and disable security features. Once executed, the malware bypasses sandboxes and virtual machines, injects code into browser processes, and harvests passwords, cookies, browsing data, and crypto wallet information while also swapping clipboard addresses. The campaign coincides with growing scam activity around the unreleased title, which Rockstar Games has not yet scheduled for PC release. Earlier reports from Netcraft documented multiple GTA VI-related fraud schemes between July and October 2026.

BoletimSec•Malware & Botnets

Cloudflare Blocks 18.2 Million DDoS Attacks in Q3 2026 Amid Shifting Attack Patterns

Cloudflare reported blocking 18.2 million network-layer DDoS attacks between July and September 2026, marking a 208% increase from the same period in 2025. The company recorded an average of roughly 8,200 attacks per hour, with 96% lasting under ten minutes and 98% staying below 1 Gbps. Large-scale attacks exceeding 1 Tbps dropped sharply from 805 in Q2 to 251 in Q3, a decline Cloudflare links to early 2026 law enforcement actions against four IoT botnets. Attack vectors shifted notably, with CLDAP reflection falling 99.5% while DNS amplification rose 215% and UDP floods grew 122%. The United States led targeted countries, followed by China and Indonesia, while media and publishing remained the most affected industry. Mirai variants accounted for 46.5% of network-layer bytes, with new families such as Dysphoria and Evooo1Bot emerging to replace dismantled botnets.

Habr•Malware & Botnets

Freshko: Open-Source Rust Tool Offers Local File and URL Scanning Without Data Upload

A developer has released Freshko, a compact 400x640 pixel desktop application built in Rust that performs quick local checks on files, folders, and URLs without sending data to external services. The tool uses YARA-X rules for file scanning, follows up to eight redirects while querying Cloudflare's filtering DNS, and scores processes for potential cryptocurrency miners based on names, arguments, and launch paths. It explicitly avoids acting as a full antivirus solution, instead providing transparent results that list any skipped items or incomplete checks. Freshko runs on macOS and Windows, keeps all scan results in memory only, and disables system proxies during URL checks to prevent DNS rebinding attacks. The project includes performance benchmarks on Apple Silicon and addresses common pitfalls such as high CPU usage false positives and incomplete disk scans. Unlike VirusTotal or Cloudflare URL Scanner, Freshko performs all file analysis locally and never makes scan reports public.