Перейти к содержимому
New

DeepSeek V4.1 Flash free for 7 days: 10M tokens a day after a top-up of $10 or more. Until Nov 30.

How it works
aeondave/capaDFIR и threat hunting

capa

⁨Auth/lab ref: capa capability detection; executable/sandbox triage, MITRE/MBC mapping, behavior summary, static review prioritization.⁩

v2026.11.13-21cd5683 установки+3 за 7 дней39 ЗвездыApache-2.0синхронизировано 10 часов назад

Установка

Ещё нет NotHoly CLI? Сначала установите её.

$ curl -fsSL https://notholy.com/install.sh | sh
$ notholy skills install aeondave/capa

Пишет в ⁦~/.notholy/skills⁩ после проверки подписи и SHA-256.

ПодписьПодписано, ed25519
EDOWM58jQv…MDWfUABw==CLI проверяет SHA-256 и подпись, прежде чем записать хоть один файл.
Пакетe17bc2ff…62d0c107
e17bc2ff1f7f…771d62d0c1072 файла · ⁦5.4 KB⁩
ПроверкаНизкий1 замечание
  • Ссылки на внешние домены
Вся проверка
Источникgithub.com/AeonDave/malskill/tree/main/offensive-tools/forensic/capa@21cd568

Эта запись еще не переведена на русский, поэтому показан текст на другом языке: English.

Static capability detection for binaries — maps code behavior to ATT&CK/MBC without execution.

Installation

bash
# Standalone binary (recommended — no Python deps)
# Download from: https://github.com/mandiant/capa/releases
# Linux
# Download the Linux archive for your architecture from the release page.
unzip capa-*.zip && chmod +x capa

# Windows: download capa.exe from releases

# Python package
pip install capa

# Verify
capa --version

Basic Usage

bash
# Static analysis (default — fastest)
capa suspicious.exe

# Verbose: show matched rules and evidence locations
capa -v suspicious.exe

# Very verbose: show all matched bytes/addresses
capa -vv suspicious.exe

# Analyze shellcode (raw bytes, not PE)
capa --format sc32 shellcode_32bit.bin
capa --format sc64 shellcode_64bit.bin

# Analyze ELF
capa suspicious.elf

# Analyze .NET assemblies
capa dotnet_malware.exe

# JSON output (machine-readable, parse with jq)
capa -j suspicious.exe > capa_result.json
capa -j suspicious.exe | jq '.

# Dynamic analysis report (CAPE/sandbox JSON)
capa report.json

# Disable ASLR/PE analysis for raw shellcode
capa --format sc32 payload.bin

Output Interpretation

Standard output structure

text
+------------------------+---+
| md5                    | abc123...             |
| sha1                   | def456...             |
| sha256                 | ghi789...             |
| path                   | suspicious.exe        |
| size                   | 45056                 |
| arch                   | x86                   |
| os                     | windows               |
| format                 | pe                    |
| ...                    |                       |
+------------------------+---+

+----------------------------------------------------------------------+------+
| CAPABILITY                                                           | N/A  |
|----------------------------------------------------------------------+------|
| create process (2 matches)                                           | ✓    |
| write file (3 matches)                                               | ✓    |
| connect to URL (1 match)                                             | ✓    |
| schedule task via at                                                 | ✓    |
| create thread (1 match)                                              | ✓    |
+----------------------------------------------------------------------+------+

ATT&CK output section

text
ATT&CK Tactic                ATT&CK Technique
Execution                    T1059.003 Windows Command Shell
Persistence                  T1053.005 Scheduled Task/Job: Scheduled Task
Defense Evasion              T1055.001 Process Injection: DLL Injection
Command and Control          T1071.001 Application Layer Protocol: Web Protocols

MBC output section (Malware Behavior Catalog)

text
MBC Objective    MBC Behavior
Anti-Analysis    Software Packing (F0001)
Communication    HTTP Communication (C0002)
Execution        Execute Code (B0024)

Key Capabilities to Watch For

Capability Implication
inject into process Process injection — DLL/shellcode injection
allocate RWX memory Shellcode staging area
write to process memory Code injection target
create remote thread Remote thread injection
hide process Rootkit behavior
hook API API hooking (keylogger, AMSI bypass)
connect to URL / send HTTP request C2 communication
resolve API by hash Obfuscated API calls (common in loaders)
enumerate processes Discovery / targeting
schedule task / modify registry run key Persistence
dump credentials Credential harvesting
read credentials from browser Browser credential theft
encrypt data using AES Data encryption (ransomware, C2)
decode data using Base64 Encoded payload / C2 data

Workflows

Workflow 1: Quick binary triage

bash
# 1. Check what binary can do (30 seconds)
capa malware.exe 2>/dev/null

# 2. If packed/obfuscated (capa says "packed"):
capa malware.exe | grep -i "pack\|obfuscat\|encrypt"

# 3. If packed, try unpacking first:
upx -d malware_packed.exe -o malware_unpacked.exe
capa malware_unpacked.exe

# 4. Get JSON for further analysis
capa -j malware.exe > analysis.json

Workflow 2: API hash resolution detection

bash
capa -v malware.exe | grep -i "hash\|resolve\|GetProcAddress"

