Disk images and what file systems keep

Unit 3 of 5 in Digital forensics basics.

You will be able to make and verify a forensic image, explain write blockers, and say what a deleted file leaves behind.

Lesson

Images, not originals

SP 800-86 describes bit stream imaging, also called disk imaging, as generating a bit-for-bit copy of the original media, including free space and slack space. It takes more space and time than a logical backup. If evidence may be needed for prosecution or disciplinary action, the guide says the analyst should take a bit stream image, label the original media and store it securely as evidence, and do all later analysis on the copy so the original is never modified and the copy can always be recreated.

It also says every step used to create the image should be documented, so another analyst could produce an exact duplicate with the same procedure and so the documentation can show the evidence was not mishandled. Record the drive's model and serial number, its capacity and the imaging software or hardware used, including its name and version. These all support the chain of custody.

Write blockers and hashes

A write-blocker, SP 800-86 says, is a hardware or software tool that prevents a computer from writing to storage media connected to it. For a hardware blocker, the media is connected to the blocker and the blocker to the imaging computer; for a software blocker, load it before connecting the media. Blockers should be toggled on for all connected devices and tested routinely, because a new device might use reserved functions that write to the device.

After imaging, the guide says to verify the copy is an exact duplicate, by computing a message digest of the copy and comparing it with the digest of the original. A message digest is a hash with the property that changing one bit gives a completely different value. It says to compute the digest of the original before imaging, again after the copy, and compare, and then compute the original's digest again to confirm the original was not changed. The imaging lab does exactly this with a practice device made from a file, using SHA-256, and ends with the chain-of-custody record.

Can you trust the tool?

RFC 3227 said you should be ready to testify to the reliability of your tools. NIST's Computer Forensics Tool Testing (CFTT) project exists for that reason. It says its goal is a methodology for testing forensic software tools through general tool specifications, test procedures, test criteria, test sets and test hardware, and that the results let toolmakers improve tools and let users make informed choices. SP 800-86 mentions CFTT's disk imaging test results too.

For a beginner the habit is simple: know what your tool claims to do, test it on data where you know the answer, and write the tool and version in your notes. The labs make you do the first two: you plant files, delete one and see whether the tool finds it.

What a file system keeps

SP 800-86 explains why a disk holds more than the visible files. When a file is deleted it is typically not erased: the entry pointing to it is marked as deleted, the data stays on the media and the operating system treats the space as free and may overwrite it at any time. File slack space, the unused part of the last storage unit of a file, may hold residual data such as pieces of deleted files. Free space, which includes unallocated clusters, may still hold fragments of files that once existed.

The guide also describes NTFS alternate data streams, named streams that can hide data in a file and are not shown by ordinary Windows file tools; they are lost if the file is moved to a file system without them.

The recovery labs show the first idea on a disk you build yourself: delete a file, then recover its contents by inode number with The Sleuth Kit, or carve it back with a carving tool. They also show the honest limit: recovery has a short window, because new writes overwrite old data, and real erasure means overwriting.

Tools: The Sleuth Kit and Autopsy

The Sleuth Kit describes itself as a library and a collection of command-line tools for investigating disk images, with core functions to analyze volume and file system data. The library can be built into larger forensic tools. Autopsy, built by Sleuth Kit Labs, is an open source digital forensics platform that puts a graphical case workflow on top.

The command-line lab shows what the interface hides: map the partitions, read file system details, list files including deleted ones, read an inode and recover bytes. The Autopsy labs open a case on a data source, review deleted and carved files, web history and recent-activity artifacts, search keywords, check hashes against a known set, read the timeline and tag findings. Their repeated message is that a tool surfaces artifacts but the analyst builds the story and must check it.

Key points

Sources

Practice in the labs

Make an image of a practice device and prove it matches, examine a disk you built with The Sleuth Kit, recover deleted files and investigate an image in Autopsy. Everything uses practice data you create.

Knowledge check

  1. What does a bit stream image contain that a logical backup may not? Answer: Free space and slack space, as a bit-for-bit copy of the media. SP 800-86 says bit stream imaging generates a bit-for-bit copy of the original media including free space and slack space, which is why it can preserve deleted data and file times.
  2. How do you show an image is an exact copy of the original? Answer: Compare the message digests of the original and the copy. SP 800-86 says computing the message digest of the copy and comparing it with the original's digest verifies integrity; a single changed bit gives a completely different digest.
  3. A user deletes a file. What does SP 800-86 say usually happens to the data? Answer: It stays on the media, marked as free space, until overwritten. The guide says deleted files are typically not erased: the pointer is marked as deleted, and the operating system treats the space as free and may overwrite it at any time.
  4. What is the job of NIST's CFTT project? Answer: To establish a methodology for testing the reliability of computer forensic tools. NIST says CFTT's goal is a methodology for testing forensic software tools, through specifications, test procedures, criteria, test sets and hardware, so that tool behavior is known.

Back to the syllabus or see all classes.

Related