A Malware Analysis Workflow
Malware Analysis Fundamentals · Advanced Reverse Engineering track
5 min read
In this module
The Complete Analysis Workflow
Malware analysis is methodical. Experienced analysts move through a workflow — quick triage, then progressively deeper passes — and each stage seeds the questions for the next. This lesson walks the whole arc from the moment a suspicious sample lands in your inbox to the finished report.
Stage 1: Triage (5-15 minutes)
First job: decide whether the sample deserves any more of your time, and grab initial indicators while you're at it.
- Hash the sample and check VirusTotal. If it is a known sample with detailed analysis, you may not need to go further.
- Identify the file type (PE, ELF, script, document).
- Check entropy to determine if the sample is packed.
- Extract strings and scan for obvious indicators (URLs, IP addresses, file paths, registry keys).
- Check imports for suspicious API usage patterns.
At this point you have a working hypothesis. Probably malicious? What might it do? Packed?
The whole workflow, with the time boxes from this lesson's stage headings and the questions that decide where you go next:
Effective malware analysis follows a workflow: triage (quick assessment), static analysis (examine without running), dynamic analysis (observe behaviour), and deep code analysis (understand the logic). Each stage builds on findings from the previous one, guiding where to focus deeper investigation.
Stage 2: Static Analysis (30 minutes - several hours)
If the sample is not too heavily obfuscated:
- Load in Ghidra or IDA and let auto-analysis complete.
- Identify key functions - look for the main function, initialisation routines, and network communication code.
- Map the code flow - how does the malware initialise? What does it do first? What triggers different behaviours?
- Identify C2 communication - find network functions and trace how C2 addresses are constructed or decoded.
- Find persistence mechanisms - look for registry writes, service installation, or scheduled task creation.
- Document encryption or encoding used for strings, configuration data, or network traffic.
If the sample is packed, switch to dynamic analysis, grab the unpacked code from memory, then come back to static.
Stage 3: Dynamic Analysis (30 minutes - several hours)
- Prepare the sandbox - clean VM snapshot, isolated network, monitoring tools installed.
- Start monitoring - ProcMon, Wireshark, API Monitor.
- Execute the malware and let it run for several minutes.
- Observe initial behaviour - what processes are created? What files are written? What network connections are made?
- Interact if needed - some malware waits for user activity. Move the mouse, open programs, create a realistic environment.
- Capture network traffic - record all DNS queries, HTTP requests, and other network activity.
- Check for persistence - has the malware installed itself to survive reboot?
- Dump memory if needed for further static analysis of unpacked code.
Stage 4: Deep Code Analysis (hours to days)
For important samples that require thorough understanding:
- Reverse critical functions - fully understand the C2 protocol, encryption scheme, and propagation mechanism.
- Extract configuration - decode hardcoded C2 servers, encryption keys, and campaign identifiers.
- Identify malware family - compare techniques, code patterns, and infrastructure with known malware families.
- Develop detection signatures - write YARA rules, network signatures (Snort/Suricata rules), and behavioural indicators.
Producing Indicators of Compromise (IOCs)
The output of analysis is typically a set of IOCs - observable artifacts that identify the malware:
- File hashes (SHA-256 of the sample and any dropped files)
- C2 infrastructure (domains, IP addresses, URLs)
- File system artifacts (files created, registry keys modified)
- Network signatures (unique patterns in C2 traffic)
- YARA rules (patterns for identifying the malware family)
- Behavioural indicators (process injection into specific targets, specific API call sequences)
IOCs get shared through threat intelligence platforms so other organisations can detect and block the threat before it reaches them.
The Analyst's Mindset
Malware analysis rewards patience and curiosity. Remember the author is on the other side of the table — actively trying to mislead, confuse, and waste your day. Anti-analysis techniques exist to frustrate you. Every one of them has a counter, and every obfuscation layer eventually peels.
The skills built across this curriculum — binary, memory, assembly, operating systems, cryptography, reverse engineering — converge here. Every previous module has handed you another tool for the moment when you stare at a malicious binary and have to work out, line by line, what it does and how to break it.
Building Your Analysis Environment
Stand up a dedicated analysis workstation. A physical machine or a hardened VM host, fully isolated from anything you care about. Install the kit: a debugger (x64dbg or WinDbg), a disassembler (Ghidra or IDA), Frida for instrumentation, Wireshark for capture, Python with pefile, yara-python, and capstone. Practise on known samples from MalwareBazaar or theZoo before going near anything novel. The point is muscle memory — when an incident hits, the tooling should disappear into the background so you can spend all your attention on the malware itself.