Skip to main content
v2026.11,858 entries · CC-BY 4.0

Malware Analysis: Research Workflows and Guide

Conduct malware analysis in research: set up isolated REMnux environments, execute static capability triage with capa, and map telemetry to MITRE ATT&CK.

Written and maintained by CASRAI Editorial Board

Last updated

Malware analysis is the systematic deconstruction, static dissection, and runtime behavioral monitoring of malicious software artifacts. In academic and institutional cybersecurity research, malware analysis provides empirical evidence needed to track adversary campaigns, uncover software exploitation mechanisms, evaluate host and network defenses, and build robust machine learning detection models.

What it is used for in research

In computer science, cybersecurity, and digital forensics research, analyzing malicious binaries under controlled laboratory conditions enables several vital scientific workflows:

  • Empirical Threat Characterization and Attribution: Researchers examine binary structures, cryptographic implementations, and command-and-control (C2) network protocols to establish malware family lineage. Correlating these artifacts with the MITRE ATT&CK framework allows teams to trace adversary tactics, techniques, and procedures (TTPs) and publish structured telemetry to threat intelligence platforms like OpenCTI.
  • Curating Benchmark Research Corpora: Empirical machine learning and security data science require balanced, verified datasets. Analysts ingest live samples from public feeds such as MalwareBazaar, validating family labels and metadata before packaging them into benchmark corpora for automated classification algorithms.
  • Detection Signature and Rule Formulation: Disassembling unpacked payloads reveals immutable byte sequences, function call patterns, and specific strings. Researchers transform these indicators into standardized YARA rules to detect zero-day variants and scan institutional assets.
  • Adversarial Evasion and Robustness Analysis: Sophisticated threats incorporate defensive countermeasures, including hypervisor detection, API unhooking, environmental fingerprinting, and execution sleep timers. Researchers evaluate these evasive maneuvers within automated execution environments such as Cuckoo Sandbox to devise more resilient instrumentation and observation architectures.
  • Incident Handling and Forensic Reconstruction: As outlined in NIST SP 800-83 Rev. 1 (Guide to Malware Incident Prevention and Handling for Desktops and Laptops), dissecting recovered binaries confirms infection vectors, assesses lateral movement potential, and documents the blast radius of security incidents.

Install or access (official source only)

Malware analysis must always occur inside isolated, disposable environments to eliminate the risk of accidental lateral propagation across host environments or institutional research networks. Researchers employ specialized Linux distributions, automated capability triage engines, and government analysis portals.

1. REMnux Virtual Appliance Deployment

