The idea
Hana, who runs IT at Fenwick Logistics, needs to know what happened on the USB drive from the dispatch laptop lp03 on the evening of 14 October. Line up every file's times and read that evening in order.
Steps
-
The four times a file keeps
A file system records up to four timestamps for every file, together called its MAC(b) times:
- m, modified: when the file's content last changed.
- a, accessed: when the content was last read.
- c, changed: when the file's metadata last changed (its permissions, name, or where it lives). Not the content: the record about it.
- b, born: when the file was created (also called crtime). Linux's ext4 keeps this; older file systems like FAT often don't.
These are the raw material of a timeline. The Sleuth Kit's
istatprints everything the file system knows about one file, given its address. Hana copied the drive byte for byte into one file, an image:/evidence/field-drive.img. Its Linux (ext4) partition starts at sector 34816. On ext4 a file's address is called its inode number, and inode 14 is a file in the drive's work area.Read the four times on inode 14.
analyst:~# istat -o 34816 /evidence/field-drive.img 14
-
Lay every file on one timeline
One file's times you can read with
istat. A whole drive has hundreds, and the story is in their order, not in any one of them. So you do it in two moves. Firstfls -mwalks the partition and writes every file's times into a plain text body file, one line per file in a fixed format. Thenmactimereads that body file and does the part that matters: it sorts every timestamp from every file into one list, earliest to latest, so each line is "at this moment, this happened to this file".The lab ran the
fls -mpart for you (it only redirects its listing into a file calledbodyfile). Your job is the reading: runmactimeon it and look at the evening it lays out.analyst:~# mactime -b bodyfile
-
The old tool, used tonight
Look again at
send.shin the timeline. It shows up twice, and oddly. At the very top, weeks before everything else, it hasm.cb: modified, changed and born back on September 20. But then it reappears at 21:43 that night with.a..: accessed. Created long ago, read tonight, right after the archive was packed.istatshows that split plainly on one file. Read inode 16's times and compare its born time to its accessed time.analyst:~# istat -o 34816 /evidence/field-drive.img 16
-
What the timeline points to
The timeline told you when and in what order; it pointed at
send.shas the tool run at the climax. The last move is to read the tool itself and learn what it did.Nobody deleted it:
istatshowed inode 16 asAllocated, a live file. You still read it by its address rather than by mounting the partition.icat, the tool that also brings back deleted files, prints whatever content an address points to, straight from the read-only image, so you need no mount at all. Give it the Linux partition's offset and inode 16.Read inode 16's content.
analyst:~# icat -o 34816 /evidence/field-drive.img 16
Run these steps on real machines