Courses3 levels
Level 1 · Foundations11 courses
Level 2 · Core5 courses
Level 3 · Advanced5 courses
Labs8 topics
Library Practice exams AI Range Pricing Start free

Practice library / Security operations basics

Workbook · Medium · 4 hoursFree account

Digital Forensics & Incident Response

Evidence acquisition, chain of custody, disk and memory forensics fundamentals.

  • dfir
  • evidence-acquisition
  • chain-of-custody
  • windows-artifacts
On this page 6 sections
  1. ·About This Workbook
  2. ·Chapter 1 — Forensic Foundations
  3. Locked: Chapter 2 — Windows Artefacts
  4. Locked: Chapter 3 — The Incident Lifecycle
  5. Locked: Chapter 4 — Reporting
  6. Locked: Next steps

Before you start

When prevention fails, the forensic analyst must answer four questions from what the system left behind: what happened, when, how, and what was touched. This workbook covers the discipline from both ends. It starts with the principles — order of volatility, chain of custody, forensic imaging and hashing — and moves to the Windows artefacts that record execution, file activity and logons. It then places the forensic work inside the incident lifecycle and ends with the report that another analyst must be able to check. The tools and ideas here apply to any Windows case and feed straight into the hands-on Linux and memory labs.

What You'll Learn

  • Collect evidence in the order of volatility and keep a chain of custody
  • Make a forensic copy of a disk and prove that the copy is exact
  • Name the Windows artefacts that show execution, file activity and logons
  • Read key Windows event IDs and logon types
  • Build a timeline and write findings that another analyst can check

About This Workbook

When prevention fails, investigation begins. Digital forensics answers four questions from the data that a system leaves behind: what happened, when, how, and what was affected. Incident response uses the answers to stop the attack and to recover.

This workbook gives you the principles first, then the places on a Windows system where evidence lives, then the way to write the result. You must know the incident process first, so read Incident Handling before this workbook. The labs Linux Forensics and Memory Forensics with Volatility show the ideas on real output.

Investigate only systems that you own or are authorised to examine. Forensic work often involves personal data, so get written authority and share findings only with the people who need them.

Chapter 1 — Forensic Foundations

Objectives

  • List the evidence sources in the order of volatility
  • Explain chain of custody
  • Make and verify a forensic copy

Explanation

Evidence is data that you can use to support a conclusion. Evidence is only useful if you can show that it is authentic (it came from where you say), complete and unchanged. Every rule in this chapter protects one of these three.

Order of volatility. Some data disappears in seconds and some stays for years. Collect the data that disappears first. RFC 3227 gives the order, from most to least volatile:

  1. CPU registers and cache
  2. Routing table, ARP cache, process table, kernel statistics and memory
  3. Temporary file systems
  4. Disk
  5. Remote logs and monitoring data
  6. Physical configuration and network topology
  7. Archival media

In practice, an analyst collects memory and network connections from a running host first, then the disk, then logs from other systems. Shutting down a computer to "keep it safe" destroys items 1 to 3.

Chain of custody is the written record of who held the evidence, when, where and why, from collection to the end of the case. Each entry has a date, the name of the person, the action (collected, copied, moved, analysed) and the hash of the item. A gap in the record gives a lawyer a reason to question the evidence.

Acquisition is the copy of the evidence. Work on the copy, never on the original. A write blocker (hardware, or a read-only mount in software) prevents any write to the original. A forensic image is a bit-for-bit copy of the whole disk, including deleted data and empty space. A hash (for example SHA-256) is a fingerprint. If the hash of the original and the copy match, the copy is exact. Record the hash in the chain of custody, and check it again before each use.

Worked example

This example copies a file that stands in for a disk. The commands are the same as for a real device, where the input is a device such as /dev/sdb that you protect with a write blocker.

head -c 8388608 /dev/urandom > source.img
sha256sum source.img > source.sha256
dd if=source.img of=copy.img bs=4M conv=noerror,sync

Example output:

2+0 records in
2+0 records out
8388608 bytes (8.4 MB, 8.0 MiB) copied, 0.0285591 s, 300 MB/s

Hash the copy and compare it with the hash of the original.

sed 's/source.img/copy.img/' source.sha256 | sha256sum -c

Example output:

copy.img: OK

conv=noerror,sync tells dd to continue after a read error and to fill the missing block with zeros, so that all later data stays at the correct offset. OK proves that the copy is identical. The hash value itself is different each time, because the data is random.

Practice questions

  1. A server is running and you suspect an intrusion. Put these in the order you collect them: disk image, memory, network connections, remote logs.
  2. Why must the hash be recorded before the analysis and not after?
  3. A colleague opens the original disk image in an analysis tool "only to look". What is the risk?
  4. What is the difference between a forensic image and a file copy?
Answers
  1. Memory, network connections, disk image, remote logs. Memory and connections are the most volatile. Remote logs are stored elsewhere and change slowly.
  2. The hash proves that the evidence did not change during the analysis. A hash taken after the work cannot show what the data was before.
  3. Some tools write to the data (for example by replaying a journal or updating timestamps), and the original is then no longer unchanged. Always work on a copy and use read-only access.
  4. A file copy contains only the files that the operating system shows. A forensic image contains the whole disk, including deleted files, unallocated space and the file system structures.

Sign in to continue

4 more sections are for signed-in members. It is free: sign in with Google.

Related

This workbook is extra practice for the course Security operations basics. Do the lessons first.Open the course