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.
Diagram
From suspicious file to detection
Step 1 of 4
Handle
Store samples zipped with a password in an isolated share; never open on a work machine.
$ 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.
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.
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.
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.
Where should dynamic analysis happen?
Sibling techniques
Pages at the same depth, plus a lab and a glossary card for this one.