/collecting-volatile-evidence-from-compromised-host
Collect volatile forensic evidence from a compromised host by following the order of volatility, preserving memory, network connections, running processes, and system state with documented chain of custody before they are lost. Use before isolating, shutting down, or remediating
$ npx -y skills add mukul975/Anthropic-Cybersecurity-Skills --skill collecting-volatile-evidence-from-compromised-host --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/collecting-volatile-evidence-from-compromised-host
Context preview
The summary Claude sees to decide when to auto-load this skill.
Collect volatile forensic evidence from a compromised host by following the order of volatility, preserving memory, network connections, running processes, and system state with documented chain of custody before they are lost. Use before isolating, shutting down, or remediating
SKILL.md
collecting-volatile-evidence-from-compromised-host.SKILL.mdname: collecting-volatile-evidence-from-compromised-host
description: Collect volatile forensic evidence from a compromised host by following the order of volatility, preserving memory, network connections, running processes, and system state with documented chain of custody before they are lost. Use before isolating, shutting down, or remediating a compromised host, especially when fileless or memory-resident malware is suspected, root cause analysis is needed, or the evidence must hold up in legal proceedings.
domain: cybersecurity
subdomain: incident-response
tags:
- incident-response
- dfir
- forensics
- volatile-evidence
- memory-forensics
- chain-of-custody
mitre_attack:
- T1059.001
- T1057
- T1049
- T1003.001
- T1543.003
version: '1.0'
author: mahipal
license: Apache-2.0
nist_csf:
- RS.MA-01
- RS.MA-02
- RS.AN-03
- RC.RP-01
Collecting Volatile Evidence from Compromised Hosts
When to Use
- Security incident confirmed and compromised host identified
- Before system isolation, shutdown, or remediation begins
- Memory-resident malware suspected (fileless attacks)
- Need to capture network connections, running processes, and system state
- Legal proceedings may require forensic evidence preservation
- Incident requires root cause analysis with volatile data
Prerequisites
- Forensic collection toolkit on USB or network share (trusted tools)
- WinPmem/LiME for memory acquisition
- Write-blocker or forensic workstation for disk imaging
- Chain of custody documentation forms
- Secure evidence storage with integrity verification
- Authorization to collect evidence (legal/HR approval for insider cases)
Workflow
Step 1: Prepare Collection Environment
# 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"
Step 2: Capture System Memory (Highest Volatility)
# 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"
Step 3: Capture Network State
# 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
Step 4: Capture Running Processes
# 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
Step 5: Capture Logged-in Users and Sessions
# 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
Step 6: Capture System Configuration State
# 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
Read more
name: collecting-volatile-evidence-from-compromised-host description: Collect volatile forensic evidence from a compromised host by following the order of volatility, preserving memory, network connections, running processes, and system state with documented chain of custody before they are lost. Use before isolating, shutting down, or remediating a compromised host, especially when fileless or memory-resident malware is suspected, root cause analysis is needed, or the evidence must hold up in legal proceedings. domain: cybersecurity subdomain: incident-response tags: - incident-response - dfir - forensics - volatile-evidence - memory-forensics - chain-of-custody mitre_attack: - T1059.001 - T1057 - T1049 - T1003.001 - T1543.003 version: '1.0' author: mahipal license: Apache-2.0 nist_csf: - RS.MA-01 - RS.MA-02 - RS.AN-03 - RC.RP-01
Collecting Volatile Evidence from Compromised Hosts
When to Use
- Security incident confirmed and compromised host identified
- Before system isolation, shutdown, or remediation begins
- Memory-resident malware suspected (fileless attacks)
- Need to capture network connections, running processes, and system state
- Legal proceedings may require forensic evidence preservation
- Incident requires root cause analysis with volatile data
Prerequisites
- Forensic collection toolkit on USB or network share (trusted tools)
- WinPmem/LiME for memory acquisition
- Write-blocker or forensic workstation for disk imaging
- Chain of custody documentation forms
- Secure evidence storage with integrity verification
- Authorization to collect evidence (legal/HR approval for insider cases)
Workflow
Step 1: Prepare Collection Environment
# 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"
Step 2: Capture System Memory (Highest Volatility)
# 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"
Step 3: Capture Network State
# 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
Step 4: Capture Running Processes
# 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
Step 5: Capture Logged-in Users and Sessions
# 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
Step 6: Capture System Configuration State
# 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
817 structured cybersecurity skills for AI agents · Mapped to 6 frameworks: MITRE ATT&CK, NIST CSF 2.0, MITRE ATLAS, D3FEND, NIST AI RMF & MITRE F3 (Fight Fraud) · agentskills.io standard · Works with Claude Code, GitHub Copilot, Codex CLI, Cursor, Gemini CLI & 20+ platforms · 29 security domains · Apache 2.0
Repo: mukul975/Anthropic-Cybersecurity-Skills
Other skills on cybersecurity-skills.
- /abusing-dpapi-for-credential-access
Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys) online or offline using SharpDPAPI, SharpChrome, Mimikatz, or Impacket's dpapi.py, including domain-wide decryption via the DPAPI backup key. Use
Open skill - /abusing-shadow-credentials-for-privesc
Take over Active Directory accounts by writing attacker-controlled public keys to msDS-KeyCredentialLink (Shadow Credentials) with pyWhisker, Whisker, or Certipy, then authenticate via PKINIT to recover the target's NT hash without a password reset. Use when BloodHound shows
Open skill - /achieving-cmmc-level-2-compliance
Prepare a defense-contractor environment for CMMC Level 2 certification: scope CUI and FCI, implement the 110 NIST SP 800-171 Rev 2 security requirements across 14 families, compute the SPRS score with the DoD Assessment Methodology, manage a compliant POA&M, and ready the
Open skill - /acquiring-disk-image-with-dd-and-dcfldd
Create forensically sound bit-for-bit disk images with dd or dcfldd on a Linux forensic workstation, preserving evidence integrity through hash verification (MD5/SHA) during acquisition. Use when imaging a suspect drive, USB device, or memory card for investigation, preserving
Open skill - /analyzing-active-directory-acl-abuse
Detect dangerous ACL misconfigurations in Active Directory using ldap3
Open skill - /analyzing-android-malware-with-apktool
Perform static analysis of Android APK malware using apktool for resource decompilation, jadx for Java source recovery, and androguard for manifest inspection, dangerous permission-combination detection, and identification of obfuscated code, dynamic code loading, and
Open skill

