VirusTotal-compatible API

VerdictStack
Blog

Reference

What is a malware sandbox? How sandboxing works, and when you need one

Nov 30, 2026 4 min read

A malware sandbox opens a suspicious file or link in a throwaway machine and records what it does. How it works, what it catches that a lookup misses, how malware tries to dodge it, and when a team actually needs one.

A malware sandbox is an isolated, disposable computer where you open a file or a link you don't trust, then watch what it does. If a Word document starts PowerShell, or a PDF reaches out to a server registered three days ago, you see it happen in the sandbox instead of on someone's laptop. When the run ends, the machine is thrown away.

The word gets used loosely. Developers say “sandbox” for a test environment, and browsers sandbox every tab. In security, a malware sandbox specifically means detonating something suspicious on purpose and recording its behaviour.

What a sandbox records

A sandbox run usually captures:

  • Processes. Did the document launch powershell.exe, cmd.exe or a script host?
  • Network activity. Which domains and IP addresses it contacted, and what it tried to download.
  • Files and settings. What it wrote to disk, and whether it tried to make itself start again after a reboot.
  • What a person would see. Screenshots of the document or page, including a fake login form if one appears.

From that record, an analyst (or software) decides whether the item is malicious and pulls out the indicators worth blocking: the domains, IP addresses and file hashes involved.

Why a lookup isn't enough

Most checks start with reputation: has anyone seen this file hash, domain or URL before, and was it bad? That works well for known threats and settles most traffic quickly.

It fails on anything new. A phishing kit can generate a slightly different document for every recipient, so each one has a hash nobody has seen. A domain registered this morning has no history yet. A reputation lookup on either comes back empty, and empty is not the same as safe. A sandbox doesn't need history: it judges the item by what it does.

What a sandbox catches that static checks miss

Static analysis reads a file without running it: its real type, whether it contains macros, whether a PDF has embedded scripts. It is fast and catches a lot. Some attacks only show themselves when they run:

  • A macro that looks harmless until it downloads a second file from the internet.
  • An HTML attachment that assembles a malicious file inside the browser, known as HTML smuggling.
  • A link that redirects three times before landing on a copy of a Microsoft 365 login page.
  • An archive protected by a password written in the email body, so scanners can't open it on their own.

How malware tries to dodge a sandbox

Attackers know about sandboxes and design around them. Common tricks:

  • Waiting. Sleeping for several minutes, longer than many sandboxes run.
  • Needing a click. Doing nothing until someone presses “Enable content” or scrolls a page.
  • Checking the machine. Looking for signs of a virtual machine, or for a machine with no files, no browser history and no recent activity.
  • Checking the location. Only serving the malicious page to visitors from a certain country.

This is why a useful sandbox has to behave like a real person: open the document, click the button, follow the link, type credentials into the login form (fake ones), and look like an ordinary computer while it does.

Public and private sandboxes

Several free online sandboxes exist, and they are useful for samples that are already public. The catch is in their terms: on most free plans, whatever you submit becomes visible to other users, and the report stays public. That's fine for a malware sample from a threat feed. It is not fine for a customer's invoice, a contract, or an internal email someone reported.

Before sending real business files to any sandbox, check whether submissions are private on the plan you're using, how long they're kept, and where they're stored.

When you need one, and when you don't

You probably need sandbox analysis if you regularly handle:

  • Attachments that your email filter let through but couldn't confidently judge.
  • Phishing emails reported by employees, especially ones with documents or links.
  • Incident response, where you need to know exactly what a file did.

You don't need one for every file. Known-bad hashes, executables arriving by email, and documents with obvious red flags can be stopped earlier and more cheaply. A sensible setup checks reputation and static signs first, and only sends what's still unknown to the sandbox. You can try the first part on our free file virus scanner, which runs entirely in your browser.

Check a suspicious file in your browser. Nothing is uploaded.

Check a file for free

Related free tool: File virus scanner

FAQ

Questions about this topic

Related

Recent articles