You have a verified image. Now it's time to bring deleted files back. There are two main techniques, and a good investigator uses both.
| Technique | How it works | Works when |
|---|---|---|
| File system recovery | Reads leftover file system records (MFT entries, inodes, FAT directory entries) that still point to the data | The file system records haven't been overwritten |
| File carving | Ignores the file system and scans raw bytes for known file signatures | The records are gone but the content survives |
File system recovery with The Sleuth Kit
The Sleuth Kit (TSK) is a set of command-line forensic tools, pre-installed on Kali.
mmls case01.img # show partitions and where they start
fsstat case01.img # file system type and details
fls -r -d case01.img # list deleted files only (-d), recursively (-r)
If the image is a whole disk with partitions, give the start sector from mmls with -o, for example fls -o 2048 -r -d disk.img.
fls output looks like this:
r/r * 12: secret-plans.pdf
The * means deleted. 12 is the inode (or MFT entry) number. Recover the file with icat:
icat case01.img 12 > recovered-secret-plans.pdf
Tip: This works well on NTFS and FAT. On ext4, Linux wipes the block pointers when a file is deleted, so
icatoften returns an empty file. That's when you switch to carving.
File carving with PhotoRec
Every file type starts with a recognisable signature, called its magic bytes:
| File type | Magic bytes (hex) |
|---|---|
| JPEG | FF D8 FF |
| PNG | 89 50 4E 47 |
| 25 50 44 46 (%PDF) | |
| ZIP, DOCX, XLSX | 50 4B 03 04 (PK) |
PhotoRec scans the whole image for these signatures and rebuilds whatever it finds:
photorec case01.img
Choose the partition, use [File Opt] to pick file types, choose an output folder and let it run. You can check any file's signature yourself with xxd file.jpg | head -1.
Carved files lose their original names and folders, so you'll get names like f0012345.jpg. That's normal. Sort them by type and check what's inside.
Autopsy: the GUI way
Autopsy is a free graphical front-end for The Sleuth Kit, used by police and corporate investigators. Load your image as a case and it automatically:
- lists deleted files
- carves unallocated space
- extracts web history, photo EXIF data and recent documents
- builds a timeline and a keyword search index
Autopsy 4 runs best on Windows. On Kali, the autopsy command starts the older browser-based version at http://localhost:9999/autopsy.
Record this for every recovered file
- Original path and inode or MFT number
- Recovery method (TSK or carving)
- SHA-256 hash of the recovered file
- Why it matters to the case
Deleted doesn't mean gone, but it does mean you need to prove exactly how you got it back.