tools

Overview

CAPA (Common Analysis Platform for Artifacts) is a tool developed by FireEye Mandiant that identifies capabilities present in executable files. It analyzes PE files, ELF binaries, .NET modules, shellcode, and sandbox reports against a ruleset describing common behaviors — revealing what a program can do (network communication, file manipulation, process injection, etc.) without manual reverse engineering. Core tool for malware analysis and threat hunting.


Target / Context

Executable files suspected of being malicious. Primarily used on Windows for analyzing PE binaries. Output maps to MITRE ATT&CK, MAEC, and MBC frameworks.


Installation

ℹ︎Installation Commands:

Download from: https://github.com/mandiant/capa/releases Place capa.exe in working directory or add to PATH


Basic Usage

ℹ︎Basic Usage:
capa <binary>
capa.exe .\cryptbot.bin
capa cryptbot.bin
capa -h

Flags & Options

ℹ︎Flags & Options:
FlagDescriptionExample
-hDisplay helpcapa -h
-vIncrease verbositycapa.exe .\cryptbot.bin -v
-vvMaximum verbositycapa.exe .\cryptbot.bin -vv
-jOutput as JSON filecapa -j -vv .\cryptbot.bin > output.json

Common Use Cases

Basic Analysis

ℹ︎Commands:
capa.exe .\cryptbot.bin
capa.exe .\cryptbot.bin -v > cryptbot_v.txt
capa.exe .\cryptbot.bin -vv > cryptbot_vv.txt

JSON Output for CAPA Explorer Web

ℹ︎Commands:
capa -j -vv .\cryptbot.bin > cryptbot_vv.json

Upload JSON to CAPA Explorer Web (available online and offline) for visual analysis.


Interpreting Results

First Block — File Information

FieldDescription
Cryptographic AlgorithmsHash values of the file
AnalysisType of analysis performed (static/dynamic)
OSIdentified target OS and applicable capabilities
ArchBinary architecture (x86, x64, etc.)
PathFile location

MITRE ATT&CK Mapping

Format: ATT&CK Tactic::ATT&CK Technique::Technique Identifier Sub-technique format: ATT&CK Tactic::Technique::Sub-Technique::Identifier[.]Sub-ID

MAEC (Malware Attribute Enumeration and Characterization)

Encodes and communicates complex malware details including behaviors, artifacts, and interconnections.

MAEC ValueDescription
LauncherTriggers actions — dropping payloads, activating persistence, connecting to C2, executing functions
DownloaderDownloads and executes other files — fetching payloads, pulling updates, executing secondary stages

MBC (Malware Behavior Catalogue)

Catalogue of malware objectives and behaviors. Links to ATT&CK methods. Reference: https://github.com/MBCProject/mbc-markdown/blob/main/mbc_summary.md

Format: OBJECTIVE::Behavior::Method[Identifier] Example: ANTI-STATIC ANALYSIS::Executable Code::Argument Obfuscation[B0032.020]

OBJECTIVE::Behavior::[Identifier] Example: COMMUNICATION::HTTP Communication::[C0002]

MBC ObjectiveDescription
Anti-Behavioral AnalysisMalware avoids detection by hindering sandboxes or debuggers
Anti-Static AnalysisMalware obstructs static analysis to hide intentions
CollectionMalware identifies and gathers information from the target
C2Malware communicates with attacker infrastructure for RCE and data exfiltration
Credential AccessMalware aims to steal account credentials
Micro-BehaviorActions not necessarily malicious but commonly abused

Tip: Break results down line by line and think logically about what the malware is doing. Left side = what was identified, right side = how it performs that action.

Namespaces

Groups rules with the same purpose into categories. Namespaces Grouping

Format: Capability(Rule Name)::TLN(Top-Level Namespace)/Namespace Example: reference anti-VM strings::Anti-Analysis/anti-vm/vm-detection

ComponentDescription
TLN (Top-Level Namespace)Broadest grouping category
NamespaceSub-grouping under TLN (e.g., anti-vm/vm-detection)
CapabilityName of the specific rule flagged

Example: anti-analysis/anti-vm/vm-detection and anti-analysis/obfuscation share the same TLN but detect different things.

Reference: https://github.com/MBCProject/capa-rules-1?tab=readme-ov-file#namespace-organization



References / Images