The REMnux project provides a pre-configured Ubuntu-based toolkit maintained for malware reverse engineering and behavioral analysis. The pre-built virtual appliance is distributed in Open Virtualization Appliance (OVA) format directly from the project’s official documentation repository (https://docs.remnux.org/):

  • Download the official OVA package and import it into VMware Workstation, VMware Fusion, or Oracle VirtualBox.
  • Configure the virtual machine’s network adapter strictly to Host-Only mode or attach it to an internal virtual network switch isolated from external gateways.
  • Log in using the default distribution credentials: username remnux, password malware. (Note: By default in dedicated mode, the SSH service is disabled to prevent unintended network access).

2. Adding REMnux to an Existing Ubuntu 24.04 Installation

Researchers operating dedicated physical workstations or customized virtual machines can layer the full REMnux software ecosystem on top of Ubuntu 24.04 LTS (Noble) in addon mode:

curl -O https://REMnux.org/remnux
chmod +x remnux
sudo mv remnux /usr/local/bin
sudo remnux install --mode=addon

Run remnux debug to verify that tool state files and dependencies installed correctly.

3. REMnux Container Execution

For modular command-line triage tasks without a desktop GUI, deploy the official REMnux container using Docker:

docker run --rm -it -u remnux -v /path/to/samples:/home/remnux/files remnux/remnux-distro:noble bash

4. Mandiant capa Installation

Mandiant capa identifies capabilities within executable files by matching logic against open-source YAML rules. Capa is bundled into REMnux and can also be installed as a standalone Python utility or pre-compiled binary via its official repository (https://github.com/mandiant/capa):

pip install flare-capa

5. CISA Malware Next-Generation Analysis Service

Public-sector researchers, federal agencies, state, local, tribal, and territorial (SLTT) governments, and critical infrastructure partners can access the Cybersecurity and Infrastructure Security Agency (CISA) Malware Next-Gen portal (https://www.cisa.gov/resources-tools/services/malware-next-generation-analysis). The platform provides automated static and dynamic processing of submitted artifacts, returning analytical reports formatted in PDF and STIX 2.1 standards.

Step-by-step task

The following reproducible workflow demonstrates initial static triage, capability detection, string deobfuscation, and isolated network service setup within a REMnux environment:

Step 1: Compute File Hashes and Identify Format

Establish cryptographic fingerprints to check against intelligence feeds and identify the underlying binary architecture:

sha256sum suspicious_sample.bin
md5sum suspicious_sample.bin
file suspicious_sample.bin

Verify whether the artifact is a 32-bit/64-bit Windows Portable Executable (PE), a Linux ELF executable, or a scripted wrapper.

Step 2: Execute Automated Capability Detection with capa

Run Mandiant capa to detect high-level program capabilities (such as process injection, persistence mechanisms, or credential dumping) mapped to standardized frameworks:

capa suspicious_sample.bin

To inspect the exact functions, basic blocks, and virtual memory addresses where capability indicators triggered, append the verbose flag:

capa -v suspicious_sample.bin

Step 3: Extract Obfuscated Strings with FLOSS

Standard static strings commands fail on binaries that build strings dynamically in stack memory. Use FireEye Labs Obfuscated String Solver (FLOSS) to recover hidden command-and-control domains and file paths:

floss suspicious_sample.bin

Step 4: Inspect PE Headers and Import Address Tables

Use pecheck (from the pefile Python suite) to inspect file headers, sections, compile timestamps, and imported dynamic link libraries (DLLs):

pecheck suspicious_sample.bin

Identify critical API functions that indicate malicious behavior, such as VirtualAllocEx, WriteProcessMemory, and CreateRemoteThread for code injection, or RegSetValueEx for registry autorun persistence.

Step 5: Configure Simulated Network Services with INetSim

Before launching dynamic execution on a paired guest VM, start the INetSim suite on REMnux to simulate HTTP, HTTPS, DNS, SMTP, and FTP protocols without connecting to the public internet:

sudo inetsim

In a separate terminal window, initiate packet capture on the host-only virtual adapter interface to log all egress requests:

sudo tcpdump -i eth1 -w dynamic_capture.pcap

Step 6: Export Structured Telemetry

Generate machine-readable JSON output from capa for programmatic ingestion into research databases:

capa -j suspicious_sample.bin > capa_telemetry.json

Output and how to read it

Interpreting malware analysis telemetry requires distinguishing between routine compiler runtime behavior and purposeful malicious indicators:

1. Mandiant capa Telemetry

Capa outputs a clean tabular summary detailing matched capabilities:

  • ATT&CK Tactic and Technique: Classifies operations into MITRE ATT&CK categories (e.g., Defense Evasion::Obfuscated Files or Information [T1027] or Persistence::Registry Run Keys / Startup Folder [T1547.001]).
  • Malware Behavior Catalog (MBC): Highlights specific functional behaviors, such as Anti-Behavioral Analysis::Dynamic Analysis Evasion.
  • Scope and Address Mapping: Verbose mode outputs the exact memory offsets (e.g., 0x004014F2). Analysts feed these addresses directly into disassemblers like Ghidra or IDA Pro to navigate straight to the relevant disassembly function.

2. Section Entropy and Packing Signatures

Section entropy measures randomness on a scale from 0.0 to 8.0:

  • Unpacked Native Binaries: Typical compiled .text code sections exhibit entropy between 5.8 and 6.8.
  • Packed or Encrypted Payloads: Entropy exceeding 7.2 strongly indicates compressed or encrypted payloads designed to hinder static disassembly. If section names show identifiers such as UPX0, UPX1, or random alphanumeric labels, the executable must be unpacked before deeper static analysis can proceed.

3. FLOSS String Output

FLOSS organizes recovered strings into four distinct categories: Static Strings (plain ASCII/UTF-16 text), Stack Strings (constructed on the stack via sequential move instructions), Tight String Loops (strings decoded through brief assembly loops), and Decoded Strings. Stack strings and decoded loops frequently contain primary C2 domain names, bot communication tokens, and internal debugging log statements.

4. INetSim Session Logs

INetSim records incoming connections in /var/log/inetsim/service.log. Review this log alongside your Wireshark capture to examine DNS lookups for non-existent domains, HTTP POST requests containing base64 payloads, and TLS handshakes attempting to verify certificate trust.

Troubleshooting

Researchers encountering common barriers during malware analysis can resolve them using verified technical procedures:

1. High Entropy and Packed Executables Suppress capa Detection

Problem: Capa reports zero capabilities or only generic packer signatures because the real executable payload is compressed or encrypted within an outer stub.

Solution: Check if the binary was compressed with UPX using upx -d -o unpacked.exe suspicious_sample.bin. If the packer is custom or proprietary, load the binary into a debugger (such as x64dbg), set memory breakpoints on memory allocation functions (VirtualAlloc or VirtualProtect), run execution until control transfers to the Original Entry Point (OEP), and dump the unmapped memory image using PeSieve or Scylla.

2. Anti-Analysis and Sandbox Timing Evasion

Problem: The malware executes inside a sandbox or VM without generating behavioral events, network traffic, or disk artifacts.

Solution: Modern malware often executes lengthy sleep intervals (e.g., calling Sleep or NtDelayExecution for several hours) to outlast automated analysis windows. In dynamic analysis environments, pass configuration parameters to accelerate the virtual clock or patch the sleep API in a debugger to return immediately.

3. DNS Resolution and Network Emulation Failures

Problem: Dynamic malware aborts execution early because network requests fail to resolve over an isolated virtual network adapter.

Solution: Confirm that the target guest VM has its primary DNS server configured to point directly to the REMnux IP address. Verify in /etc/inetsim/inetsim.conf that service_bind_address is set to 0.0.0.0 and that dns_default_ip points to the gateway IP. Use sudo systemctl status inetsim to verify that port 53 (UDP) and port 80/443 (TCP) are listening without binding collisions.

4. Format Errors When Analyzing Raw Shellcode with capa

Problem: Capa aborts with an unsupported file format error when analyzing raw shellcode payloads extracted from document macros or memory dumps.

Solution: Raw binary shellcode lacks PE/ELF file headers. Specify the architecture and format explicitly using the -f flag, such as capa -f sc32 shellcode.bin for 32-bit x86 shellcode or capa -f sc64 shellcode.bin for 64-bit x86_64 shellcode.

Free alternatives

Researchers selecting malware analysis environments have access to several free and open-source toolchains, each optimized for specific analytical stages:

Tool / Environment Primary Host OS Analysis Specialization Key Components Included Licensing Model
REMnux Linux (Ubuntu 24.04 / OVA) Static analysis, reverse engineering, and network service simulation capa, FLOSS, Ghidra, pefile, INetSim, Wireshark, Volatility Open Source (GPL / Permissive mix)
FLARE VM Windows (PowerShell script) Dynamic debugging, disassembly, and binary exploitation x64dbg, IDA Free, Ghidra, Process Hacker, ProcMon, FakeNet-NG Open Source (Apache 2.0 / Freeware tools)
SIFT Workstation Linux (Ubuntu / OVA) Digital forensics and incident response (DFIR) Autopsy, Sleuth Kit, Volatility 3, Plaso, log2timeline Open Source (GPL / SANS Free)
CAPE Sandbox Linux host / Windows guest Automated dynamic detonation and payload config extraction QEMU/KVM hypervisor monitor, YARA, automated memory dumping Open Source (GPLv3)
Ghidra Cross-platform (Java) Deep interactive static disassembly and decompiler analysis Decompiler, disassembler, scriptable Java/Python API, headless analyzer Open Source (Apache 2.0, NSA)

FAQ

What is the difference between static and dynamic malware analysis?

Static analysis examines a suspicious binary without executing it, inspecting file headers, imported API functions, cryptographic hashes, and embedded strings to evaluate capabilities safely. Dynamic analysis executes the malware in an instrumented, isolated sandbox to observe active runtime behaviors, including file creation, registry modifications, process injection, and outbound network communications.

How do researchers isolate malware analysis laboratories safely?

Laboratories isolate analysis systems using dedicated host-only virtual networks, physically air-gapped workstations, or hardware routers configured with strict access control lists (ACLs) that block outbound internet connectivity. Network simulation tools like INetSim are deployed locally to satisfy malware network dependency checks without allowing live traffic onto organizational networks.

What is Mandiant capa and how does it map to MITRE ATT&CK?

Mandiant capa is an open-source capability detection engine that scans executable files against human-readable YAML rules. Instead of identifying static file signatures, capa matches logic combinations (API calls, strings, instruction patterns) to infer what the binary can accomplish, mapping each detected capability directly to corresponding tactics and techniques in the MITRE ATT&CK framework.

When is memory forensics required during malware analysis?

Memory forensics (using tools such as Volatility) is essential when analyzing fileless malware, rootkits, or injected payloads that reside exclusively in volatile RAM. Capturing and inspecting a memory dump enables researchers to extract unhooked system call tables, dumped memory modules, decrypted network buffers, and injected DLLs that never touch the physical disk.

How does automated sandboxing differ from manual reverse engineering?

Automated sandboxing (such as Cuckoo or CAPE Sandbox) detonates hundreds of samples per day to produce immediate behavioral summaries and network telemetry. Manual reverse engineering (using disassemblers like Ghidra) is an intensive, deep-dive process applied to sophisticated or evasive samples to decompile complex encryption algorithms, decode custom C2 protocols, and understand targeted vulnerability exploits.

Sources (official docs)

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about Malware Analysis: Research Workflows and Guide

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →