- Step 1: Calculate File Hash
šÆ Goal: Generate SHA256 hash for malware identification
š Why This Matters:
File hashes are unique fingerprints. Before analyzing malware, calculate its hash to check against threat intelligence databases (VirusTotal, MISP). This quickly identifies known malware without risking execution.
š» Command:
sha256sum /samples/suspicious.exe
š What This Does:
⢠Generates unique 256-bit hash of file
⢠Hash changes if even 1 byte is modified
⢠Used to search threat intel databases
š Exam Tip: Know hash types: MD5 (weak, deprecated), SHA1 (weak), SHA256 (standard), SHA512 (high security).
- Step 2: Extract Strings
šÆ Goal: Find readable text in the binary
š Why This Matters:
Strings reveal malware capabilities without execution: C2 server URLs, registry keys modified, files created, error messages, and attacker comments. This is safe static analysis that exposes intent.
š» Command:
strings /samples/suspicious.exe | grep -E "(http|\.exe|reg|cmd|password)"
š What to Look For:
⢠URLs - C2 communication
⢠Registry paths - Persistence mechanisms
⢠File paths - Payload drops
⢠Commands - System manipulation
⢠Encoded strings - Obfuscation attempts
š” Analysis Tip: Base64 encoded strings often hide malicious URLs. Decode with: echo "string" | base64 -d
- Step 3: Check File Type
šÆ Goal: Verify actual file format vs extension
š Why This Matters:
Attackers disguise malware with fake extensions (invoice.pdf.exe, image.jpg.scr). The file command reads magic bytes to determine actual type, exposing extension spoofing attacks.
š» Command:
file /samples/suspicious.exe
š Common Disguises:
⢠.pdf.exe - Exploits hidden extensions
⢠.jpg.scr - Screensaver masquerading as image
⢠.doc.js - JavaScript in Office disguise
⢠Double extensions trick users
- Step 4: Submit to Cuckoo Sandbox
šÆ Goal: Submit sample to automated sandbox for dynamic analysis
š Why This Matters:
Cuckoo Sandbox is a real open-source malware analysis system. It runs malware in isolated VMs, monitors all behavior, and generates detailed reports. Used by security teams worldwide.
š» Command:
cuckoo submit /samples/suspicious.exe
š Cuckoo Features:
⢠Automated VM execution
⢠API hooking and syscall monitoring
⢠Network traffic capture (InetSim)
⢠Memory dumps for forensics
⢠Behavioral signatures database
ā ļø Real Tool: Cuckoo Sandbox - https://cuckoosandbox.org
- Step 5: Review Cuckoo Analysis
šÆ Goal: Examine automated analysis results
š Why This Matters:
Cuckoo's analysis reveals runtime behavior: process trees, file drops, registry changes, network connections. The severity score and triggered signatures help prioritize response.
š» Command:
cuckoo analyze 1547
š Analysis Report Sections:
⢠Severity score (0-10)
⢠Behavioral signatures triggered
⢠Network activity (DNS, HTTP, TCP)
⢠File system changes
⢠Registry modifications
⢠Process tree
- Step 6: Analyze Network Capture
šÆ Goal: Examine C2 communication from PCAP
š Why This Matters:
Cuckoo captures all network traffic during execution. Using tcpdump to read this PCAP reveals exact C2 communications, data exfiltration, and payload downloads.
š» Command:
cat /opt/cuckoo/storage/analyses/1547/network.pcap | tcpdump -r - -nn
š Network IOCs:
⢠C2 server IPs and ports
⢠Beacon intervals
⢠Data exfiltration volume
⢠Protocol patterns
š Real Tool: tcpdump - standard packet analyzer on all Linux systems
- Step 7: Memory Forensics with Volatility
šÆ Goal: Analyze memory dump for injected code
š Why This Matters:
Volatility Framework is the industry-standard memory forensics tool. It extracts process trees, detects code injection, finds hidden processes, and recovers encryption keys from RAM.
š» Command:
volatility -f /opt/cuckoo/storage/analyses/1547/memory.dmp --profile=Win10x64 pstree
š Volatility Capabilities:
⢠Process tree analysis (pstree)
⢠Injected code detection (malfind)
⢠Network connections (netscan)
⢠Registry extraction (hivelist)
⢠Password hashes (hashdump)
š” Real Tool: Volatility Framework - https://volatilityfoundation.org
- Step 8: Extract IOCs with jq
šÆ Goal: Parse Cuckoo JSON report to extract IOCs
š Why This Matters:
Cuckoo generates JSON reports with all findings. Using jq (command-line JSON processor) extracts specific IOCs for import into SIEM, EDR, and threat intel platforms.
š» Command:
cat /opt/cuckoo/storage/analyses/1547/reports/report.json | jq '.signatures,.network.hosts' > /reports/iocs.json && echo "IOC report generated"
š Extracted IOCs:
⢠File hashes (MD5, SHA1, SHA256)
⢠Network indicators (IPs, domains, URLs)
⢠YARA rule matches
⢠Behavioral signatures
š Real Tools: jq for JSON parsing, STIX/TAXII for sharing threat intel