К основному содержанию
скилл CX Codex

analyzing-malware-behavior-with-cuckoo-sandbox — скилл

Скилл гоняет образцы в Cuckoo Sandbox и разбирает, что они делают при запуске: процессы, файлы, реестр, сеть.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-malware-behavior-with-cuckoo-sandbox -a claude-code
Открыть на GitHub

Что делает analyzing-malware-behavior-with-cuckoo-sandbox

Скилл описывает полный цикл динамического анализа: отправить образец в Cuckoo, дождаться прогона, разобрать отчёт. Внутри — команды cuckoo submit с таймаутом и выбором виртуальной машины, запросы к REST API на порту 8090, разбор JSON-отчёта на Python. Отдельные шаги посвящены дереву процессов, сетевым соединениям, изменениям файловой системы и реестра, сработавшим сигнатурам и дампу памяти через Volatility.

Запускать это стоит на выделенном сервере анализа с Cuckoo Sandbox 3.x, гостевой Windows 10/11 со снятым чистым снапшотом и изолированной сетью с InetSim или FakeNet-NG. Для сетевых сигнатур подключают Suricata или Snort. Под PCAP и дампы памяти автор советует заложить минимум 500 GB диска — на меньшем объёме анализ быстро упрётся в место.

В самом скилле есть прямое предупреждение: не запускайте его на известном шифровальщике, который может расползтись по сетевым шарам при плохо настроенной изоляции. Сначала проверьте, что сеть действительно отрезана. Если образец прошёл статическую триаж-проверку и нужен именно поведенческий разбор — это тот случай.

Какие задачи решает

  • снять дерево процессов и связи родитель-потомок при запуске образца
  • собрать DNS-запросы, HTTP-запросы и TCP-соединения из прогона
  • найти дропнутые файлы с SHA-256 и типом
  • зафиксировать изменения ключей реестра для закрепления в системе
  • разобрать дамп памяти через Volatility на скрытые процессы

Примеры запросов агенту

  • прогони образец в Cuckoo и покажи дерево процессов
  • вытащи из отчёта все сетевые соединения и DNS-запросы
  • проверь дамп памяти на injected-код через malfind

Как установить analyzing-malware-behavior-with-cuckoo-sandbox

1Через Skills CLI (Vercel)

npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-malware-behavior-with-cuckoo-sandbox -a claude-code

2Вручную: положить файлы

~/.claude/skills/analyzing-malware-behavior-with-cuckoo-sandbox/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/analyzing-malware-behavior-with-cuckoo-sandbox/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о analyzing-malware-behavior-with-cuckoo-sandbox

Как установить analyzing-malware-behavior-with-cuckoo-sandbox в Claude?

Через skills CLI: npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-malware-behavior-with-cuckoo-sandbox -a claude-code. После этого файл скилла лежит в ~/.claude/skills/analyzing-malware-behavior-with-cuckoo-sandbox/SKILL.md.

Что делает analyzing-malware-behavior-with-cuckoo-sandbox?

Описывает, как прогнать образец в Cuckoo Sandbox и разобрать поведение: создание процессов, изменения файлов и реестра, сетевую активность, API-вызовы. На выходе — поведенческий отчёт для классификации и извлечения IOC.

Что нужно подготовить до запуска?

Cuckoo Sandbox 3.x на отдельном сервере анализа, гостевую Windows 10/11 со снапшотом чистого состояния, бэкенд виртуализации VirtualBox, KVM или VMware. Ещё изолированную сеть с InetSim или FakeNet-NG и запас диска под PCAP и дампы памяти.

Исходный текст

SKILL.md · Apache-2.0
---
name: analyzing-malware-behavior-with-cuckoo-sandbox
description: 'Detonate malware samples in Cuckoo Sandbox to observe runtime behavior
  — process creation, file system and registry changes, network communications,
  and API calls — and generate behavioral reports for classification and IOC extraction.
  Use when a sample has passed static triage and needs dynamic/behavioral analysis,
  when mapping a full infection chain, or when building YARA/behavioral signatures
  from observed sandbox activity.

  '
domain: cybersecurity
subdomain: malware-analysis
tags:
- malware
- dynamic-analysis
- sandbox
- Cuckoo
- behavioral-analysis
version: 1.0.0
author: mahipal
license: Apache-2.0
nist_csf:
- DE.AE-02
- RS.AN-03
- ID.RA-01
- DE.CM-01
mitre_attack:
- T1497
- T1055
- T1071
- T1027
---

# Analyzing Malware Behavior with Cuckoo Sandbox

## When to Use

- A suspicious sample passed static analysis triage and requires behavioral observation in a controlled environment
- You need to capture network traffic, file drops, registry modifications, and API calls from a malware execution
- Determining the full infection chain including second-stage payload downloads and persistence mechanisms
- Generating behavioral signatures and YARA rules based on observed runtime activity
- Automated analysis of bulk malware samples requiring consistent reporting

