Module 3 · Dynamic Malware Analysis & Sandboxing

Manish Garg
Manish Garg Associate of (ISC)² · RingSafe
May 14, 2026
4 min read
Read as
100% Free

No signup. No paywall. No catch. One of our 10 most-requested practitioner modules — published in full so anyone can learn for free. We earn through consulting, not by gating knowledge.

See all 10 free modules →

Why this module exists. Dynamic analysis — executing the sample in a controlled environment and observing behaviour — surfaces evidence that static analysis cannot: actual network destinations, dropped files, registry changes, process trees. This module covers the sandbox landscape (Cuckoo, ANY.RUN, Joe Sandbox, in-house with Velociraptor) and how to read sandbox reports without being fooled by sandbox-evasion logic.

Why this module exists. Sandboxes are not magic — sophisticated malware checks for them and either does nothing or does something different. Reading a sandbox report intelligently means knowing what the malware probably hid, not just what it did.

The sandbox landscape

Tool Type When to use
ANY.RUN Interactive cloud First pass; you can click through prompts in real time
Joe Sandbox / Hybrid Analysis Automated cloud Comprehensive automated reports
CAPE / Cuckoo Self-hosted Sensitive samples, customised environment
VMware / VirtualBox + Procmon + Wireshark Bare-metal manual Last resort for evasion-aware samples

The standard report structure

Every sandbox report has the same four sections (often labelled differently):

  1. Process tree — what the sample spawned, with parent-child relationships. A normal PDF reader does not spawn powershell.exe; lineage is the signal.
  2. File operations — created, modified, deleted files. Dropped files are the second-stage candidates.
  3. Registry operations — Run keys, services, COM hijacks. Persistence mechanisms surface here.
  4. Network operations — DNS queries, HTTP/S connections, raw TCP. C2 infrastructure is in this section.

Read in this order. Process tree first — it gives you the story. Network operations second — it gives you the infrastructure for blocking. File and registry afterward, for the detection-engineering follow-up.

The TTPs to extract — MITRE ATT&CK style

From the report, extract the techniques observed. A practical mapping:

  • Initial execution: T1059.001 PowerShell, T1059.003 cmd.exe, T1218 signed binary proxy.
  • Persistence: T1547.001 Run keys, T1543.003 Windows Service, T1053.005 scheduled task.
  • Privilege escalation: T1134 token manipulation, T1055 process injection.
  • Defence evasion: T1027 obfuscated files, T1036 masquerading.
  • Credential access: T1003 OS credential dumping (LSASS access events).
  • Command and control: T1071.001 web protocols, T1573 encrypted channel.

The TTP list becomes your detection-engineering input — each technique maps to one or more Sigma rules you can deploy in your SIEM.

Sandbox evasion — what the report does NOT show

Modern malware checks for sandbox indicators and refuses to execute meaningfully. Common checks:

  • VM artefacts. VMware Tools registry keys, BIOS strings containing “VBOX” or “VMware”, MAC address prefixes of virtualisation vendors.
  • System uptime. Real machines have hours/days of uptime; sandboxes have minutes.
  • Mouse / keyboard activity. Sandboxes do not generate user input. Recent samples check for at least N mouse movements.
  • CPU count and RAM. Sandbox typically has 2 CPU / 2GB; real laptops have 8 CPU / 16GB.
  • Username. Usernames like “SANDBOX”, “TEST”, “MALWARE”, “VIRUS” are flagged. So are some common automated names like “user”.
  • Sleep loops. The sample sleeps for 5 minutes before doing anything; many sandboxes time out at 2 minutes.

The signal is the absence of behaviour. A binary that imports network functions and process-injection APIs but the sandbox shows no network calls and no process injection is probably running evasion logic. Re-run with a more realistic sandbox profile.

Building a more realistic sandbox

For samples that evade public sandboxes, an in-house sandbox with realistic profile is the next step:

  • Use a hardened Windows 11 VM with realistic uptime (snapshot a “warmed” machine), realistic CPU/RAM, generated mouse movement via a script, browser history, installed apps (Adobe Reader, Office, Chrome).
  • Hide VM artefacts: use VirtualBox with VBoxManage setextradata to alter DMI strings, or use KVM with overridden CPUID.
  • Pre-populate Documents folder with a few real-looking files.

The bar is to look enough like a real workstation that evasion logic concludes it is real. Public sandboxes invest in this; in-house can match for high-stakes samples.

Network capture — Wireshark in parallel

Always capture full PCAP during a sandbox run. The PCAP gives you what the sample-summary report compresses into “made HTTP request to X” — you see the full request, the user-agent, the URL paths, the response. The URL paths often encode infection-ID, beacon parameters, or staged commands. Worth keeping for offline analysis.

Key takeaways

  • Sandbox landscape: ANY.RUN interactive, Joe / Hybrid automated, CAPE / Cuckoo self-hosted, manual VM as last resort.
  • Report structure: process tree → network → files → registry. Read in this order.
  • Extract MITRE ATT&CK TTPs for detection-engineering follow-up.
  • Sandbox evasion: absence of expected behaviour is the signal; re-run with a more realistic profile.
  • Always capture full PCAP; sandbox summaries lose information.
Worried about your exposure?

Get a free attack-surface review

We check what an attacker would see about your business — leaked credentials, exposed services, dark-web mentions. 30 minutes, no obligation.

Book exposure review Replies in 4 working hrs · India-only · Senior consultants