#Why this matters
After you acquire a verified disk image with FTK Imager and log its hash, investigation begins. Suspects and intruders rarely leave staging scripts or archives sitting in plain sight; they delete files or wipe directories before responders arrive. Because file systems optimize for speed rather than immediate erasure, deletion usually unlinks metadata while leaving raw bytes intact until overwritten.
#How deletion works on a file system
File systems separate metadata (name, size, timestamps, and block pointers) from file content (bytes stored in clusters or blocks). On NTFS, metadata lives in the Master File Table (MFT); on ext4, it lives in directory entries and inodes. Normal deletion marks the metadata record unallocated and returns data clusters to the free-space bitmap, leaving the bytes on disk until new writes claim those blocks.
| State of deleted file | Metadata available? | Data intact? | Recovery approach |
|---|---|---|---|
| Recently deleted, no heavy writes | Yes (unallocated) | Yes | Sleuth Kit (fls, icat) or Autopsy |
| Metadata reused, clusters untouched | Partial or none | Yes | Signature carving (binwalk) |
| Clusters overwritten | Maybe | No (partial) | Fragment review or shadow copies |
#Inspecting disk images with Sleuth Kit
The Sleuth Kit (TSK) parses raw (dd/img) and Expert Witness (E01) images without mounting them through the host OS, preventing accidental writes or metadata updates.
- Hash VerifyConfirm SHA-256 of working copy
- mmlsFind partition start sector offset
- fsstatCheck file system type and cluster size
- flsList allocated and deleted entries
- icatExtract target inode to lab output
Run mmls on a full-disk image to find each partition's Start sector (such as 2048 on 512-byte sectors), then pass -o <start_sector> to all volume-level commands. Use fsstat to verify the file system type and cluster size, and fls (-r recursive, -d deleted only, -p full path) to list entries. Deleted entries appear with an asterisk (*) before the inode or MFT address, which you pass to icat to extract the raw file bytes safely.
$ sha256sum evidence.img
3a7bd3e2360a3d29eea436fcfb7e44c735d117c42d1c183fa546268bce6c49b8 evidence.img
$ mmls evidence.img
DOS Partition Table
Offset Sector: 0
Units are in 512-byte sectors
Slot Start End Length Description
000: Meta 0000000000 0000000000 0000000001 Primary Table (#0)
001: ------- 0000000000 0000002047 0000002048 Unallocated
002: 000:000 0000002048 0000206847 0000204800 Linux (0x83)
$ fls -r -d -p -o 2048 evidence.img
r/r * 19: Users/analyst/staging/notes.txt
r/r * 23: Users/analyst/staging/payload.zip
$ icat -o 2048 evidence.img 19 > recovered_notes.txt
$ cat recovered_notes.txt
staging host: lab.local (10.10.10.25)#Triaging cases at scale with Autopsy
For full workstations with hundreds of thousands of files, Autopsy puts a graphical workflow on top of The Sleuth Kit. After creating a case and adding an image data source, enable key Ingest Modules:
- Hash Lookup: suppresses known-good OS files (NSRL) and flags known malicious hashes.
- File Type Identification: inspects magic bytes instead of trusting filename extensions.
- Recent Activity: extracts browser history, bookmarks, and USB history.
- Keyword Search: indexes text across allocated files and unallocated space.
The Views > Deleted Files node groups deleted entries so you can sort by size, MIME type, or path without running manual fls commands across every directory.
#Carving unallocated space with binwalk
When directory entries are overwritten, file carving scans raw unallocated space for known file headers and footers. binwalk locates embedded archives, images, or executables inside unallocated slices (-e extracts recognized streams):
$ binwalk -e unallocated_slice.bin
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
16384 0x4000 Zip archive data, at least v2.0 to extract, compressed size: 412, uncompressed size: 680, name: key.txtBecause carvers ignore file system allocation tables, fragmented files may extract cleanly only up to their first cluster boundary. Always test carved archives and check extracted headers.
#Common mistakes
- Omitting the partition offset (
-o): Runningflsorfsstatat sector0of a full-disk image hits the partition table instead of the file system and fails. - Mounting images read-write: Host OS mounts can replay journals or write
.Trashfolders, breaking hash verification. - Ignoring fragmentation: Carved files recovered solely from raw bytes can be corrupted if clusters were non-contiguous.
- Skipping hash filtering: Analyzing a workstation without NSRL filtering wastes hours reviewing standard OS binaries.
#Summary
- Deletion normally unlinks metadata and frees clusters without immediately erasing underlying bytes.
- Run Sleuth Kit in sequence:
mmls(offsets),fsstat(geometry),fls(deleted listings), andicat(safe extraction). - Use Autopsy ingest modules and Views > Deleted Files to triage large images efficiently.
- Use
binwalkcarving when metadata is gone, keeping fragmentation and read-only evidence integrity in mind.