**Do not use** when the sample is a known ransomware variant that may spread via network shares in a misconfigured sandbox; verify network isolation first.

## Prerequisites

- Cuckoo Sandbox 3.x installed on a dedicated analysis server (Ubuntu 22.04 recommended)
- Guest VMs configured with Windows 10/11 snapshots (Cuckoo agent installed, snapshots taken at clean state)
- VirtualBox, KVM, or VMware configured as the Cuckoo virtualization backend
- Isolated network with InetSim or FakeNet-NG for simulating internet services
- Suricata or Snort integrated for network-level signature matching during analysis
- Sufficient disk space for PCAP captures and memory dumps (minimum 500 GB recommended)

## Workflow

### Step 1: Submit Sample to Cuckoo

Submit the malware sample for automated analysis:

```bash
# Submit via command line
cuckoo submit /path/to/suspect.exe

# Submit with specific analysis timeout (300 seconds)
cuckoo submit --timeout 300 /path/to/suspect.exe

# Submit with specific VM and analysis package
cuckoo submit --machine win10_x64 --package exe --timeout 300 /path/to/suspect.exe

# Submit via REST API
curl -F "[email protected]" -F "timeout=300" -F "machine=win10_x64" \
  http://localhost:8090/tasks/create/file

# Submit URL for analysis
curl -F "url=http://malicious-site.com/payload" -F "timeout=300" \
  http://localhost:8090/tasks/create/url

# Check task status
curl http://localhost:8090/tasks/view/1 | jq '.task.status'
```

### Step 2: Monitor Execution in Real-Time

Track the analysis progress and observe live behavior:

```bash
# Watch Cuckoo analysis log
tail -f /opt/cuckoo/log/cuckoo.log

# Monitor analysis task status
cuckoo status

# Access Cuckoo web interface for live screenshots and process tree
# Navigate to http://localhost:8080/analysis/<task_id>/
```

Key behavioral events to watch during execution:
- Process creation chain (parent-child relationships)
- Network connection attempts to external IPs
- File drops in temporary directories or system folders
- Registry modifications to Run keys or service entries
- API calls related to encryption (CryptEncrypt), injection (WriteProcessMemory), or evasion

### Step 3: Analyze Process Activity

Review the process tree and API call trace from the Cuckoo report:

```python
# Parse Cuckoo JSON report programmatically
import json

with open("/opt/cuckoo/storage/analyses/1/reports/report.json") as f:
    report = json.load(f)

# Process tree analysis
for process in report["behavior"]["processes"]:
    pid = process["pid"]
    ppid = process["ppid"]
    name = process["process_name"]
    print(f"PID: {pid} PPID: {ppid} Name: {name}")

    # Extract suspicious API calls
    for call in process["calls"]:
        api = call["api"]
        if api in ["CreateRemoteThread", "VirtualAllocEx", "WriteProcessMemory",
                    "NtCreateThreadEx", "RegSetValueExA", "URLDownloadToFileA"]:
            args = {arg["name"]: arg["value"] for arg in call["arguments"]}
            print(f"  [!] {api}({args})")
```

### Step 4: Review Network Activity

Examine network connections, DNS queries, and HTTP requests:

```python
# Network analysis from Cuckoo report
network = report["network"]

# DNS resolutions
print("DNS Queries:")
for dns in network.get("dns", []):
    print(f"  {dns['request']} -> {dns.get('answers', [])}")

# HTTP requests
print("\nHTTP Requests:")
for http in network.get("http", []):
    print(f"  {http['method']} {http['uri']} (Host: {http['host']})")
    if http.get("body"):
        print(f"    Body: {http['body'][:200]}")

# TCP connections
print("\nTCP Connections:")
for tcp in network.get("tcp", []):
    print(f"  {tcp['src']}:{tcp['sport']} -> {tcp['dst']}:{tcp['dport']}")

# Extract PCAP for deeper Wireshark analysis
# PCAP location: /opt/cuckoo/storage/analyses/1/dump.pcap
```

### Step 5: Examine File System and Registry Changes

Document persistence mechanisms and dropped files:

```python
# File operations
print("Files Created/Modified:")
for f in report["behavior"].get("summary", {}).get("files", []):
    print(f"  {f}")

# Dropped files with hashes
print("\nDropped Files:")
for dropped in report.get("dropped", []):
    print(f"  Path: {dropped['filepath']}")
    print(f"  SHA-256: {dropped['sha256']}")
    print(f"  Size: {dropped['size']} bytes")
    print(f"  Type: {dropped['type']}")

# Registry modifications
print("\nRegistry Keys Modified:")
for key in report["behavior"].get("summary", {}).get("keys", []):
    print(f"  {key}")
```

