Lect14 / 15 / 17 - The Sleuth Kit Flashcards
Explain the layer approach and name tools for each layer?
-
Physical Media
- lshw, lsscsi, hdparm
-
Media Management
- fdisk, lsblk, mmls, mmcat
-
File System
- FS: file, fsstat, fls
- File: find, file, ls
-
Application
- less, cat, xv, display, regfmount
What is TSK?
The Sleuth Kit (TSK) - for our purposes, is a collection of command line tools that allow you to forensically analyze disks, disk images, file systems and other volume information. There are also libraries and bindings to allow for additional development:
- Autopsy (GUI based on TSK)
- Python/Java bindings
Can be used on live file systems. Can be used in Windows. Linux leverages bash and associated tools to augment the power of TSK.
To install TSK: # sboinstall sleuthkit
We also have tools that address physical disks and tools that address the “journals” of some file systems. Name some examples?
- Journal tools: jcat, jls
- File content tools: hfind, fcat
TSK command:
Show partitions of a image
mmls <image_file></image_file>
TSK command:
Show file system metadata?
fsstat -o 10260 <image_file> | less</image_file>
TSK command:
List files and directories of a specific partition?
# fls -o 10260 [2]
Other parameters:
- -r : Recursive
- -d : Only deleted files
- -u : Only undeleted files
- -F : Display file entries only
- -D : Display directory entries only
- -p : Display full path for each entry
Output:
- r/r : Regular file in file’s directory and inode entry. (or one is for the directory tree and one is for the MFT entry)
- d/d : Directory
- V/V : Virtual folder
- $OrphanFiles : virtual file entries that represent unallocated metadata entries where there are no corresponding file names.
- realloc : the inode from the deleted file may have been reallocated to a new file.
TSK command:
Show command to export file based on inode/mft?
# icat -o 10260 <image_file> 2139 > lrkn.tgz.2139</image_file>
Determine file type without exporting file:
# icat -o 10260 <image_file> 2139 | file -</image_file>
Display file directly:
# icat -o 10260 <image_file> 2139 | display</image_file>
TSK command:
finds an “inode” given a file name or block?
# ifind
ifind -f fat -d 456 fat-img.dd
ifind -f linux-ext2 -n “/etc/” linux-img.dd
TSK command:
“File find”: finds a file name given an “inode”
# ffind -o 10260 -a <image_file> 2139</image_file>
-a : ensures that we get all the inode associations.
TSK command:
Displays a file’s meta data
# istat -o 10260 <image_file> 2139 | less</image_file>
TSK command:
Export unallocated blocks from file system
# blkls -o 63 image.raw > image.blkls
TSK command:
Calculates the association between an unallocated block and original file system block.
# blkcalc -u $((422543/4096)) -o 63 image.raw
TSK command:
Export data from a particular block
# blkcat -o 571392 able_3.000 327206 > blk.327206
TSK command:
Check if block is allocated or not
# blkstat -o 10260 able2.dd 5184
TSK command: recovers unallocated (or all) files from a file system.
# tsk_recover ./image.dd ./recovered