How Malware Analysis Works: Static, Dynamic, and Behavioral Techniques

A detailed guide to malware analysis methodology—static analysis with disassemblers, dynamic sandbox analysis, behavioral indicators, and the tools security researchers use.

The InfoNexus Editorial TeamMay 10, 20259 min read

This article is for informational purposes only. Consult a qualified healthcare professional for medical advice, diagnosis, or treatment.

What Is Malware Analysis?

Malware analysis is the discipline of examining malicious software to understand its functionality, intent, infrastructure, and impact—providing the intelligence needed to detect, defend against, and remediate infections. It is practiced by incident responders, threat intelligence teams, antivirus researchers, and security operations centers. Malware analysis can range from a rapid triage to determine if a suspicious file is malicious, to a deep reverse engineering effort that reconstructs an advanced persistent threat's full capability set. The field spans three main methodologies: static analysis, dynamic analysis, and hybrid/behavioral analysis.

The Analysis Pyramid

Analysts typically follow a tiered approach, moving from quick, safe techniques to progressively more time-intensive and risky methods:

  • Tier 1 — Fully automated analysis: Submission to commercial or open-source sandboxes (Any.run, Cuckoo, Joe Sandbox, VirusTotal) provides rapid initial triage results within minutes. Useful for common malware families.
  • Tier 2 — Static analysis: Examination of the file without executing it. Lower risk; reveals file format, embedded strings, imports, code structure, and potential obfuscation.
  • Tier 3 — Dynamic analysis: Executing the sample in a controlled, isolated environment and monitoring its behavior. Reveals runtime actions: file system changes, registry modifications, network communications.
  • Tier 4 — Advanced reverse engineering: Full disassembly and decompilation using tools like IDA Pro, Ghidra, or Binary Ninja. Required for heavily obfuscated, custom, or nation-state-grade malware.

Static Analysis Techniques

Static analysis examines a malware sample without executing it, making it inherently safer but limited against heavily obfuscated or packed code.

TechniqueTool ExamplesWhat It Reveals
File type and hash identificationfile, TrID, VirusTotalPE, ELF, script, document; known malware hash matches
String extractionstrings, FLOSS, BinTextHardcoded URLs, IPs, registry keys, API calls, error messages
PE header analysisPEStudio, PEiD, PE-bearCompile timestamp, imported DLLs, section names, entropy (high entropy = packed/encrypted)
Import/export analysisDependency Walker, dumpbinWindows API calls hint at functionality (CreateRemoteThread = injection; WinInet/WinHTTP = network)
Disassembly / decompilationIDA Pro, Ghidra, Binary Ninja, Radare2Assembly code, function logic, cryptographic routines, obfuscation patterns
YARA rule matchingYARA, yarGenPattern-based detection of known malware families or code patterns

Dynamic Analysis Techniques

Dynamic analysis executes the malware sample in a controlled environment—typically a virtual machine or dedicated analysis sandbox—and monitors its behavior in real time. A clean, isolated environment (no access to production networks, snapshot for rollback) is essential to prevent accidental spread.

  • Process monitoring: Tools like Process Monitor (ProcMon) and Process Hacker capture all file system, registry, and process/thread operations performed by the malware process.
  • Network traffic capture: Wireshark, tcpdump, and INetSim (a network simulator) capture or simulate network communications, revealing C2 (command-and-control) domains, beaconing intervals, and data exfiltration patterns.
  • API call tracing: Tools such as frida, API Monitor, or sandbox instrumentation record every Windows API call made by the sample, showing exactly what the malware is doing at the system level.
  • Memory analysis: Dumping process memory during execution with Volatility or WinPmem can extract unpacked payloads, decrypted strings, and injected code that is not visible in the on-disk binary.
  • Debugger-assisted analysis: Using x64dbg, OllyDbg, or WinDbg to step through execution allows analysts to bypass anti-analysis techniques (anti-debugging, timing checks) and trace execution to key functions.

Sandbox Analysis

Automated sandboxes integrate many dynamic analysis techniques into a single platform, executing samples in isolated VMs and generating reports including behavioral summaries, network IOCs, dropped files, and MITRE ATT&CK tactic/technique mappings. Popular platforms include:

SandboxTypeKey Features
Cuckoo SandboxOpen source (self-hosted)Highly customizable; supports Windows, Linux, Android; integrates with Volatility
Any.runCommercial (free tier)Interactive analysis; real-time visualization; community reports
Joe SandboxCommercialDeep behavioral analysis; Windows, macOS, Linux, mobile; MITRE ATT&CK mapping
VirusTotal / VirusTotal IntelligenceCommercial cloudMulti-AV scanning; behavioral reports; IOC pivoting; community comments
Hybrid Analysis (Falcon Sandbox)Commercial (free tier)CrowdStrike-backed; detailed behavioral reports; threat score

Anti-Analysis Techniques and Evasion

Sophisticated malware employs numerous techniques to detect and evade analysis environments:

  • Anti-VM checks: Detecting VM artifacts (VMware registry keys, VirtualBox drivers, unusual hardware serial numbers, CPUID hypervisor bit) and behaving benignly if detected.
  • Anti-debugging: Using IsDebuggerPresent, CheckRemoteDebuggerPresent, timing-based checks (RDTSC instruction), and exception-based checks to detect debugger presence.
  • Packing and obfuscation: Code is encrypted or compressed at rest and unpacked only in memory at runtime, defeating static string analysis.
  • Environment keying: Malware activates only on specific systems matching a CPU count, domain name, or installed software fingerprint—the targeted system—and lies dormant elsewhere.
  • Sleep and time acceleration: Long sleep intervals before malicious activity times out sandbox analysis windows; countered by patching sleep calls or accelerating VM time.

Deliverables of Malware Analysis

A complete malware analysis produces several actionable outputs:

  • Technical indicators of compromise (IOCs): file hashes, network IOCs (domains, IPs, URIs), registry keys, mutex names, file paths
  • YARA rules for detection of the same family in future
  • MITRE ATT&CK technique mapping (e.g., T1055 - Process Injection; T1071 - Application Layer Protocol)
  • Behavioral description and functional capability summary
  • Attribution indicators (code similarity to known threat actors, infrastructure overlap)
  • Remediation and hunting guidance for incident responders
malware analysisreverse engineeringsecurity research

Related Articles