Skip to content
Tutorials Center
My learning

Topics

Lesson 19 of 37 ยท Dynamic Analysis

Sandbox Reports and Automation

Learn what automated malware sandboxes do, how to read their JSON and HTML reports, extract indicators and ATT&CK techniques, and why sandbox verdicts need human review.

Running every sample by hand does not scale. Security teams receive thousands of suspicious files a day, so they feed them to sandboxes: automated systems that run a file in a disposable virtual machine, record its behaviour and produce a report. You still need to understand what those reports mean, where they mislead and how to pull indicators out of them with a script.

This lesson explains how sandboxes work, how to read a typical report, and how to automate the boring parts. The example reports are invented, but they follow the shape real ones use.

How a sandbox works

flowchart LR
    A["Submit file or URL"] --> B["Static triage: hashes, type, signatures"]
    B --> C["Start clean VM from snapshot"]
    C --> D["Run sample with monitoring and simulated user"]
    D --> E["Collect behaviour, network, dropped files, memory"]
    E --> F["Score and map to ATT&CK"]
    F --> G["Report: JSON, HTML, PCAP, dropped files"]
    G --> H["Destroy VM"]

The same lab principles as before, automated: snapshot, monitor, collect, revert.

Types you will meet:

  • Open-source sandboxes you host yourself (the Cuckoo family and its descendants).
  • Commercial and cloud services that offer web and API submission.
  • Built-in sandboxes in email gateways and endpoint products, which detonate attachments before delivery.
  • Emulators that do not run a full operating system, only simulate API calls: faster but easier to evade.

Remember the safety side: uploading a file to a public cloud sandbox may make the sample and its report visible to others. Never submit confidential documents unless your policy and the service's privacy settings allow it (Handling Samples Safely).

What a report contains

Section Contents What you do with it
Summary and score Verdict, severity score, family guesses Prioritise; do not trust blindly
Static info Hashes, file type, imports, strings, sections Compare with your own triage
Behaviour Process tree, file and registry operations, mutexes Understand actions and persistence
Network DNS, HTTP, hosts contacted, PCAP Extract network indicators
Dropped files Hashes and copies of created files Analyze each one
Signatures Named behaviour matches ("writes autorun key") Quick overview
ATT&CK mapping Techniques observed Reporting and detection gaps
Screenshots The desktop during the run See pop-ups, ransom notes, fake dialogs
Memory / strings Dumps, extracted configs Deeper analysis

A report as data

Most sandboxes export JSON. Below is a compact made-up example. The code walks it and prints the pieces an analyst copies into a case: the score, the process chain, dropped files, network indicators and techniques.

Python Read a sandbox report

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The script defangs every network indicator as it prints, so the output is safe to paste into a ticket. Turning a repeated chore like this into a function is how analysts make their work quick.

Extracting indicators in bulk

When several reports arrive for related samples, merging their indicators shows which are shared (probably the family's infrastructure) and which are unique. The example counts shared domains and mutexes.

Python Compare indicators across reports

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Shared infrastructure and mutex names point to a common family or campaign, a conclusion you could not reach from one report.

Limitations: why sandbox verdicts need review

  • Evasion: malware may detect virtual machines, check for user activity, sleep past the run time, require specific files or locale, or stay quiet if it sees analysis tools. A clean report is not a clean file.
  • Missing triggers: a document may need a click on "Enable content"; a DLL needs the right export called; a program may need command-line arguments.
  • Environment mismatch: a sample targeting a specific software version or country does nothing elsewhere.
  • Time limits: two minutes cannot show a three-day delay.
  • False positives: legitimate installers and admin tools look noisy: writing to startup keys, changing settings.
  • Scores are heuristics: treat "8.5 out of 10" as a ranking, not a finding.

Your job is to read the details, decide what is real, and do manual analysis if the answers are not enough: change the environment, extend the run, supply arguments, or debug.

Automating your own pipeline

Scripts glue the stages together:

  1. Watch an inbox or folder for new samples.
  2. Hash each file and skip those already known.
  3. Identify the type and choose the right analysis route.
  4. Submit to the sandbox through its API and poll until finished.
  5. Download the report and parse it, as in the first example.
  6. Store indicators in a database or threat-intelligence platform.
  7. Open a ticket for samples above a score threshold or with specific signatures.

The sketch below uses a mock sandbox object, so it runs anywhere and shows the control flow without any real submission.

Python A pipeline skeleton with a mock sandbox

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Note the human step: escalation. A pipeline can sort and enrich, but an analyst decides what the evidence means.

Common mistakes

  • Treating a low score as proof of safety.
  • Uploading confidential files to a public sandbox.
  • Ignoring the screenshots, which often show the lure or the ransom note.
  • Trusting one sandbox: results differ between environments.
  • Not saving dropped files and PCAPs for later.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A sandbox gives a sample a low score and no behaviour. What is the correct conclusion?

    Evasion, missing triggers and short time limits are common. A clean report does not prove a file is clean.
  2. 2. Why is uploading a confidential document to a public cloud sandbox risky?

    Public services often share submissions. Use private instances or hash searches for sensitive material.
  3. 3. What does a shared mutex name across several reports suggest?

    A distinctive mutex is part of a program's code, so reuse points to common code or authors.
  4. 4. Which step of an automated pipeline should remain with a human?

    Automation sorts and enriches. Judging the findings and choosing a response requires an analyst.

Summary

  • Sandboxes automate the lab routine: snapshot, run, monitor, report, revert.
  • Reports hold static facts, behaviour, network, dropped files, signatures and ATT&CK mappings; script the extraction of indicators.
  • Compare reports to find shared infrastructure and families.
  • Evasion, missing triggers, time limits and environment mismatches mean verdicts need review.
  • Automate sorting and enrichment, but keep the judgment human.

Next: x86 Registers and Instructions for Analysts