[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AE1Y0CYAF8SVK3E800E34M":3,"skill-same:01M6AE1Y0CYAF8SVK3E800E34M":124},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":47,"linkOnly":48,"markdownContent":49,"markdownBody":50,"frontMatter":51,"refName":65,"commitSha":66,"skillDirectory":67,"forksCount":68,"repositoryHtmlUrl":69,"repositoryHomepageUrl":70,"ownerHtmlUrl":71,"ownerBlogUrl":72,"ownerDescription":73,"updatedAt":74,"install":75,"resources":88},"01M6AE1Y0CYAF8SVK3E800E34M","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 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.","通过遵循易失性顺序，从受损主机收集易失性取证证据，在内存、网络连接、运行进程和系统状态丢失之前将其保存，并记录完整的监管链。在隔离、关闭或修复受损主机之前使用，尤其当怀疑存在无文件（fileless）或内存驻留恶意软件、需要根本原因分析、或证据必须在法律程序中成立时。","mukul975\u002FAnthropic-Cybersecurity-Skills","mukul975","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42860185?v=4","01M6ADEQR8T5M4EEG6C67BQCWF","Mahipal","01M6ADJPMYWG1E5GM1FWBE3128",36146,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fcollecting-volatile-evidence-from-compromised-host\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BR4MYFKGCC4WCWVJ50KJ2C","安全工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BTHYSJPJ500X64JJ5CH06D","安全事件响应与威胁狩猎","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],"collecting volatile evidence from compromised host","memory","cybersecurity","root cause analysis","state","collect","forensics","malware","memory-forensics","dfir","incident-response","Volatility","network","T1059.001","volatile-evidence","chain-of-custody","2026-11-10 10:12:30",false,"---\nname: collecting-volatile-evidence-from-compromised-host\ndescription: 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.\ndomain: cybersecurity\nsubdomain: incident-response\ntags:\n- incident-response\n- dfir\n- forensics\n- volatile-evidence\n- memory-forensics\n- chain-of-custody\nmitre_attack:\n- T1059.001\n- T1057\n- T1049\n- T1003.001\n- T1543.003\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- RS.MA-01\n- RS.MA-02\n- RS.AN-03\n- RC.RP-01\n---\n\n# Collecting Volatile Evidence from Compromised Hosts\n\n## When to Use\n- Security incident confirmed and compromised host identified\n- Before system isolation, shutdown, or remediation begins\n- Memory-resident malware suspected (fileless attacks)\n- Need to capture network connections, running processes, and system state\n- Legal proceedings may require forensic evidence preservation\n- Incident requires root cause analysis with volatile data\n\n## Prerequisites\n- Forensic collection toolkit on USB or network share (trusted tools)\n- WinPmem\u002FLiME for memory acquisition\n- Write-blocker or forensic workstation for disk imaging\n- Chain of custody documentation forms\n- Secure evidence storage with integrity verification\n- Authorization to collect evidence (legal\u002FHR approval for insider cases)\n\n## Workflow\n\n### Step 1: Prepare Collection Environment\n```bash\n# Mount forensic USB toolkit (do NOT install tools on compromised system)\n# Verify toolkit integrity\nsha256sum \u002Fmnt\u002Fforensic_usb\u002Ftools\u002F* > \u002Ftmp\u002Ftoolkit_hashes.txt\ndiff \u002Fmnt\u002Fforensic_usb\u002Ftools\u002Fknown_good_hashes.txt \u002Ftmp\u002Ftoolkit_hashes.txt\n\n# Create evidence output directory with timestamps\nEVIDENCE_DIR=\"\u002Fmnt\u002Fevidence\u002F$(hostname)_$(date +%Y%m%d_%H%M%S)\"\nmkdir -p \"$EVIDENCE_DIR\"\necho \"Collection started: $(date -u)\" > \"$EVIDENCE_DIR\u002Fcollection_log.txt\"\necho \"Collector: $(whoami)\" >> \"$EVIDENCE_DIR\u002Fcollection_log.txt\"\necho \"System: $(hostname)\" >> \"$EVIDENCE_DIR\u002Fcollection_log.txt\"\n```\n\n### Step 2: Capture System Memory (Highest Volatility)\n```bash\n# Windows - WinPmem memory acquisition\nwinpmem_mini_x64.exe \"$EVIDENCE_DIR\\memdump_$(hostname).raw\"\n\n# Linux - LiME kernel module for memory acquisition\ninsmod \u002Fmnt\u002Fforensic_usb\u002Flime.ko \"path=$EVIDENCE_DIR\u002Fmemdump_$(hostname).lime format=lime\"\n\n# Linux - Alternative using \u002Fproc\u002Fkcore\ndd if=\u002Fproc\u002Fkcore of=\"$EVIDENCE_DIR\u002Fkcore_dump.raw\" bs=1M\n\n# macOS - osxpmem\nosxpmem -o \"$EVIDENCE_DIR\u002Fmemdump_$(hostname).aff4\"\n\n# Hash the memory dump immediately\nsha256sum \"$EVIDENCE_DIR\u002Fmemdump_\"* > \"$EVIDENCE_DIR\u002Fmemory_hash.sha256\"\n```\n\n### Step 3: Capture Network State\n```bash\n# Active network connections\n# Windows\nnetstat -anob > \"$EVIDENCE_DIR\u002Fnetstat_connections.txt\" 2>&1\nGet-NetTCPConnection | Export-Csv \"$EVIDENCE_DIR\u002Ftcp_connections.csv\" -NoTypeInformation\nGet-NetUDPEndpoint | Export-Csv \"$EVIDENCE_DIR\u002Fudp_endpoints.csv\" -NoTypeInformation\n\n# Linux\nss -tulnp > \"$EVIDENCE_DIR\u002Fsocket_stats.txt\"\nnetstat -anp > \"$EVIDENCE_DIR\u002Fnetstat_all.txt\" 2>\u002Fdev\u002Fnull\ncat \u002Fproc\u002Fnet\u002Ftcp > \"$EVIDENCE_DIR\u002Fproc_net_tcp.txt\"\ncat \u002Fproc\u002Fnet\u002Fudp > \"$EVIDENCE_DIR\u002Fproc_net_udp.txt\"\n\n# ARP cache\narp -a > \"$EVIDENCE_DIR\u002Farp_cache.txt\"\n\n# Routing table\nroute print > \"$EVIDENCE_DIR\u002Frouting_table.txt\"  # Windows\nip route show > \"$EVIDENCE_DIR\u002Frouting_table.txt\"  # Linux\n\n# DNS cache\nipconfig \u002Fdisplaydns > \"$EVIDENCE_DIR\u002Fdns_cache.txt\"  # Windows\n# Linux: varies by resolver, check systemd-resolve or nscd\nsystemd-resolve --statistics > \"$EVIDENCE_DIR\u002Fdns_stats.txt\" 2>\u002Fdev\u002Fnull\n\n# Active firewall rules\nnetsh advfirewall show allprofiles > \"$EVIDENCE_DIR\u002Ffirewall_rules.txt\"  # Windows\niptables -L -n -v > \"$EVIDENCE_DIR\u002Fiptables_rules.txt\"  # Linux\n```\n\n### Step 4: Capture Running Processes\n```bash\n# Windows - Detailed process list\ntasklist \u002FV \u002FFO CSV > \"$EVIDENCE_DIR\u002Fprocess_list_verbose.csv\"\nwmic process list full > \"$EVIDENCE_DIR\u002Fwmic_process_full.txt\"\nGet-Process | Select-Object Id,ProcessName,Path,StartTime,CPU,WorkingSet |\n  Export-Csv \"$EVIDENCE_DIR\u002Fps_processes.csv\" -NoTypeInformation\n\n# Windows - Process with command line and parent\nwmic process get ProcessId,Name,CommandLine,ParentProcessId,ExecutablePath \u002FFORMAT:CSV > \\\n  \"$EVIDENCE_DIR\u002Fprocess_commandlines.csv\"\n\n# Linux - Full process tree\nps auxwwf > \"$EVIDENCE_DIR\u002Fprocess_tree.txt\"\nps -eo pid,ppid,user,args --forest > \"$EVIDENCE_DIR\u002Fprocess_forest.txt\"\ncat \u002Fproc\u002F*\u002Fcmdline 2>\u002Fdev\u002Fnull | tr '\\0' ' ' > \"$EVIDENCE_DIR\u002Fproc_cmdline_all.txt\"\n\n# Process modules\u002FDLLs loaded\n# Windows\nlistdlls.exe -accepteula > \"$EVIDENCE_DIR\u002Floaded_dlls.txt\"\n# Linux\nfor pid in $(ls \u002Fproc\u002F | grep -E '^[0-9]+$'); do\n  echo \"=== PID $pid ===\" >> \"$EVIDENCE_DIR\u002Fproc_maps.txt\"\n  cat \"\u002Fproc\u002F$pid\u002Fmaps\" 2>\u002Fdev\u002Fnull >> \"$EVIDENCE_DIR\u002Fproc_maps.txt\"\ndone\n\n# Open file handles\nhandle.exe -accepteula > \"$EVIDENCE_DIR\u002Fopen_handles.txt\"  # Windows (Sysinternals)\nlsof > \"$EVIDENCE_DIR\u002Fopen_files.txt\"  # Linux\n```\n\n### Step 5: Capture Logged-in Users and Sessions\n```bash\n# Windows\nquery user > \"$EVIDENCE_DIR\u002Flogged_in_users.txt\"\nquery session > \"$EVIDENCE_DIR\u002Factive_sessions.txt\"\nnet session > \"$EVIDENCE_DIR\u002Fnet_sessions.txt\" 2>&1\nnet use > \"$EVIDENCE_DIR\u002Fmapped_drives.txt\" 2>&1\n\n# Linux\nwho > \"$EVIDENCE_DIR\u002Fwho_output.txt\"\nw > \"$EVIDENCE_DIR\u002Fw_output.txt\"\nlast -50 > \"$EVIDENCE_DIR\u002Flast_logins.txt\"\nlastlog > \"$EVIDENCE_DIR\u002Flastlog.txt\"\ncat \u002Fvar\u002Flog\u002Fauth.log | tail -200 > \"$EVIDENCE_DIR\u002Frecent_auth.txt\" 2>\u002Fdev\u002Fnull\n```\n\n### Step 6: Capture System Configuration State\n```bash\n# System time (critical for timeline)\ndate -u > \"$EVIDENCE_DIR\u002Fsystem_time_utc.txt\"\nw32tm \u002Fquery \u002Fstatus > \"$EVIDENCE_DIR\u002Fntp_status.txt\"  # Windows\nntpq -p > \"$EVIDENCE_DIR\u002Fntp_status.txt\"  # Linux\n\n# Environment variables\nset > \"$EVIDENCE_DIR\u002Fenvironment_vars.txt\"  # Windows\nenv > \"$EVIDENCE_DIR\u002Fenvironment_vars.txt\"  # Linux\n\n# Scheduled tasks \u002F Cron jobs\nschtasks \u002Fquery \u002Ffo CSV \u002Fv > \"$EVIDENCE_DIR\u002Fscheduled_tasks.csv\"  # Windows\ncrontab -l > \"$EVIDENCE_DIR\u002Fcrontab_current.txt\" 2>\u002Fdev\u002Fnull  # Linux\nls -la \u002Fetc\u002Fcron.* > \"$EVIDENCE_DIR\u002Fcron_dirs.txt\" 2>\u002Fdev\u002Fnull\n\n# Services\nsc queryex type=service state=all > \"$EVIDENCE_DIR\u002Fservices_all.txt\"  # Windows\nsystemctl list-units --type=service --all > \"$EVIDENCE_DIR\u002Fsystemd_services.txt\"  # Linux\n\n# Windows Registry - key autostart locations\nreg export \"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" \"$EVIDENCE_DIR\u002Freg_run_hklm.reg\" \u002Fy\nreg export \"HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" \"$EVIDENCE_DIR\u002Freg_run_hkcu.reg\" \u002Fy\nreg export \"HKLM\\SYSTEM\\CurrentControlSet\\Services\" \"$EVIDENCE_DIR\u002Freg_services.reg\" \u002Fy\n```\n\n### Step 7: Hash All Evidence and Document Chain of Custody\n```bash\n# Generate SHA256 hashes for all collected evidence\ncd \"$EVIDENCE_DIR\"\nsha256sum * > evidence_manifest.sha256\n\n# Create chain of custody record\ncat > \"$EVIDENCE_DIR\u002Fchain_of_custody.txt\" \u003C\u003C EOF\nCHAIN OF CUSTODY RECORD\n========================\nCase ID: IR-YYYY-NNN\nCollection Date: $(date -u)\nCollected By: $(whoami)\nSystem: $(hostname)\nSystem IP: $(hostname -I 2>\u002Fdev\u002Fnull || ipconfig | grep IPv4)\nCollection Method: Live forensic collection via trusted USB toolkit\n\nEvidence Items:\n$(ls -la \"$EVIDENCE_DIR\u002F\" | grep -v chain_of_custody)\n\nSHA256 Manifest: evidence_manifest.sha256\nTransfer: [TO BE COMPLETED]\nStorage Location: [TO BE COMPLETED]\nEOF\n```\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Order of Volatility | RFC 3227 - Collect most volatile data first: registers > cache > memory > disk |\n| Live Forensics | Collecting evidence from a running system before shutdown |\n| Chain of Custody | Documentation tracking evidence handling from collection to court |\n| Forensic Soundness | Ensuring evidence collection doesn't alter the original evidence |\n| Trusted Tools | Using verified tools from external media, not from the compromised system |\n| Evidence Integrity | SHA256 hashing of all evidence immediately after collection |\n| Locard's Exchange Principle | Every contact leaves a trace - minimize investigator artifacts |\n\n## Tools & Systems\n\n| Tool | Purpose |\n|------|---------|\n| WinPmem | Windows memory acquisition |\n| LiME (Linux Memory Extractor) | Linux kernel memory acquisition |\n| Sysinternals Suite | Process, handle, and DLL analysis (Windows) |\n| Velociraptor | Remote forensic collection at scale |\n| KAPE (Kroll Artifact Parser) | Automated artifact collection on Windows |\n| CyLR | Cross-platform live response collection |\n| GRR Rapid Response | Remote live forensics framework |\n\n## Common Scenarios\n\n1. **Fileless Malware Attack**: PowerShell-based attack with no files on disk. Memory dump is critical evidence containing the malicious scripts.\n2. **Active C2 Session**: Attacker has live connection. Network connections and process data reveal C2 infrastructure.\n3. **Insider Data Theft**: Employee copying files. Process list, mapped drives, and network connections show exfiltration activity.\n4. **Compromised Web Server**: Web shell detected. Memory may contain additional backdoors not yet written to disk.\n5. **Lateral Movement in Progress**: Attacker moving between systems. Authentication tokens and network sessions in memory reveal scope.\n\n## Output Format\n- Memory dump file (.raw or .lime format) with SHA256 hash\n- Network state captures (connections, ARP, DNS, routes)\n- Process listings with command lines and parent processes\n- User session and authentication data\n- System configuration snapshots\n- Evidence manifest with SHA256 checksums\n- Chain of custody documentation\n","# Collecting Volatile Evidence from Compromised Hosts\n\n## When to Use\n- Security incident confirmed and compromised host identified\n- Before system isolation, shutdown, or remediation begins\n- Memory-resident malware suspected (fileless attacks)\n- Need to capture network connections, running processes, and system state\n- Legal proceedings may require forensic evidence preservation\n- Incident requires root cause analysis with volatile data\n\n## Prerequisites\n- Forensic collection toolkit on USB or network share (trusted tools)\n- WinPmem\u002FLiME for memory acquisition\n- Write-blocker or forensic workstation for disk imaging\n- Chain of custody documentation forms\n- Secure evidence storage with integrity verification\n- Authorization to collect evidence (legal\u002FHR approval for insider cases)\n\n## Workflow\n\n### Step 1: Prepare Collection Environment\n```bash\n# Mount forensic USB toolkit (do NOT install tools on compromised system)\n# Verify toolkit integrity\nsha256sum \u002Fmnt\u002Fforensic_usb\u002Ftools\u002F* > \u002Ftmp\u002Ftoolkit_hashes.txt\ndiff \u002Fmnt\u002Fforensic_usb\u002Ftools\u002Fknown_good_hashes.txt \u002Ftmp\u002Ftoolkit_hashes.txt\n\n# Create evidence output directory with timestamps\nEVIDENCE_DIR=\"\u002Fmnt\u002Fevidence\u002F$(hostname)_$(date +%Y%m%d_%H%M%S)\"\nmkdir -p \"$EVIDENCE_DIR\"\necho \"Collection started: $(date -u)\" > \"$EVIDENCE_DIR\u002Fcollection_log.txt\"\necho \"Collector: $(whoami)\" >> \"$EVIDENCE_DIR\u002Fcollection_log.txt\"\necho \"System: $(hostname)\" >> \"$EVIDENCE_DIR\u002Fcollection_log.txt\"\n```\n\n### Step 2: Capture System Memory (Highest Volatility)\n```bash\n# Windows - WinPmem memory acquisition\nwinpmem_mini_x64.exe \"$EVIDENCE_DIR\\memdump_$(hostname).raw\"\n\n# Linux - LiME kernel module for memory acquisition\ninsmod \u002Fmnt\u002Fforensic_usb\u002Flime.ko \"path=$EVIDENCE_DIR\u002Fmemdump_$(hostname).lime format=lime\"\n\n# Linux - Alternative using \u002Fproc\u002Fkcore\ndd if=\u002Fproc\u002Fkcore of=\"$EVIDENCE_DIR\u002Fkcore_dump.raw\" bs=1M\n\n# macOS - osxpmem\nosxpmem -o \"$EVIDENCE_DIR\u002Fmemdump_$(hostname).aff4\"\n\n# Hash the memory dump immediately\nsha256sum \"$EVIDENCE_DIR\u002Fmemdump_\"* > \"$EVIDENCE_DIR\u002Fmemory_hash.sha256\"\n```\n\n### Step 3: Capture Network State\n```bash\n# Active network connections\n# Windows\nnetstat -anob > \"$EVIDENCE_DIR\u002Fnetstat_connections.txt\" 2>&1\nGet-NetTCPConnection | Export-Csv \"$EVIDENCE_DIR\u002Ftcp_connections.csv\" -NoTypeInformation\nGet-NetUDPEndpoint | Export-Csv \"$EVIDENCE_DIR\u002Fudp_endpoints.csv\" -NoTypeInformation\n\n# Linux\nss -tulnp > \"$EVIDENCE_DIR\u002Fsocket_stats.txt\"\nnetstat -anp > \"$EVIDENCE_DIR\u002Fnetstat_all.txt\" 2>\u002Fdev\u002Fnull\ncat \u002Fproc\u002Fnet\u002Ftcp > \"$EVIDENCE_DIR\u002Fproc_net_tcp.txt\"\ncat \u002Fproc\u002Fnet\u002Fudp > \"$EVIDENCE_DIR\u002Fproc_net_udp.txt\"\n\n# ARP cache\narp -a > \"$EVIDENCE_DIR\u002Farp_cache.txt\"\n\n# Routing table\nroute print > \"$EVIDENCE_DIR\u002Frouting_table.txt\"  # Windows\nip route show > \"$EVIDENCE_DIR\u002Frouting_table.txt\"  # Linux\n\n# DNS cache\nipconfig \u002Fdisplaydns > \"$EVIDENCE_DIR\u002Fdns_cache.txt\"  # Windows\n# Linux: varies by resolver, check systemd-resolve or nscd\nsystemd-resolve --statistics > \"$EVIDENCE_DIR\u002Fdns_stats.txt\" 2>\u002Fdev\u002Fnull\n\n# Active firewall rules\nnetsh advfirewall show allprofiles > \"$EVIDENCE_DIR\u002Ffirewall_rules.txt\"  # Windows\niptables -L -n -v > \"$EVIDENCE_DIR\u002Fiptables_rules.txt\"  # Linux\n```\n\n### Step 4: Capture Running Processes\n```bash\n# Windows - Detailed process list\ntasklist \u002FV \u002FFO CSV > \"$EVIDENCE_DIR\u002Fprocess_list_verbose.csv\"\nwmic process list full > \"$EVIDENCE_DIR\u002Fwmic_process_full.txt\"\nGet-Process | Select-Object Id,ProcessName,Path,StartTime,CPU,WorkingSet |\n  Export-Csv \"$EVIDENCE_DIR\u002Fps_processes.csv\" -NoTypeInformation\n\n# Windows - Process with command line and parent\nwmic process get ProcessId,Name,CommandLine,ParentProcessId,ExecutablePath \u002FFORMAT:CSV > \\\n  \"$EVIDENCE_DIR\u002Fprocess_commandlines.csv\"\n\n# Linux - Full process tree\nps auxwwf > \"$EVIDENCE_DIR\u002Fprocess_tree.txt\"\nps -eo pid,ppid,user,args --forest > \"$EVIDENCE_DIR\u002Fprocess_forest.txt\"\ncat \u002Fproc\u002F*\u002Fcmdline 2>\u002Fdev\u002Fnull | tr '\\0' ' ' > \"$EVIDENCE_DIR\u002Fproc_cmdline_all.txt\"\n\n# Process modules\u002FDLLs loaded\n# Windows\nlistdlls.exe -accepteula > \"$EVIDENCE_DIR\u002Floaded_dlls.txt\"\n# Linux\nfor pid in $(ls \u002Fproc\u002F | grep -E '^[0-9]+$'); do\n  echo \"=== PID $pid ===\" >> \"$EVIDENCE_DIR\u002Fproc_maps.txt\"\n  cat \"\u002Fproc\u002F$pid\u002Fmaps\" 2>\u002Fdev\u002Fnull >> \"$EVIDENCE_DIR\u002Fproc_maps.txt\"\ndone\n\n# Open file handles\nhandle.exe -accepteula > \"$EVIDENCE_DIR\u002Fopen_handles.txt\"  # Windows (Sysinternals)\nlsof > \"$EVIDENCE_DIR\u002Fopen_files.txt\"  # Linux\n```\n\n### Step 5: Capture Logged-in Users and Sessions\n```bash\n# Windows\nquery user > \"$EVIDENCE_DIR\u002Flogged_in_users.txt\"\nquery session > \"$EVIDENCE_DIR\u002Factive_sessions.txt\"\nnet session > \"$EVIDENCE_DIR\u002Fnet_sessions.txt\" 2>&1\nnet use > \"$EVIDENCE_DIR\u002Fmapped_drives.txt\" 2>&1\n\n# Linux\nwho > \"$EVIDENCE_DIR\u002Fwho_output.txt\"\nw > \"$EVIDENCE_DIR\u002Fw_output.txt\"\nlast -50 > \"$EVIDENCE_DIR\u002Flast_logins.txt\"\nlastlog > \"$EVIDENCE_DIR\u002Flastlog.txt\"\ncat \u002Fvar\u002Flog\u002Fauth.log | tail -200 > \"$EVIDENCE_DIR\u002Frecent_auth.txt\" 2>\u002Fdev\u002Fnull\n```\n\n### Step 6: Capture System Configuration State\n```bash\n# System time (critical for timeline)\ndate -u > \"$EVIDENCE_DIR\u002Fsystem_time_utc.txt\"\nw32tm \u002Fquery \u002Fstatus > \"$EVIDENCE_DIR\u002Fntp_status.txt\"  # Windows\nntpq -p > \"$EVIDENCE_DIR\u002Fntp_status.txt\"  # Linux\n\n# Environment variables\nset > \"$EVIDENCE_DIR\u002Fenvironment_vars.txt\"  # Windows\nenv > \"$EVIDENCE_DIR\u002Fenvironment_vars.txt\"  # Linux\n\n# Scheduled tasks \u002F Cron jobs\nschtasks \u002Fquery \u002Ffo CSV \u002Fv > \"$EVIDENCE_DIR\u002Fscheduled_tasks.csv\"  # Windows\ncrontab -l > \"$EVIDENCE_DIR\u002Fcrontab_current.txt\" 2>\u002Fdev\u002Fnull  # Linux\nls -la \u002Fetc\u002Fcron.* > \"$EVIDENCE_DIR\u002Fcron_dirs.txt\" 2>\u002Fdev\u002Fnull\n\n# Services\nsc queryex type=service state=all > \"$EVIDENCE_DIR\u002Fservices_all.txt\"  # Windows\nsystemctl list-units --type=service --all > \"$EVIDENCE_DIR\u002Fsystemd_services.txt\"  # Linux\n\n# Windows Registry - key autostart locations\nreg export \"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" \"$EVIDENCE_DIR\u002Freg_run_hklm.reg\" \u002Fy\nreg export \"HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" \"$EVIDENCE_DIR\u002Freg_run_hkcu.reg\" \u002Fy\nreg export \"HKLM\\SYSTEM\\CurrentControlSet\\Services\" \"$EVIDENCE_DIR\u002Freg_services.reg\" \u002Fy\n```\n\n### Step 7: Hash All Evidence and Document Chain of Custody\n```bash\n# Generate SHA256 hashes for all collected evidence\ncd \"$EVIDENCE_DIR\"\nsha256sum * > evidence_manifest.sha256\n\n# Create chain of custody record\ncat > \"$EVIDENCE_DIR\u002Fchain_of_custody.txt\" \u003C\u003C EOF\nCHAIN OF CUSTODY RECORD\n========================\nCase ID: IR-YYYY-NNN\nCollection Date: $(date -u)\nCollected By: $(whoami)\nSystem: $(hostname)\nSystem IP: $(hostname -I 2>\u002Fdev\u002Fnull || ipconfig | grep IPv4)\nCollection Method: Live forensic collection via trusted USB toolkit\n\nEvidence Items:\n$(ls -la \"$EVIDENCE_DIR\u002F\" | grep -v chain_of_custody)\n\nSHA256 Manifest: evidence_manifest.sha256\nTransfer: [TO BE COMPLETED]\nStorage Location: [TO BE COMPLETED]\nEOF\n```\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Order of Volatility | RFC 3227 - Collect most volatile data first: registers > cache > memory > disk |\n| Live Forensics | Collecting evidence from a running system before shutdown |\n| Chain of Custody | Documentation tracking evidence handling from collection to court |\n| Forensic Soundness | Ensuring evidence collection doesn't alter the original evidence |\n| Trusted Tools | Using verified tools from external media, not from the compromised system |\n| Evidence Integrity | SHA256 hashing of all evidence immediately after collection |\n| Locard's Exchange Principle | Every contact leaves a trace - minimize investigator artifacts |\n\n## Tools & Systems\n\n| Tool | Purpose |\n|------|---------|\n| WinPmem | Windows memory acquisition |\n| LiME (Linux Memory Extractor) | Linux kernel memory acquisition |\n| Sysinternals Suite | Process, handle, and DLL analysis (Windows) |\n| Velociraptor | Remote forensic collection at scale |\n| KAPE (Kroll Artifact Parser) | Automated artifact collection on Windows |\n| CyLR | Cross-platform live response collection |\n| GRR Rapid Response | Remote live forensics framework |\n\n## Common Scenarios\n\n1. **Fileless Malware Attack**: PowerShell-based attack with no files on disk. Memory dump is critical evidence containing the malicious scripts.\n2. **Active C2 Session**: Attacker has live connection. Network connections and process data reveal C2 infrastructure.\n3. **Insider Data Theft**: Employee copying files. Process list, mapped drives, and network connections show exfiltration activity.\n4. **Compromised Web Server**: Web shell detected. Memory may contain additional backdoors not yet written to disk.\n5. **Lateral Movement in Progress**: Attacker moving between systems. Authentication tokens and network sessions in memory reveal scope.\n\n## Output Format\n- Memory dump file (.raw or .lime format) with SHA256 hash\n- Network state captures (connections, ARP, DNS, routes)\n- Process listings with command lines and parent processes\n- User session and authentication data\n- System configuration snapshots\n- Evidence manifest with SHA256 checksums\n- Chain of custody documentation\n",{"name":5,"tags":52,"author":53,"domain":33,"license":16,"version":54,"nist_csf":55,"subdomain":41,"description":7,"mitre_attack":60},[41,40,37,45,39,46],"mahipal","1.0",[56,57,58,59],"RS.MA-01","RS.MA-02","RS.AN-03","RC.RP-01",[44,61,62,63,64],"T1057","T1049","T1003.001","T1543.003","main","54a798831d2266a3ca61ce68a7acb80b81160d57","skills\u002Fcollecting-volatile-evidence-from-compromised-host",4425,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills","https:\u002F\u002Fmahipal.engineer\u002FAnthropic-Cybersecurity-Skills\u002F","https:\u002F\u002Fgithub.com\u002Fmukul975","Mahipal.engineer","🔐 Cybersecurity | 💻 Dev | 📷 Street Photographer\r\n🎓 MSc | 📚 Research & AI Security","2026-08-31 12:32:44",{"source":9,"skillName":5,"commands":76,"prompt":86,"zipAvailable":87},[77,80,83],{"tool":78,"command":79},"npx","npx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill collecting-volatile-evidence-from-compromised-host",{"tool":81,"command":82},"bunx","bunx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill collecting-volatile-evidence-from-compromised-host",{"tool":84,"command":85},"pnpm","pnpm dlx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill collecting-volatile-evidence-from-compromised-host","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fcollecting-volatile-evidence-from-compromised-host\u002FSKILL.md",true,[89,95,100,106,110,114,120],{"path":90,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":93,"sourceHtmlUrl":94},"assets\u002Ftemplate.md","ASSET","资产文件",2125,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fcollecting-volatile-evidence-from-compromised-host\u002Fassets\u002Ftemplate.md",{"path":96,"resourceType":96,"resourceTypeDesc":97,"sizeBytes":98,"sourceHtmlUrl":99},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fcollecting-volatile-evidence-from-compromised-host\u002FLICENSE",{"path":101,"resourceType":102,"resourceTypeDesc":103,"sizeBytes":104,"sourceHtmlUrl":105},"references\u002Fapi-reference.md","REFERENCE","参考文档",2075,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fcollecting-volatile-evidence-from-compromised-host\u002Freferences\u002Fapi-reference.md",{"path":107,"resourceType":102,"resourceTypeDesc":103,"sizeBytes":108,"sourceHtmlUrl":109},"references\u002Fstandards.md",3041,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fcollecting-volatile-evidence-from-compromised-host\u002Freferences\u002Fstandards.md",{"path":111,"resourceType":102,"resourceTypeDesc":103,"sizeBytes":112,"sourceHtmlUrl":113},"references\u002Fworkflows.md",4004,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fcollecting-volatile-evidence-from-compromised-host\u002Freferences\u002Fworkflows.md",{"path":115,"resourceType":116,"resourceTypeDesc":117,"sizeBytes":118,"sourceHtmlUrl":119},"scripts\u002Fagent.py","SCRIPT","脚本",7167,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fcollecting-volatile-evidence-from-compromised-host\u002Fscripts\u002Fagent.py",{"path":121,"resourceType":116,"resourceTypeDesc":117,"sizeBytes":122,"sourceHtmlUrl":123},"scripts\u002Fprocess.py",17820,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fcollecting-volatile-evidence-from-compromised-host\u002Fscripts\u002Fprocess.py",[125,157,186,217,247,279],{"skillNo":126,"name":127,"nameZh":128,"description":129,"descriptionZh":130,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":131,"categories":132,"keywords":137,"publishedAt":47},"01M6AGDM3HJXTKXX15ZZ0ZVCJ3","verifying-build-provenance-with-slsa-sigstore","SLSA 构建来源验证","Verifies artifact signatures and SLSA provenance using Sigstore's cosign (verify, verify-attestation, verify-blob-attestation) and slsa-verifier (verify-artifact), enforcing keyless OIDC builder identity and source repo against SLSA Build levels. Use in CI\u002FCD before deploying artifacts, when consuming third-party attestations, establishing a SLSA Build L3 pipeline, or confirming provenance during incident response or admission control.","使用 Sigstore 的 cosign（verify、verify-attestation、verify-blob-attestation）和 slsa-verifier（verify-artifact）验证工件签名和 SLSA 来源（provenance），强制校验 keyless OIDC 构建者身份和源仓库是否符合 SLSA Build 级别。适用于 CI\u002FCD 中部署工件前、消费第三方证明时、建立 SLSA Build L3 管道，或在事件响应或准入控制期间确认来源的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fverifying-build-provenance-with-slsa-sigstore\u002FSKILL.md",[133,134],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":135,"categoryName":136,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C32Q37WAMK06SGMFC02VFP","软件供应链安全",[138,139,140,141,142,33,143,144,145,146,147,148,149,150,151,152,153,154,155,156],"sigstore","provenance","slsa","verifying build provenance with slsa sigstore","security","incident response","identity","pr","code","artifacts","ci","supply-chain","pipeline","supply-chain-security","t1195","attestation","code-signing","cosign","keyless",{"skillNo":158,"name":159,"nameZh":160,"description":161,"descriptionZh":162,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":163,"categories":164,"keywords":169,"publishedAt":47},"01M6AGDGBPWYVZ2F11GFKJ4HZ9","validating-tpm-measured-boot-attestation","TPM 测量启动验证","Verifies TPM 2.0 measured-boot integrity and remote attestation with tpm2-tools -- reading PCRs (tpm2_pcrread), replaying the boot event log, generating and checking signed quotes (tpm2_quote\u002Ftpm2_checkquote), and sealing secrets to a PCR policy. Use to confirm a system booted trusted firmware\u002Fkernel for Zero Trust device posture, detect boot-chain tampering via PCR drift, or build a golden-value baseline for fleet attestation.","使用 tpm2-tools 验证 TPM 2.0 测量启动（measured boot）的完整性和远程证明：读取 PCR（tpm2_pcrread）、重放启动事件日志、生成并检查签名报价（tpm2_quote\u002Ftpm2_checkquote），以及将机密封印（seal）到 PCR 策略。适用于确认系统已启动可信固件\u002F内核以实现零信任（Zero Trust）设备状态、通过 PCR 漂移检测启动链篡改，或构建黄金值基线用于机群（fleet）证明。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-tpm-measured-boot-attestation\u002FSKILL.md",[165,166],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":167,"categoryName":168,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C89JJEXGGRGHS6XVXDA46K","终端安全加固",[170,153,171,172,142,173,33,145,174,175,176,177,178,179,180,181,182,183,184,185],"boot","TPM","validating tpm measured boot attestation","policy","verification","ZeRO","firmware","Tools","measured-boot","PCR","integrity","secrets","remote-attestation","tpm2-tools","integrity-verification","trusted-computing",{"skillNo":187,"name":188,"nameZh":189,"description":190,"descriptionZh":191,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":192,"categories":193,"keywords":200,"publishedAt":47},"01M6AGDCW0Y4FXZ3362GT1941M","validating-backup-integrity-for-recovery","备份完整性验证","Validates backup integrity through cryptographic hash verification, automated restore testing, corruption detection, and recoverability checks to confirm backups are reliable for disaster recovery and ransomware response. Use before relying on backups for recovery, when building post-backup validation pipelines, auditing backup infrastructure for compliance, or checking immutable\u002Fair-gapped backups for silent corruption or tampering.","通过加密哈希验证、自动化恢复测试、损坏检测和可恢复性检查来验证备份完整性，确认备份对于灾难恢复和勒索软件响应是可靠的。适用于在依赖备份进行恢复之前、构建备份后验证管道、审计备份基础设施以满足合规要求，或检查不可变\u002Fair-gapped（气隙）备份是否存在静默损坏或篡改的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-backup-integrity-for-recovery\u002FSKILL.md",[194,197],{"categoryNo":195,"categoryName":196,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD4WETX0HM3SM9QKQ15B","SRE 工程师",{"categoryNo":198,"categoryName":199,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSSTY86MWS6W5GDQWB1ADQ","备份与灾难恢复",[180,201,202,203,204,33,205,206,174,207,208,41,209,210,211,212,213,214,215,216],"backup","recovery","validating backup integrity for recovery","testing","infrastructure","validation","compliance","hash-verification","ransomware","cryptocurrency","detection","t1078","t1490","immutable","disaster-recovery","restore-testing",{"skillNo":218,"name":219,"nameZh":220,"description":221,"descriptionZh":222,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":223,"categories":224,"keywords":229,"publishedAt":47},"01M6AGD9GBG2KZ336AE763J3WH","triaging-windows-with-kape","KAPE Windows 取证收集","Runs KAPE (Kroll Artifact Parser and Extractor) to collect targeted forensic artifacts (registry hives, $MFT, event logs, prefetch, browser data) via Targets and parse them with Modules wrapping Eric Zimmerman's EZ Tools (PECmd, MFTECmd, RECmd). Use during early incident containment\u002Ftriage when full disk imaging is impractical but a defensible, parseable Windows artifact set is needed quickly, including at-scale remote collection.","运行 KAPE（Kroll Artifact Parser and Extractor），通过 Targets 收集目标取证工件（注册表配置单元、$MFT、事件日志、prefetch、浏览器数据），并使用封装 Eric Zimmerman 的 EZ Tools（PECmd、MFTECmd、RECmd）的 Modules 进行解析。适用于事件遏制\u002F分诊早期阶段——此时完整磁盘镜像不切实际，但需要快速获得可采信、可解析的 Windows 工件集，包括大规模远程收集。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-windows-with-kape\u002FSKILL.md",[225,226],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":227,"categoryName":228,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C9JZH3GWXPJ6CQG5P7J48Y","数字取证与电子证据分析",[230,231,232,33,233,234,235,236,40,237,238,239,240,241,242,243,177,244,245,246],"windows","kape","triaging windows with kape","registry","browser","logs","windows-forensics","mft","mftecmd","data","prefetch","eric-zimmerman","digital-forensics","SET","collection","pecmd","artifact-collection",{"skillNo":248,"name":249,"nameZh":250,"description":251,"descriptionZh":252,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":253,"categories":254,"keywords":259,"publishedAt":47},"01M6AGD5PW5J4EVZM958WD74ZQ","triaging-vulnerabilities-with-ssvc-framework","SSVC 漏洞优先级分诊","Triages and prioritizes vulnerabilities with CISA's Stakeholder-Specific Vulnerability Categorization (SSVC) decision tree, weighing exploitation status (via the CISA KEV catalog and FIRST EPSS API), technical impact, automatability, and mission prevalence to output Track\u002FTrack*\u002FAttend\u002FAct decisions. Use when prioritizing vulnerability scan results (OpenVAS, Nessus, Qualys) for remediation planning beyond raw CVSS scores.","使用 CISA 的 Stakeholder-Specific Vulnerability Categorization（SSVC，利益相关方特定漏洞分类）决策树对漏洞进行分诊和优先级排序，权衡利用状态（通过 CISA KEV 目录和 FIRST EPSS API）、技术影响、自动化程度和任务普遍性，输出 Track\u002FTrack*\u002FAttend\u002FAct 决策。适用于对漏洞扫描结果（OpenVAS、Nessus、Qualys）进行优先级排序以制定修复计划，而不局限于原始 CVSS 分数的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-vulnerabilities-with-ssvc-framework\u002FSKILL.md",[255,258],{"categoryNo":256,"categoryName":257,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQV98CYQ7TEW2D1MRQ00TE","安全公告与漏洞管理",{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},[260,261,262,33,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278],"vulnerabilities","framework","triaging vulnerabilities with ssvc framework","status","planning","CISA","vulnerability-management","risk-management","nessus","qualys","openvas","cvss","remediation","risk","vulnerability","api","prioritization","ssvc","decision-tree",{"skillNo":280,"name":281,"nameZh":282,"description":283,"descriptionZh":284,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":285,"categories":286,"keywords":289,"publishedAt":47},"01M6AGD24TTQQM4CXG69E3B9TJ","triaging-security-incident","安全事件初步分诊","Performs initial triage of security incidents using the NIST SP 800-61r3 and SANS PICERL frameworks, classifying incident type, assigning priority by business impact, and routing to the appropriate response team. Use when a SIEM\u002FEDR alert needs human classification, concurrent alerts must be prioritized, or a user report or threat-intel IOC match requires initial incident categorization.","使用 NIST SP 800-61r3 和 SANS PICERL 框架对安全事件进行初步分诊，分类事件类型、按业务影响分配优先级，并路由到相应的响应团队。适用于 SIEM\u002FEDR 告警需要人工分类、并发告警必须确定优先级，或用户报告或威胁情报 IOC 匹配需要初步事件分类的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-security-incident\u002FSKILL.md",[287,288],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[142,290,33,291,292,293,294,295,296,297,298,212,299,213,300,301,302,303,304,305],"triaging security incident","siem","file","ioc","soc","NIST-800-61","NIST","severity","edr","execution","analysis","classification","severity-classification","incident-triage","SANS-PICERL","SOC-operations"]