# If "resolve API by hash" is detected:
# → binary uses dynamic API resolution (common evasion)
# → look in Ghidra/radare2 for hash computation loops
# → common hash algorithms: ROR13, DJBX33A, FNV1a

Workflow 3: Understand malware before RE

bash
capa -vv malware.exe > capa_full.txt

# Extract function addresses of interest
grep "0x" capa_full.txt | grep -i "inject\|encrypt\|connect"

# Use those addresses as RE entry points in Ghidra
# Load malware.exe in Ghidra → Go to address from capa output

Workflow 4: Classify sample type

bash
# Check capabilities to determine type
capa sample.exe 2>/dev/null | grep -E "download|inject|persist|dump|keylog|encrypt"

# Loader indicators:
#   allocate RWX, write shellcode, create thread, resolve API by hash

# Dropper indicators:
#   write file, create process, schedule task

# Ransomware indicators:
#   enumerate files, encrypt data, delete shadow copies

# RAT indicators:
#   capture screenshot, log keystrokes, send HTTP, create remote shell

Workflow 5: AV/EDR evasion research

bash
# Find what triggers detection
capa -vv malware.exe | grep -i "hook\|amsi\|etw\|patch\|bypass"

# Identify suspicious imports that EDR flags
capa -v malware.exe | grep -i "VirtualAlloc\|WriteProcessMemory\|CreateRemoteThread"

# Compare clean vs evasive tool
capa -j legit_tool.exe > clean.json
capa -j evasive_tool.exe > evasive.json
diff <(jq '.capabilities | keys[]' clean.json | sort) <(jq '.capabilities | keys[]' evasive.json | sort)

Dynamic Analysis (Sandbox Reports)

capa supports CAPE sandbox JSON output for dynamic capability extraction:

bash
# CAPE sandbox output
capa report.json --format cape

# Dynamic capa finds capabilities that only appear at runtime:
#   - packed code that capa can't read statically
#   - capabilities invoked via reflective loading

JSON Output and Parsing

bash
# Full JSON output
capa -j malware.exe | tee capa.json

# Extract capability names only
capa -j malware.exe | jq '.capabilities | keys[]'

# Get ATT&CK technique IDs
capa -j malware.exe | jq '.attack | .[] | .[] | .id'

# Get function addresses for specific capability
capa -j malware.exe | jq '.rules[] | select(.name | contains("inject")) | .matches | keys[]'

# List all matched capabilities with match count
capa -j malware.exe | jq '.rules[] | {name: .name, count: (.matches | length)}'

Integration with RE Tools

bash
# Step 1: capa for overview
capa malware.exe -v > capa_output.txt

# Step 2: extract function addresses of interest
grep "0x" capa_output.txt | head -20

# Step 3: load in Ghidra
# Script → Go to address → paste address from capa output
# Focus RE on identified functions

# Step 4: use capa rules to guide YARA rule creation
# capa rules are in: https://github.com/mandiant/capa-rules
# Use matched strings from capa -vv as YARA string candidates

Rule Customization

bash
# Clone capa rules for inspection/customization
git clone https://github.com/mandiant/capa-rules

# Use custom rule directory
capa --rules /path/to/custom-rules malware.exe

# Combine built-in + custom
capa --rules /path/to/capa-rules --rules /path/to/custom-rules malware.exe

capa rule format (YAML):

yaml
rule:
  meta:
    name: detect custom packer
    namespace: anti-analysis/packer
    att&ck:
      - Defense Evasion::Obfuscated Files or Information [T1027]
  features:
    - and:
      - mnemonic: pushad
      - mnemonic: popad
      - number: 0x1000

Tips

  • capa cannot see into packed/encrypted code — unpack first (UPX, custom) then re-run
  • -vv output shows exact VA addresses → use as RE starting points in Ghidra/r2
  • "resolve API by hash" = obfuscated imports → look for GetProcAddress + hash computation
  • Dynamic sandbox report mode finds runtime-only behaviors static mode misses
  • Compare capa JSON output of malware family variants to find common capabilities across samples

Resources

File When to load
references/ Capability interpretation guide, RE pivot strategy, sandbox report setup

Файлы этой версии

Права

ПравоЗаявленоНайдено проверкой
Читает файлыНетНет
Пишет файлыДаДа
Выполняет команды shellДаДа
Ходит в сетьДаДа
Использует коннекторыНетНет
Управляет браузеромНетНет

Замечания проверки

Проверено 13 нояб. 2026 г.

  1. ИнфоСсылка · Ссылки на внешние домены

Чистая проверка снижает риск, но не доказывает, что пакет безопасен. Читайте то, что ставите.

ВерсияОпубликованаКоммитSHA-256ПодписьИзменение прав
v2026.11.13-21cd56813 нояб. 2026 г.21cd568e17bc2ffПодписана–

Спрашивайте обо всём, что позволяет ваш скоуп.

Создайте аккаунт, пополните баланс и задайте первый вопрос в чате или в терминале.

  1. 1/3

    Создайте аккаунт

    Личный или для компании. Позже можно перейти на аккаунт компании без потери баланса и ключей.

    ЛичныйКомпания
  2. 2/3

    Пополните баланс

    Картой. Оплата за токены, без подписки.

    $5.00минимальное пополнение
  3. 3/3

    Спрашивайте

    В чате, или установите CLI и выполните notholy login в терминале.

    $ notholy login