4 min read

Defensive Operations
Advanced

Digital Forensics & Incident Response

DFIR combines digital forensics, the science of collecting and analyzing digital evidence, with incident response, the process of detecting, containing and recovering from security breaches. The discipline exists to answer two questions that are asked at different times: what happened, and what did the organisation decide while it was happening.

Practising it needs incidents you are allowed to create. The Purple Team Lab setup wraps the AD lab in a Wazuh or Elastic stack with Sysmon coverage, then replays ATT&CK techniques so you have real telemetry to investigate instead of sample dumps.

Evidence Preservation is Critical

Never analyze original evidence. Work on forensic images, bit-for-bit copies with verified hashes, and keep the original sealed. Improper handling does not make evidence inadmissible by itself; it removes the ability to prove the evidence was not altered, which is the argument opposing counsel actually makes.

Incident Response Lifecycle

The phases below are the SANS PICERL sequence in PICERL's own words, in the order it puts them: preparation, identification, containment, eradication, recovery, lessons learned. NIST SP 800-61 revision 3 (April 2025) recasts response as outcomes across the CSF 2.0 functions rather than a linear sequence, and ISO/IEC 27035-1:2023 sets out five phases of its own; it is the same work numbered differently. Preparation is first because it decides how much of the rest is possible: whether the logs still exist, whether anyone has authority to collect, and whether the evidence survives the containment decision.

Preparation

Contacts, playbooks, logging, backups, tabletop practice

Identification

Validate the alert and decide whether the event is an incident

Containment

Prevent further damage while preserving the evidence the action touches

Eradication

Remove threat from environment

Recovery

Restore systems to normal operations

Lessons Learned

Post-mortem analysis and improvements

DFIR vs Red Team

While red teams simulate attacks, DFIR professionals investigate and respond to them. These are complementary skillsets:

Red Team (Offensive)

  • Break into systems
  • Evade detection
  • Establish persistence
  • Simulate real attackers
  • Goal: Test defenses

DFIR (Defensive)

  • Investigate breaches
  • Find attacker artifacts
  • Reconstruct timelines
  • Contain and remediate
  • Goal: Understand and stop attacks

Essential DFIR Tools

Disk Forensics

  • Autopsy / Sleuth Kit
  • FTK Imager
  • X-Ways Forensics
  • Magnet AXIOM

Memory Forensics

  • Volatility
  • AVML / Magnet RAM Capture
  • DumpIt
  • MemProcFS

Network Forensics

  • Wireshark / tshark
  • NetworkMiner
  • Zeek
  • tcpdump

Windows Forensics

  • Eric Zimmerman Tools
  • RegRipper
  • Event Log Explorer
  • Velociraptor

Linux Forensics

  • SIFT Workstation
  • journalctl / ausearch
  • osquery
  • Sysdig

Timeline & Analysis

  • Plaso / log2timeline
  • Timesketch
  • CyberChef
  • Elasticsearch / Kibana

The Forensic Process

The steps below are the evidence-handling sequence, and they are not a second version of the lifecycle above. Identification and preservation come from chain-of-custody practice; collection, examination, analysis and reporting are the four phases NIST SP 800-86 defines for forensic work. In a real response they nest inside the lifecycle rather than succeeding it — preservation happens during identification, and reporting overlaps recovery.

  1. Identification: Recognize potential evidence (compromised server, suspicious network traffic)
  2. Preservation: Create forensic images with write-blockers, calculate MD5/SHA256 hashes
  3. Collection: Gather volatile data (memory, running processes) before non-volatile (disk)
  4. Analysis: Examine artifacts for IOCs, attacker tools, and lateral movement traces
  5. Documentation: Maintain detailed chain of custody and findings report
  6. Presentation: Communicate findings to technical and non-technical stakeholders

Capture First What Disappears Soonest

The ordering rule is not "most volatile first" but "capture first what disappears soonest", and the two differ at the end of the list. CPU registers and cache go before RAM because they are gone at power-off; RAM goes before swap, and swap before the disk. Backups and central logs sit last in physical volatility, yet they expire on a schedule nobody in the room controls — a retention window that closes tonight outranks a disk that will still be there tomorrow. Collect memory before pulling the power plug, and export the logs and backup indexes in the same pass.

Guide Contents