Chapter 4 · Reading 3 of 3
FAT, exFAT, ext4 and APFS
CHFI domains 3, 4 · GCFE: Forensic methods, Windows filesystems and Registry foundations
The Ridgeway billing clerk’s desk drawer held a 32 GB USB drive formatted FAT32, and the office’s file server runs Linux with ext4. A colleague also hands over a MacBook image from a contractor. The examiner now has four file systems in one case, and each one records deletion, time and ownership differently. Knowing those differences decides which questions each exhibit can answer.
FAT and exFAT: simple and forgetful
The File Allocation Table (FAT) family is common on USB drives, memory cards and EFI System Partitions. A FAT volume has a boot sector, one or more copies of the file allocation table, which records the chain of clusters each file uses, and directories made of 32-byte directory entries. Each entry holds an 8.3 short name, attributes, created, modified and last-accessed dates, the starting cluster and the file size. Long names are stored in extra entries placed just before the short-name entry.
When FAT deletes a file, it replaces the first byte of the name with 0xE5 and marks the file’s clusters free in the table. The rest of the entry, including the size and starting cluster, usually survives. If the clusters have not been reused, the examiner can often recover the file, at least when it was stored contiguously, because the cluster chain itself has been cleared. FAT keeps no owner or permissions, its modified time has two-second resolution, and its timestamps are local time with no time-zone record.
exFAT, designed for large flash media, removes FAT32’s 4 GiB file-size limit. It stores a file’s metadata in a set of directory entries, records times with finer resolution and a UTC offset, and uses an allocation bitmap. Deleted entries are marked by clearing an in-use bit in the entry type, so the name typically survives intact.
ext4: names and inodes are separate
Linux’s ext4 file system stores each file’s metadata in an inode: owner, group, permissions, size, timestamps and pointers to the data in extents, ranges of contiguous blocks. A directory is a list that maps names to inode numbers. The superblock, which describes the whole file system, begins 1,024 bytes into the volume and contains the magic number 0xEF53.
ext4 records access, modification, inode-change and, on most systems, creation (birth) times, with nanosecond precision. When a file is deleted, ext4 typically clears the extent information in the inode, which makes recovery by following pointers much harder than on ext2 and often requires carving (Chapter 5). The journal, which records metadata changes before they are committed, can hold older copies of inode blocks and is sometimes the best place to find a deleted file’s former metadata.
APFS: copy-on-write, snapshots and encryption
The Apple File System (APFS) is used on current Macs, iPhones and iPads. An APFS container holds several volumes that share free space. On modern macOS, the operating system lives on a read-only, cryptographically sealed system volume, and user data lives on a separate data volume. APFS uses copy-on-write: changes are written to new blocks, and metadata is updated to point to them, so older versions of metadata and data may survive in unused space for a time. Snapshots preserve a read-only state of a volume at a moment. Time Machine and system updates create them, and they can contain files that were later deleted. Timestamps have nanosecond resolution.
APFS encryption is the examiner’s main obstacle. On Macs with Apple silicon or the T2 chip, the internal storage is always encrypted by hardware tied to that machine, and FileVault adds protection with the user’s password. An image of a powered-off Mac is unreadable without the right credentials. That is one reason a live, logical collection may be the only practical choice for a Mac, as Chapter 12 shows.
| FAT32 | exFAT | ext4 | APFS | |
|---|---|---|---|---|
| Metadata store | 32-byte directory entries | Directory entry sets | Inodes | B-tree records |
| Owner and permissions | No | No | Yes | Yes |
| Time zone recorded | No (local time) | UTC offset | UTC | UTC |
| After deletion | Entry marked 0xE5, chain cleared | In-use bit cleared | Extents usually cleared | Old copies may persist; snapshots |
| Main obstacle | Few timestamps | Few timestamps | Cleared pointers | Encryption |
Working through the layers with The Sleuth Kit
The Sleuth Kit is a set of command-line tools that read each layer, and Autopsy is its graphical front end. The commands map directly onto this chapter. mmls lists the partition table. fsstat describes a file system. fls lists file names, including deleted ones. istat shows the metadata for one MFT record or inode. icat extracts a file’s content by its metadata address. When a partition table itself has been damaged or deleted, TestDisk can search for file-system signatures and rebuild it. Arsenal Image Mounter mounts an image read-only in Windows so other tools can treat it as a disk.
- mmls image.E01 Partition layout: where each volume starts and ends, in sectors.
- fsstat -o 239616 image.E01 File system type, cluster size and metadata ranges.
- fls -o 239616 -r -d image.E01 File names recursively; -d shows only deleted entries.
- istat -o 239616 image.E01 88213 One record’s metadata: times, size, clusters.
- icat -o 239616 image.E01 88213 The content those clusters hold, written to standard output.
On the exam, connect the artifact to the file system. 0xE5 is FAT. Inodes and 0xEF53 are ext. Snapshots and containers are APFS. The next chapter, File signatures, recovery, and anti-forensics, recovers files the file system no longer describes at all.
Inspect the three records, then use the evidence to answer the question.
1. First byte
0xE5
2. Rest of name
?LAN .PDF
3. Size
File size 482,113 bytes
Apply the reading
On a FAT32 USB drive, a directory entry starts with byte 0xE5. What does that tell you, and what might still be recoverable?
Compare your reasoning
0xE5 marks a deleted entry. The rest of the name, the size and the starting cluster usually remain, so if those clusters have not been reused the file can often be recovered, at least its first contiguous run.