Lect14 / 15 / 17 - The Sleuth Kit Flashcards
(33 cards)
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
TSK command:
creates a body file for timelines (file activity only)
tsk_gettimes
TSK command:
Categorizes allocated and unallocated files based on type (images, executables, etc). Extremely flexible and configurable.
sorter
TSK command:
Allows for the separation of meta-data and original data from image files (media duplication, not pictures)
img_cat
TSK command:
Provides information about a forensic image. The information it provides is dependent on the image format (aff, ewf, etc.).
img_stat <firstpart_image_file></firstpart_image_file>
TSK command:
Hash lookup tool. Creates and searches an indexed database.
hfind
TSK command:
Searches a given file (forensic image, disk, etc.) for a hex signature at any specified offset (sector boundary). Used for finding data structures.
sigfind
TSK command:
Creates a timeline of file activity. Useful for intrusion investigations where temporal relationships are critical.
mactime
TSK command:
Like standard BSD strings command, but with the ability to parse different encodings.
srch_strings
Where are all TSK tools installed?
/usr/bin
- echo "(1632788547-(571392*512))/4096" | bc