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

AntiMalware•Malware & Botnets

uCreator Spyware Infiltrates Modified Telegram, WeChat and GCash Builds on Android

Security researcher Ovi has published a detailed analysis of uCreator, also known as YingGai, a commercial Android spyware platform designed for surveillance and remote app control. The malware intercepts messages, verification codes and account data directly inside legitimate applications without requiring root privileges. Infection vectors include tampered Telegram, WeChat and GCash APKs distributed through unofficial sources, as well as the Onion Box container that launches the target app inside a controlled environment. Once active, uCreator hooks into the host process, reads Telegram’s local message database through client interfaces, captures two-factor authentication passwords and hides its own session from the user. The operation is supported by cloud-based command panels and exposed GitLab repositories that revealed server-side code and development history. Compatibility problems have been noted on Android 17, and the total number of victims remains unknown.

Habr•Malware & Botnets

Researchers Deploy Cowrie Honeypot Disguised as NVIDIA H100 Server to Study SSH Botnet Tactics

A cybersecurity team set up a realistic Cowrie honeypot on a fake server equipped with four NVIDIA H100 GPUs, 128 AMD EPYC cores, and terabytes of storage to observe what SSH brute-force bots actually do after gaining access. The trap used a custom StickyAuth module that allowed entry only after several failed attempts and locked in the successful credential pair per IP address. Over the first 12.5 hours the system recorded 1,846 connections from 126 unique IPs, 175 successful logins, and 1,524 commands executed, with the majority of activity traced to a single botnet linked to the Outlaw group. The attackers deployed SSH keys signed mdrfckr, changed the root password, killed competing processes, installed cron jobs, and downloaded a mining archive called dota3 containing an IRC backdoor and its own SSH scanner. The researchers also identified three realism issues in the base Cowrie setup—limited grep flags, outdated filesystem paths in Debian 12, and inconsistent hostname reporting—and patched them to keep sophisticated bots engaged longer. An auxiliary LLM service later summarized each session in Telegram for easier analysis.

BoletimSec•Malware & Botnets

Hirudo Android Banking Trojan Uninstalls Legitimate Bank Apps and Installs Attacker-Controlled Fakes

Researchers at ThreatFabric have detailed Hirudo, a sophisticated Android banking trojan that also serves as a remote access tool and replaces genuine bank applications with attacker-controlled copies. The malware spreads through decoy apps themed around shopping, adult video, and short series, including Shopora, 1V1 X, ZoyaTV, and KoiShort. Once installed, it uses accessibility services to detect target banking apps, verify their signatures, display a fake update prompt, and force uninstallation of the real application before installing a malicious replica signed with a publicly known test key. The trojan employs components from the open-source YAHFA and Dobby projects to intercept signature checks, hide accessibility services, bypass screenshot restrictions, and forward Play Integrity attestations to the attacker’s server. Eight ready-made replicas target seven Indonesian banks, while credential theft focuses on users in China, India, Mexico, Morocco, and Thailand. Server logs collected in August 2026 contained thousands of credentials, device data, and financial profiles, with the attestation key set confirmed as publicly leaked and partially revoked by Google.

AntiMalware•Malware & Botnets

Over 300 Tor Exit Nodes Hijacked to Intercept SSH Passwords and Deploy Ebury Backdoor

Attackers compromised hundreds of Tor exit nodes and repurposed them to perform man-in-the-middle attacks against SSH connections. Instead of reaching the intended server, users were redirected to attacker-controlled infrastructure where they could be tricked into accepting a forged host key and revealing their credentials. Researcher kaba identified 333 malicious exit nodes routing traffic through the same 12 interception servers after noticing an unexpected host-key warning on October 2. The campaign also attempted to install the Ebury Linux backdoor designed to steal authentication data. The Tor Project confirmed that operators' servers had their configurations altered and some middle relays were converted into exit nodes. The initial access vector remains unknown, but the activity window was limited to October 1-5. Users who connected via Tor during this period, accepted an unfamiliar key, and entered a password should treat their credentials as compromised.