From harness-claude
Provides digital forensics fundamentals for collecting, preserving, and analyzing evidence from compromised systems to reconstruct attacks and scope breaches.
npx claudepluginhub intense-visions/harness-engineering --plugin harness-claudeThis skill uses the workspace's default tool permissions.
> Digital forensics is the discipline of collecting, preserving, and analyzing evidence from
Conducts digital forensics after data breaches: preserves evidence by volatility order, maintains chain of custody, analyzes logs with Splunk/ELK/Wireshark, determines scope and root cause.
Guides NIST SP 800-61 incident response: classify breaches, preserve evidence, analyze logs with Bash tools, contain threats, investigate IOCs, eradicate malware, recover systems.
Performs endpoint forensics: memory acquisition, volatile data collection, disk imaging, artifact analysis, timeline reconstruction for incident response and evidence gathering.
Share bugs, ideas, or general feedback.
Digital forensics is the discipline of collecting, preserving, and analyzing evidence from compromised systems -- done correctly, it reveals the full attack narrative; done poorly, it destroys the evidence needed to understand what happened and prevent recurrence
Forensic capability determines whether an organization can answer the four critical questions after a breach: How did the attacker get in? What did they access? Are they still in the environment? How do we prevent this from happening again? Without forensic evidence, these questions remain unanswered:
Understand evidence types and the order of volatility. Evidence exists on a spectrum from highly volatile (lost in seconds) to persistent (survives power loss). Collect the most volatile evidence first:
netstat/ss), routing
tables, ARP cache, DNS cache. Capture before any network isolation actions./proc filesystem
provides rich per-process data. Capture before any containment actions.dd, dc3dd, or FTK Imager. Use write-blockers to prevent
modification during imaging.Collect evidence without modifying it. The forensic principle of non-contamination requires that evidence collection does not alter the evidence:
dd if=/dev/sda of=/evidence/image.raw bs=4k conv=noerror,sync or dc3dd (which
adds hashing during imaging). Compute SHA-256 hashes of both the source and the image to
verify integrity.Maintain chain of custody. For evidence to be admissible in legal proceedings and credible in regulatory investigations, every transfer of evidence must be documented:
Reconstruct the attack timeline. The timeline is the primary forensic deliverable -- a chronological narrative of the attacker's actions:
Identify and document indicators of compromise (IOCs). IOCs are observable artifacts that indicate a system has been compromised:
Memory forensics -- what lives only in RAM: Memory contains information that never touches disk and is lost forever on power off: in-progress network connections and their contents (pre-encryption for TLS sessions), decrypted versions of encrypted data, encryption keys for full-disk encryption (BitLocker, LUKS) that could unlock the disk image, injected code that was loaded directly into process memory without writing to disk (fileless malware), clipboard contents, command history in running shells, and credentials cached by the operating system (LSASS on Windows, which stores NTLM hashes, Kerberos tickets, and plaintext passwords in some configurations). Tools like Volatility Framework analyze memory dumps to extract this information.
Log analysis patterns for common attack types: Brute force: many failed logins followed
by a success from the same source. Credential stuffing: failed logins across many accounts
from a distributed set of IPs. Privilege escalation: a normal user account suddenly
accesses admin endpoints. Data exfiltration: unusually large responses to API calls, bulk
download patterns, or connections to unfamiliar external IP addresses. Lateral movement:
a compromised server making authentication requests to other internal servers using
credentials it should not possess. Web shell: a web server process spawning command-line
processes (e.g., Apache httpd spawning /bin/sh).
Cloud forensics differences: In cloud environments, you typically cannot access the physical hardware or hypervisor layer. Evidence collection relies on provider APIs. Advantages: disk snapshots are instantaneous and non-destructive, cloud audit logs (CloudTrail, Activity Log, Cloud Audit Logs) cannot be deleted by the attacker if properly configured (send to a separate account/project with restricted access). Challenges: memory acquisition may not be possible for all instance types, network captures require prior VPC Flow Log enablement, ephemeral instances (serverless, containers) may leave minimal forensic artifacts.
Modifying evidence during collection. Running analysis tools on the compromised system, which modifies file access timestamps, loads libraries into memory, and creates temporary files. Use a forensic workstation for analysis, not the compromised host. If live collection is necessary (memory dump), document the tool's footprint and accept the minimal contamination.
Analyzing on the live compromised system. Installing and running forensic tools directly on the compromised host. The attacker may have installed rootkits that hide processes, files, and network connections from the operating system. Analysis on the live system sees what the rootkit allows. Analysis of a disk image on a clean forensic workstation reveals the rootkit itself.
Incomplete timeline with unexplained gaps. Building a timeline that shows the initial compromise and the data exfiltration but skips the intermediate steps. The gaps likely contain lateral movement and persistence mechanisms. If the attacker established persistence that the timeline does not account for, remediation will be incomplete and the attacker will regain access.
No chain of custody documentation. Collecting evidence but not recording who collected it, when, and how it was stored and accessed. If the incident leads to legal action (lawsuit, criminal prosecution, regulatory enforcement), evidence without chain of custody may be inadmissible. Even for internal investigations, undocumented evidence handling undermines the credibility of the findings.
Collecting only one type of evidence. Gathering disk images but not memory. Exporting application logs but not network logs. Each evidence type reveals different aspects of the attack. Memory shows the attacker's active tools. Disk shows persistence mechanisms. Logs show the timeline. Network captures show data exfiltration. A comprehensive investigation requires multiple evidence types correlated together.