Malware analysis for defenders: triage, static and dynamic analysis in an isolated lab

A safe workflow for analyzing a suspicious file: handling rules, hash and reputation triage, static analysis (strings, imports, PE structure, YARA), dynamic analysis in an isolated VM or sandbox, and turning results into detections.

Lesson 6 of 18 · 14 min read · practice only with authorization

Diagram

From suspicious file to detection

Follow the path. One example at a time.

Step 1 of 4

Handle

Store samples zipped with a password in an isolated share; never open on a work machine.

Illustration: Handle
$ sha256sum invoice.exe
5f2b...c91a  invoice.exe
$ 7z a -pinfected -mhe=on sample-5f2b.7z invoice.exe

The example on the open step is one illustration, or the fix you can paste into an application you own.

What this page is made of

3 pieces. Each one says what fails, who is affected, what you would notice, and what you change.

  1. Lab isolation

    What fails
    Samples can spread, beacon, or destroy data.
    Who is affected
    Your network and the analyst’s machine.
    What you would notice
    Analysis VMs with access to the corporate network.
    What you change
    Use host-only networking, snapshots, and fake internet services such as INetSim.
  2. Static first

    What fails
    Many answers come without running anything.
    Who is affected
    Analysts’ time and safety.
    What you would notice
    Jumping straight to execution.
    What you change
    Start with hashes, strings, imports, and capa.
  3. Output that helps

    What fails
    Analysis matters when it produces indicators and detections.
    Who is affected
    The SOC and other teams.
    What you would notice
    Reports with no hashes, domains, or rules.
    What you change
    Deliver IOCs, YARA or Sigma rules, and ATT&CK mapping.

Sandboxes

Automated sandboxes such as CAPE (self-hosted) or commercial services run samples and report behavior. Do not upload files that may contain your organization’s confidential data to public services.

Reverse engineering

When behavior is unclear, disassemblers and decompilers like Ghidra show the code itself. The Ghidra lessons in the tool library walk through reading functions in practice binaries.

Check yourself

Recognition and the fix. Nothing here is a procedure.

1 / 3

Where should dynamic analysis happen?

Sibling techniques

Pages at the same depth, plus a lab and a glossary card for this one.

  1. MapMalware fundamentals: families, delivery, persistence, and the responseWhat malware categories describe, how infections usually start, where persistence hides on Windows, Linux, and macOS, and why rebuilding usually beats cleaning.

Practice

  1. LabTerminal labRead the files on a scoped host and name the failure in a finding.