Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Collect volatile forensic evidence from a compromised system following order of volatility, preserving memory, network connections, processes, and system state before they are lost.
.claude/skills/collecting-volatile-evidence-from-compromised-host/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-17 | ✗→✓ | ▲ Improved | — | — |
| case-03 | ✗→✓ | ▲ Improved | — | — |
| case-16 | ✗→✓ | ▲ Improved | — | — |
| case-01 | ✗→✓ | ▲ Improved | — | — |
| case-07 | ✗→✓ | ▲ Improved | — | — |
bash# Mount forensic USB toolkit (do NOT install tools on compromised system) # Verify toolkit integrity sha256sum /mnt/forensic_usb/tools/* > /tmp/toolkit_hashes.txt diff /mnt/forensic_usb/tools/known_good_hashes.txt /tmp/toolkit_hashes.txt # Create evidence output directory with timestamps EVIDENCE_DIR="/mnt/evidence/$(hostname)_$(date +%Y%m%d_%H%M%S)" mkdir -p "$EVIDENCE_DIR" echo "Collection started: $(date -u)" > "$EVIDENCE_DIR/collection_log.txt" echo "Collector: $(whoami)" >> "$EVIDENCE_DIR/collection_log.txt" echo "System: $(hostname)" >> "$EVIDENCE_DIR/collection_log.txt"
bash# Windows - WinPmem memory acquisition winpmem_mini_x64.exe "$EVIDENCE_DIR\memdump_$(hostname).raw" # Linux - LiME kernel module for memory acquisition insmod /mnt/forensic_usb/lime.ko "path=$EVIDENCE_DIR/memdump_$(hostname).lime format=lime" # Linux - Alternative using /proc/kcore dd if=/proc/kcore of="$EVIDENCE_DIR/kcore_dump.raw" bs=1M # macOS - osxpmem osxpmem -o "$EVIDENCE_DIR/memdump_$(hostname).aff4" # Hash the memory dump immediately sha256sum "$EVIDENCE_DIR/memdump_"* > "$EVIDENCE_DIR/memory_hash.sha256"
bash# Active network connections # Windows netstat -anob > "$EVIDENCE_DIR/netstat_connections.txt" 2>&1 Get-NetTCPConnection | Export-Csv "$EVIDENCE_DIR/tcp_connections.csv" -NoTypeInformation Get-NetUDPEndpoint | Export-Csv "$EVIDENCE_DIR/udp_endpoints.csv" -NoTypeInformation # Linux ss -tulnp > "$EVIDENCE_DIR/socket_stats.txt" netstat -anp > "$EVIDENCE_DIR/netstat_all.txt" 2>/dev/null cat /proc/net/tcp > "$EVIDENCE_DIR/proc_net_tcp.txt" cat /proc/net/udp > "$EVIDENCE_DIR/proc_net_udp.txt" # ARP cache arp -a > "$EVIDENCE_DIR/arp_cache.txt" # Routing table route print > "$EVIDENCE_DIR/routing_table.txt" # Windows ip route show > "$EVIDENCE_DIR/routing_table.txt" # Linux # DNS cache ipconfig /displaydns > "$EVIDENCE_DIR/dns_cache.txt" # Windows # Linux: varies by resolver, check systemd-resolve or nscd systemd-resolve --statistics > "$EVIDENCE_DIR/dns_stats.txt" 2>/dev/null # Active firewall rules netsh advfirewall show allprofiles > "$EVIDENCE_DIR/firewall_rules.txt" # Windows iptables -L -n -v > "$EVIDENCE_DIR/iptables_rules.txt" # Linux
bash# Windows - Detailed process list tasklist /V /FO CSV > "$EVIDENCE_DIR/process_list_verbose.csv" wmic process list full > "$EVIDENCE_DIR/wmic_process_full.txt" Get-Process | Select-Object Id,ProcessName,Path,StartTime,CPU,WorkingSet | Export-Csv "$EVIDENCE_DIR/ps_processes.csv" -NoTypeInformation # Windows - Process with command line and parent wmic process get ProcessId,Name,CommandLine,ParentProcessId,ExecutablePath /FORMAT:CSV > \ "$EVIDENCE_DIR/process_commandlines.csv" # Linux - Full process tree ps auxwwf > "$EVIDENCE_DIR/process_tree.txt" ps -eo pid,ppid,user,args --forest > "$EVIDENCE_DIR/process_forest.txt" cat /proc/*/cmdline 2>/dev/null | tr '\0' ' ' > "$EVIDENCE_DIR/proc_cmdline_all.txt" # Process modules/DLLs loaded # Windows listdlls.exe -accepteula > "$EVIDENCE_DIR/loaded_dlls.txt" # Linux for pid in $(ls /proc/ | grep -E '^[0-9]+$'); do echo "=== PID $pid ===" >> "$EVIDENCE_DIR/proc_maps.txt" cat "/proc/$pid/maps" 2>/dev/null >> "$EVIDENCE_DIR/proc_maps.txt" done # Open file handles handle.exe -accepteula > "$EVIDENCE_DIR/open_handles.txt" # Windows (Sysinternals) lsof > "$EVIDENCE_DIR/open_files.txt" # Linux
bash# Windows query user > "$EVIDENCE_DIR/logged_in_users.txt" query session > "$EVIDENCE_DIR/active_sessions.txt" net session > "$EVIDENCE_DIR/net_sessions.txt" 2>&1 net use > "$EVIDENCE_DIR/mapped_drives.txt" 2>&1 # Linux who > "$EVIDENCE_DIR/who_output.txt" w > "$EVIDENCE_DIR/w_output.txt" last -50 > "$EVIDENCE_DIR/last_logins.txt" lastlog > "$EVIDENCE_DIR/lastlog.txt" cat /var/log/auth.log | tail -200 > "$EVIDENCE_DIR/recent_auth.txt" 2>/dev/null
bash# System time (critical for timeline) date -u > "$EVIDENCE_DIR/system_time_utc.txt" w32tm /query /status > "$EVIDENCE_DIR/ntp_status.txt" # Windows ntpq -p > "$EVIDENCE_DIR/ntp_status.txt" # Linux # Environment variables set > "$EVIDENCE_DIR/environment_vars.txt" # Windows env > "$EVIDENCE_DIR/environment_vars.txt" # Linux # Scheduled tasks / Cron jobs schtasks /query /fo CSV /v > "$EVIDENCE_DIR/scheduled_tasks.csv" # Windows crontab -l > "$EVIDENCE_DIR/crontab_current.txt" 2>/dev/null # Linux ls -la /etc/cron.* > "$EVIDENCE_DIR/cron_dirs.txt" 2>/dev/null # Services sc queryex type=service state=all > "$EVIDENCE_DIR/services_all.txt" # Windows systemctl list-units --type=service --all > "$EVIDENCE_DIR/systemd_services.txt" # Linux # Windows Registry - key autostart locations reg export "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" "$EVIDENCE_DIR/reg_run_hklm.reg" /y reg export "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" "$EVIDENCE_DIR/reg_run_hkcu.reg" /y reg export "HKLM\SYSTEM\CurrentControlSet\Services" "$EVIDENCE_DIR/reg_services.reg" /y
bash# Generate SHA256 hashes for all collected evidence cd "$EVIDENCE_DIR" sha256sum * > evidence_manifest.sha256 # Create chain of custody record cat > "$EVIDENCE_DIR/chain_of_custody.txt" << EOF CHAIN OF CUSTODY RECORD ======================== Case ID: IR-YYYY-NNN Collection Date: $(date -u) Collected By: $(whoami) System: $(hostname) System IP: $(hostname -I 2>/dev/null || ipconfig | grep IPv4) Collection Method: Live forensic collection via trusted USB toolkit Evidence Items: $(ls -la "$EVIDENCE_DIR/" | grep -v chain_of_custody) SHA256 Manifest: evidence_manifest.sha256 Transfer: [TO BE COMPLETED] Storage Location: [TO BE COMPLETED] EOF
| Concept | Description | |---------|-------------| | Order of Volatility | RFC 3227 - Collect most volatile data first: registers > cache > memory > disk | | Live Forensics | Collecting evidence from a running system before shutdown | | Chain of Custody | Documentation tracking evidence handling from collection to court | | Forensic Soundness | Ensuring evidence collection doesn't alter the original evidence | | Trusted Tools | Using verified tools from external media, not from the compromised system | | Evidence Integrity | SHA256 hashing of all evidence immediately after collection | | Locard's Exchange Principle | Every contact leaves a trace - minimize investigator artifacts |
| Tool | Purpose | |------|---------| | WinPmem | Windows memory acquisition | | LiME (Linux Memory Extractor) | Linux kernel memory acquisition | | Sysinternals Suite | Process, handle, and DLL analysis (Windows) | | Velociraptor | Remote forensic collection at scale | | KAPE (Kroll Artifact Parser) | Automated artifact collection on Windows | | CyLR | Cross-platform live response collection | | GRR Rapid Response | Remote live forensics framework |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-23 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-24 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
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. 24 cases were attempted. The headline lift of +21 percentage points is the difference between those two pass rates over the 24 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.