Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Executes malware samples in Cuckoo Sandbox to observe runtime behavior including process creation, file system modifications, registry changes, network communications, and API calls. Generates comprehensive behavioral reports for malware classification and IOC extraction. Activates for requests involving dynamic malware analysis, sandbox detonation, behavioral analysis, or automated malware execution.
.claude/skills/analyzing-malware-behavior-with-cuckoo-sandbox/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | — | — |
| case-22 | ✗→✓ | ▲ Improved | — | — |
| case-18 | ✗→✓ | ▲ Improved | — | — |
| case-12 | ✗→✓ | ▲ Improved | — | — |
| case-13 | ✗→✓ | ▲ Improved | — | — |
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.
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 "file=@suspect.exe" -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'
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:
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})")
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
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}")
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")
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
| 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 |
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:
Pitfalls:
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| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-16 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +32 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.