Skip to content

Lesson pack 13 · Advanced · 120 minutes

Memory and disk forensics

Answer the three questions a memory image is asked - what was running, what was typed, what was on disk - and know why a scan beats a list.

Print this page for a paper plan - the navigation and links drop out.Student-facing version

Before the session

  • Nothing to install. Students need a browser and https://ctfpal.com. Confirm the room can reach it once; after that it works offline.
  • Read the lesson yourself first - about 4 minutes.
  • Have one worked example ready to paste. The classroom link builder on the instructor page turns it into a URL that opens preloaded.

Objectives

Written as things a student can do afterwards, so they can be assessed rather than asserted.

  1. Distinguish a raw memory image from a crash dump or hibernation file before analysing it
  2. Explain why psscan finds processes pslist cannot, and what that costs in validation
  3. Recover command lines from a Windows image, including the UTF-16 problem
  4. Locate and carve a registry hive out of a dump and read persistence from it
  5. Read ext, FAT and NTFS structures well enough to recover a deleted or resident file

Running order (120 min)

TimeWhat happens
0:00-0:12Frame the problemWhat the category looks like when you meet it cold, and why the naive approach fails.
0:12-0:36Teach the methodThe technique itself, on the board or from the lesson. No tools open yet.
0:36-1:06Demonstrate liveSame technique, in the workspace, on your worked example. Narrate every choice.
1:06-1:48Practice setStudents work the challenges. Circulate rather than present.
1:48-2:00Checkpoint and wrapCollect the artefact, name what comes next.

Tools used

  • Memory dump, disk image and registry hive analysis - Scan a Windows memory image for processes, command lines, file objects and registry hives - and read ext4, FAT, NTFS $MFT and registry hives - entirely in the browser.https://ctfpal.com/?tool=memory-disk-registry-forensics
  • Strings extractor for binaries and blobs - Pull printable ASCII and UTF-16 strings out of any file, filtered by length, with flag-pattern highlighting.https://ctfpal.com/?tool=strings-extractor
  • File type identifier by magic bytes - Drop a file and identify what it really is from its signature, regardless of extension. Also finds file headers embedded inside other files.https://ctfpal.com/?tool=file-signature-identifier
  • Hex viewer and hexdump - Inspect any file byte by byte with a side-by-side hex and ASCII view, offsets, and structure highlighting.https://ctfpal.com/?tool=hex-viewer

Reading

Practice set

Real picoCTF challenges tagged with this module’s techniques, easiest first. Assign the first three in class and the rest as homework.

  1. Corrupted file - picoMini by CMU-Africa, easy
  2. DISKO 1 - picoGym Exclusive, easy
  3. advanced-potion-making - picoMini by redpwn, medium
  4. Bitlocker-1 - picoCTF 2025, medium
  5. Bitlocker-2 - picoCTF 2025, medium
  6. Dear Diary - picoCTF 2024, medium
  7. Disk, disk, sleuth! - picoCTF 2021, medium
  8. Disk, disk, sleuth! II - picoCTF 2021, medium
  9. DISKO 2 - picoGym Exclusive, medium
  10. DISKO 3 - picoGym Exclusive, medium
  11. DISKO 4 - picoCTF 2026, medium
  12. Forensics Git 0 - picoCTF 2026, medium

Checkpoint (gradeable)

Given a raw Windows memory image, produce the process tree, identify the process that should not be there, and recover the command line it was started with.

Deliberately a produced artefact rather than a quiz question: it is either there or it is not, which makes it fast to mark and hard to bluff. Every tool in ctfpal is deterministic, so two students who did the work correctly hand in the same value.

Where the room gets stuck

The UTF-16 point lands better as a demonstration than as a statement: run strings without -el on a dump, get nothing, run it with -el, and get the whole command history. Students who see that once never forget it.

If you finish early

  • Hand out a challenge from the cross-CTF index in this category - each one has published solutions to compare afterwards.
  • Run the same input through Identify and let the class argue with the ranking. Disagreeing with a confidence score is where the technique actually lands.
  • Ask a student to break their own example - construct an input that defeats the tool, and explain why.

Take this into a room

Markdown files, built here in your browser. They print, they open in anything, and they carry the challenge text - so the session works with no network in the room.