### Step 6: Review Signatures and Scoring

Check Cuckoo's behavioral signatures and threat scoring:

```python
# Behavioral signatures triggered
print("Triggered Signatures:")
for sig in report.get("signatures", []):
    severity = sig["severity"]
    name = sig["name"]
    description = sig["description"]
    marker = "[!]" if severity >= 3 else "[*]"
    print(f"  {marker} [{severity}/5] {name}: {description}")
    for mark in sig.get("marks", []):
        if mark.get("call"):
            print(f"      API: {mark['call']['api']}")
        if mark.get("ioc"):
            print(f"      IOC: {mark['ioc']}")

# Overall score
score = report.get("info", {}).get("score", 0)
print(f"\nOverall Threat Score: {score}/10")
```

### Step 7: Extract Memory Dump Artifacts

Analyze the full memory dump captured during execution:

```bash
# Memory dump is saved at:
# /opt/cuckoo/storage/analyses/1/memory.dmp

# Use Volatility to analyze the memory dump
vol3 -f /opt/cuckoo/storage/analyses/1/memory.dmp windows.pslist
vol3 -f /opt/cuckoo/storage/analyses/1/memory.dmp windows.malfind
vol3 -f /opt/cuckoo/storage/analyses/1/memory.dmp windows.netscan
```

## Key Concepts

| Term | Definition |
|------|------------|
| **Dynamic Analysis** | Executing malware in a controlled environment to observe runtime behavior including system calls, network activity, and file operations |
| **Sandbox Evasion** | Techniques malware uses to detect virtual/sandbox environments and alter behavior to avoid analysis (sleep timers, VM checks, user interaction checks) |
| **API Hooking** | Cuckoo's method of intercepting Windows API calls made by the malware to log function names, parameters, and return values |
| **InetSim** | Internet services simulation tool that responds to malware network requests (HTTP, DNS, SMTP) within the isolated analysis network |
| **Process Injection** | Malware technique of injecting code into legitimate processes; detected by monitoring VirtualAllocEx and WriteProcessMemory API sequences |
| **Behavioral Signature** | Rule-based detection matching specific sequences of API calls, file operations, or network activity to known malware behaviors |
| **Analysis Package** | Cuckoo module defining how to execute a specific file type (exe, dll, pdf, doc) within the guest VM for proper behavioral capture |

## Tools & Systems

- **Cuckoo Sandbox**: Open-source automated malware analysis system providing behavioral reports, network captures, and memory dumps
- **InetSim**: Internet services simulation suite providing fake HTTP, DNS, SMTP, and other services for isolated malware analysis networks
- **FakeNet-NG**: FLARE team's network simulation tool that intercepts and redirects all network traffic for analysis
- **Suricata**: Network IDS/IPS integrated with Cuckoo for real-time signature-based detection of malicious network traffic
- **Volatility**: Memory forensics framework used to analyze memory dumps captured during Cuckoo analysis

## Common Scenarios

### Scenario: Analyzing a Multi-Stage Dropper

**Context**: Static analysis reveals a packed executable with minimal imports and high entropy. The sample needs sandbox execution to observe unpacking, payload delivery, and C2 establishment.

**Approach**:
1. Submit sample to Cuckoo with extended timeout (600 seconds) to capture slow-acting behavior
2. Review process tree for child process creation (dropper spawning payload processes)
3. Identify dropped files in %TEMP%, %APPDATA%, or system directories
4. Extract dropped files and compute hashes for separate analysis
5. Map network connections to identify C2 infrastructure contacted after initial execution
6. Check for persistence mechanisms (Run keys, scheduled tasks, services) in registry modifications
7. Compare behavioral signatures against known malware families

**Pitfalls**:
- Using insufficient analysis timeout causing the sandbox to terminate before second-stage payload executes
- Not configuring InetSim to respond to DNS and HTTP requests, preventing the malware from progressing past C2 check-in
- Ignoring sandbox evasion detections; if the sample exits immediately, it may be detecting the virtual environment
- Not analyzing dropped files separately; the initial dropper may be less interesting than the final payload

## Output Format

```
DYNAMIC ANALYSIS REPORT - CUCKOO SANDBOX
==========================================
Task ID:          1547
Sample:           suspect.exe (SHA-256: e3b0c44298fc1c149afbf4c8996fb924...)
Analysis Time:    300 seconds
VM:               win10_x64 (Windows 10 21H2)
Score:            8.5/10

PROCESS TREE
suspect.exe (PID: 2184)
  └── cmd.exe (PID: 3456)
      └── powershell.exe (PID: 4012)
          └── svchost_fake.exe (PID: 4568)

FILE SYSTEM ACTIVITY
[CREATED]  C:\Users\Admin\AppData\Local\Temp\payload.dll
[CREATED]  C:\Windows\System32\svchost_fake.exe
[MODIFIED] C:\Windows\System32\drivers\etc\hosts

REGISTRY MODIFICATIONS
[SET] HKCU\Software\Microsoft\Windows\CurrentVersion\Run\WindowsUpdate = "C:\Windows\System32\svchost_fake.exe"
[SET] HKLM\SYSTEM\CurrentControlSet\Services\FakeService\ImagePath = "C:\Windows\System32\svchost_fake.exe"

NETWORK ACTIVITY
DNS:    update.malicious[.]com -> 185.220.101.42
HTTP:   POST hxxps://185.220.101[.]42/gate.php (beacon)
TCP:    10.0.2.15:49152 -> 185.220.101.42:443 (237 connections)

BEHAVIORAL SIGNATURES
[!] [4/5] injection_createremotethread: Injects code into remote process
[!] [4/5] persistence_autorun: Modifies Run registry key for persistence
[!] [3/5] network_cnc_http: Performs HTTP C2 communication
[*] [2/5] antiav_detectfile: Checks for antivirus product files

DROPPED FILES
payload.dll    SHA-256: abc123... Size: 98304  Type: PE32 DLL
svchost_fake.exe SHA-256: def456... Size: 184320 Type: PE32 EXE
```

© mahipal · Apache-2.0 · mukul975/Anthropic-Cybersecurity-Skills

Похожие скиллы

Всё по теме «Безопасность» →
ctf-malware ljagiello Скилл помогает разбирать вредоносные образцы и сетевой трафик в CTF-задачах. Пригодится для PE, .NET, обфусцированных скриптов, PCAP и C2-протоколов. CX Codex +1 8 700установок malware-warning-avast-keygen reason-machines Скилл распознаёт репозиторий, который выдаёт себя за кряк Avast Premium Security, и объясняет, почему запускать оттуда файлы нельзя. CX Codex +1 1 100установок malware-analysis-dragonflyTomb-avast reason-machines Скилл для анализа репозиториев, которые выдают себя за установщики антивируса. Помогает отличить подделку от настоящего дистрибутива. CX Codex +1 1 000установок sandbox-guard UseAI-pro Генерирует конфигурацию Docker-песочницы, чтобы запускать недоверенные скиллы OpenClaw без риска для системы. Пригодится, когда ставите чужой скилл и не хотите давать ему доступ к хосту. CX Codex +1 483установок generate-sandbox-policy NVIDIA Создаёт YAML-политики sandbox для доступа к API и настраивает сетевые middleware. Нужен, когда доступ требуется ограничить по хосту, методу или пути. CX Codex +1 470установок deno-sandbox denoland Скилл учит агента работать с SDK @deno/sandbox: изолированные microVM для чужого и сгенерированного ИИ кода. CX Codex +1 358установок

Из того же набора89

analyzing-network-flow-data-with-netflow Скилл разбирает записи NetFlow v9 и IPFIX, ищет аномалии по объёму, сканирование портов, утечку данных и периодические обращения к C2. CX Codex +1 372установок analyzing-heap-spray-exploitation Скилл для анализа дампов памяти: ищет следы heap spray, NOP-следы и внедрённый шелл-код через плагины Volatility3. CX Codex +1 372установок analyzing-malware-sandbox-evasion-techniques Разбирает отчёты Cuckoo и AnyRun и находит в них признаки того, что образец распознал песочницу и притворился безвредным. CX Codex +1 363установок exploiting-idor-vulnerabilities Помогает находить и проверять IDOR-уязвимости в API через манипуляцию идентификаторами в Burp Suite и curl при авторизованном пентесте. CX Codex +1 365установок testing-for-sensitive-data-exposure Скилл для проверки веб-приложений и API на утечку секретов, PII и незашифрованную передачу данных. Пригодится на авторизованном пентесте и при аудите под GDPR, PCI DSS или HIPAA. CX Codex +1 356установок performing-security-headers-audit Проверяет заголовки безопасности HTTP, включая CSP, HSTS и параметры cookie. Помогает найти уязвимые места в защите веб-приложения на уровне браузера. CX Codex +1 359установок analyzing-malware-persistence-with-autoruns Скилл ведёт агента по разбору точек автозапуска Windows через Sysinternals Autoruns: реестр, службы, задачи, драйверы. Пригодится при реагировании на инцидент. CX Codex +1 356установок analyzing-memory-dumps-with-volatility Скилл помогает расследовать дампы оперативной памяти через Volatility 3: выявляет скрытые процессы, инъекции кода, открытые сокеты и извлекает пароли из RAM. CX Codex +1 354установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой