Lesson 4 of 12 · 22m
Sandboxes: Useful Liars
What a sandbox verdict really means, when uploading a sample is a leak, how to make samples actually detonate, and the evasion tricks that produce clean reports for dirty files.
A sandbox report is a witness statement, not a verdict. "No malicious activity observed" means nothing we recognized happened in the 120 seconds we watched, in this VM, with this configuration. I once signed off on a loader that came back clean from two sandboxes. It slept for ten minutes in a loop of short NtDelayExecution calls — too fragmented for the sandbox's sleep-skipping to collapse into one. EDR caught it on 40 hosts the next morning. Static triage had shown the VM checks; I trusted a green badge over my own notes. Don't repeat that.
The wrong mental model: clean means benign
A clean report proves exactly one thing: in that environment, that sample didn't trigger a signature. The failure modes are asymmetric — a false negative is invisible (nothing happened to see), while a false positive at least leaves evidence. Commodity loaders are built around this: they check for analysis conditions first and ExitProcess cleanly if they find them. To the sandbox, that graceful exit looks identical to a benign file doing nothing. The correct classification for "clean + suspicious static" is inconclusive, and the word belongs in your report.
Public vs private: uploading is publishing
Uploading to VirusTotal or a public sandbox shares the file with every subscriber — and actors watch those services for their own hashes. Targeted samples routinely contain the victim's email address, internal hostnames, or a phishing kit with stolen credentials baked in. The rule:
- Hash lookup first. Already public? You've lost nothing.
- Unknown and targeted? Private sandbox only — self-hosted CAPE, or a commercial sandbox in private mode (Any.Run and Triage both offer it).
- Public upload only with the IR lead's sign-off, after the client knows it's happening.
Getting it to actually run
Half of "clean" reports are samples that never executed in the first place:
- DLLs:
DllMainoften does nothing interesting. List the exports, then call the one that matters —DllRegisterServerandServiceMainare the classics. - Scripts:
.js/.vbsrun underwscript.exe;.htaundermshta.exe. - Documents: macros need Office installed and the Enable Content click the lure asked for.
- Containers: ISO/IMG/ZIP deliveries hide an
.lnkthat launches the real payload — detonate the shortcut, not the container.
# CAPE: run a DLL's export with a longer timeout
python3 utils/submit.py --package dll --options "function=DllRegisterServer" --timeout 300 9e1c4f.dllC:\> rundll32.exe C:\Users\Public\9e1c4f.dll,DllRegisterServerThe evasion checklist
What commodity loaders check before doing anything interesting:
if (GetTickCount64() < 10 * 60 * 1000) ExitProcess(0); // uptime < 10 min: fresh sandbox VM
if (si.dwNumberOfProcessors < 2) ExitProcess(0); // 1 vCPU: cheap analysis VM
if (ms.ullTotalPhys < (4ULL << 30)) ExitProcess(0); // < 4 GB RAM
if (mac_prefix_is(0x08, 0x00, 0x27)) ExitProcess(0); // VirtualBox OUI
if (recent_docs_count() < 10) ExitProcess(0); // nobody actually uses this machine
if (keyboard_layout_is_cis()) ExitProcess(0); // geofence: don't detonate at homeCountermeasures: realistic VMs (4 vCPUs, 8 GB RAM, a lived-in profile with browser history, recent documents, and uptime), changed MAC prefixes and SMBIOS strings, human-interaction emulation, longer timeouts, and running the same sample under two or three configurations. Sandboxes fight back with sleep-skipping and API-hammering — which is why fragmented sleeps like my ten-minute loader still work.
Reading the report in the right order
Process tree → dropped files → network (DNS names, HTTP paths) → memory dumps and extracted configs → then signatures. Signatures are heuristics; "queries computer name" fires on every installer ever built. The tree and the drops are what happened.
Field notes
- Record the environment in your report — OS build, timeout, network mode. IR needs to know whether "no C2 seen" means "no C2" or "INetSim answered."
- Behind INetSim, every resolved IP is the sinkhole. Never paste sandbox-resolved IPs into an IOC list.
- If the sample checks for a debugger or VM, that check is itself a reportable behavior — it tells you the family cares about your existence.
- Same sample, two configs, different behavior: that delta is often more informative than either run alone.
Was this lesson helpful?
Keep reading
Related articles from the SudoSecurity blog.
A Fake GTA 6 ISO Didn’t Install a Game. It Installed a Wiper.
A fake GTA 6 ISO used a believable installer error to cover remote-access malware, browser-data theft, and destructive file wiping. The “License not found” message wasn’t the crack failing. It was there so the victim would stop looking.
CVE-2025-62718: Critical Axios SSRF Vulnerability Explained
A critical SSRF flaw in Axios was used in a North Korean supply chain attack. Here's what it does and how to patch it today.
A Minecraft Mod Is a Program. In 2026, Attackers Started Acting Like It.
A Minecraft mod is a Java program that runs with your account's full permissions, and nothing in the game checks what it does.
Hacktivism, 2021 to Today: From Steel Mills to Power Grids
Part 1 ended on a 70-gigabyte breach in 2021. Since then, hacktivists derailed trains, dumped molten steel on camera, and reached grids in three countries.