Skip to content
Tutorials Center
My learning

Topics

Lesson 3 of 37 ยท Getting Started

The Malware Analysis Workflow

Follow the standard malware analysis workflow from triage and static checks to dynamic analysis, reverse engineering and reporting, and learn when to stop.

Beginners often open a sample and start poking at random. Professionals follow a workflow: a repeatable sequence that goes from cheap, safe steps to expensive, risky ones and stops as soon as the questions are answered. This lesson walks through that sequence, introduces the pyramid of effort, and shows a small tracker that keeps your notes consistent.

The pyramid of effort

Think of analysis as a pyramid. The wide base is fast and automated; the narrow tip is slow, manual and rare.

  1. Triage (minutes): identify the file, hash it, look it up in reputation sources, scan with several engines.
  2. Basic static analysis (tens of minutes): strings, headers, imports, resources, entropy.
  3. Basic dynamic analysis (an hour): run it in the lab, watch processes, files, registry and network.
  4. Advanced static analysis (hours to days): disassemble and read the logic.
  5. Advanced dynamic analysis (hours to days): debug the sample, unpack it, inspect memory.

Most samples are fully understood by level 3. Only high-value or novel threats justify levels 4 and 5.

flowchart TB
    A["5. Advanced dynamic: debugger, memory"] --- B["4. Advanced static: disassembly"]
    B --- C["3. Basic dynamic: sandbox, monitoring"]
    C --- D["2. Basic static: strings, headers, imports"]
    D --- E["1. Triage: hashes, file type, reputation"]

Work up from the bottom. Each level costs more time, so climb only when a question is still unanswered.

Step by step

1. Define the question

Write down why you are analyzing the file. "Is this a known family?" needs less work than "What data did it take?" A clear question prevents endless wandering.

2. Preserve and record

Keep the original sample untouched, record its hashes and where it came from (which machine, which user, which time). Evidence you cannot trace is evidence you cannot defend in an incident report. See handling samples safely.

3. Triage

Identify the true file type, not just the extension, because attackers rename files. Compute hashes and check them against reputation services and your own records. Many "new" samples are known. Triage details are in Hashing and Fingerprinting and Identifying File Types.

4. Static analysis

Look at strings, headers, imports and sections without running anything. It gives you hypotheses ("it probably contacts a server", "it probably writes a startup key") and indicators to watch for later.

5. Dynamic analysis

Run the sample in an isolated, snapshotted lab with monitors on. Compare what happens with your static hypotheses. Be systematic: record the time, the tools, and what you changed.

6. Deeper reversing (only if needed)

If the sample is packed, uses custom encryption, or you must understand a specific routine, move to disassembly and debugging. Assembly basics is the fifth chapter's subject; do not be intimidated by it now.

7. Extract indicators

List the indicators of compromise (IOCs): file hashes, domains, IP addresses, URLs, registry keys, mutex names, scheduled task names. Also list behavioural indicators, which survive when attackers change infrastructure.

8. Report and act

Summarize findings for the audience: executives want impact, responders want steps, detection engineers want rules. Then feed the results back into the security stack.

Keeping notes consistent

Good analysts keep a structured record while they work. The tracker below is a plain Python class, not a real tool, but it shows the habit: every finding has a source, a time order and a confidence level.

Python A tiny analysis notebook

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 domain here uses the reserved .test suffix, which can never resolve to a real host, so it is safe to put in examples. Do the same in your own lab notes when you need a placeholder.

When to stop

Stop when the question is answered with enough confidence for the decision at hand. Common stopping points:

  • The file matches a known family and you can reuse existing intelligence.
  • You have the indicators needed to hunt and block.
  • Further work would not change the response.

Not stopping is a trap: a day spent on one decryption routine might delay containment of fifty infected machines. Time-box each level and write down what you did not examine.

Triage thinking in code

Here is a deliberately simple scorer that combines weak signals into a priority for deeper work. Real teams use similar triage queues.

Python Prioritising samples

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 weights are invented. The lesson is the pattern: cheap automated signals decide where human attention goes.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. In the pyramid of effort, which activity belongs at the wide base?

    Triage is fast, cheap and done for every sample. Deep reversing is slow and used sparingly.
  2. 2. Why record where a sample came from and its hashes before doing anything else?

    Provenance and hashes keep the investigation defensible and let you tell later copies from the original.
  3. 3. When should you stop analyzing a sample?

    Analysis is driven by decisions. Time spent beyond the point of useful answers delays response.
  4. 4. Which pair is correctly ordered from cheapest to most expensive?

    Hashing and file identification come first, followed by static inspection, then running the sample in the lab, and finally deep reversing.

Summary

  • Follow a workflow: question, preserve, triage, static, dynamic, reverse if needed, extract indicators, report.
  • Climb the pyramid only as far as the question requires.
  • Keep structured notes with sources, order and confidence.
  • Indicators include hashes, domains, registry keys and, better, behaviours.
  • Time-box your work and say what you did not examine.

Next: Ethics, Law and Safety Rules