Linux file systems hold valuable information that can be crucial during forensic investigations. This project will guide you through the process of analyzing Linux file systems and recovering deleted files. You will learn how to use various tools and techniques to examine file system structures, identify important artifacts, and recover lost data.
The objective of this project is to provide hands-on experience in analyzing Linux file systems and recovering deleted files. By the end of this project, you will be able to effectively use forensic tools to examine file systems and recover deleted data.
To complete this project, you will need access to a Linux operating system. You can use a physical machine, set up a virtual machine using software like VirtualBox or VMware, or use a cloud-based Linux instance.
- Basic understanding of Linux OS and command-line interface
- Administrative privileges on the Linux machine
For this project, we will use the following tools:
- TestDisk: A powerful data recovery software.
- Extundelete: A utility to recover deleted files from ext3/ext4 partitions.
- Sleuth Kit (TSK): A collection of command-line tools for digital forensics.
- Install TestDisk using the package manager:
sudo apt-get install testdisk
- Install Extundelete using the package manager:
sudo apt-get install extundelete
- Install Sleuth Kit using the package manager:
sudo apt-get install sleuthkit
Objective: Learn how to examine the file system structure using Sleuth Kit tools.
Steps:
- Open a terminal.
- Identify the partition you want to examine:
sudo fdisk -l
- Use
fsstatto display the file system details:sudo fsstat /dev/sdX1
- Use
flsto list the files and directories in the partition:sudo fls -r /dev/sdX1
Expected Output: You should be able to view the file system structure and details of the specified partition.
Objective: Use TestDisk to recover deleted files from a Linux file system.
Steps:
- Open a terminal.
- Start TestDisk:
sudo testdisk
- Follow the on-screen instructions to select the disk and partition you want to recover files from.
- Choose the option to list files and navigate to the directory containing deleted files.
- Select the deleted files you want to recover and copy them to a safe location.
Expected Output: You should be able to recover deleted files and save them to your specified location.
Objective: Use Extundelete to recover deleted files from ext3/ext4 partitions.
Steps:
- Open a terminal.
- Identify the partition you want to recover files from:
sudo fdisk -l
- Unmount the partition (if it is mounted):
sudo umount /dev/sdX1
- Use Extundelete to recover deleted files:
sudo extundelete /dev/sdX1 --restore-all
- Check the output directory (usually
RECOVERED_FILES) for the recovered files.
Expected Output: You should be able to recover deleted files from ext3/ext4 partitions and find them in the output directory.
Objective: Use Sleuth Kit to analyze file metadata and understand file system changes.
Steps:
- Open a terminal.
- Use
istatto display detailed metadata of a specific file:sudo istat /dev/sdX1 <inode_number>
- Use
icatto extract the content of a specific file:sudo icat /dev/sdX1 <inode_number> > recovered_file
Expected Output: You should be able to view and analyze file metadata, and extract file content using Sleuth Kit tools.
Objective: Learn how to create and analyze disk images for forensic investigations.
Steps:
- Open a terminal.
- Use
ddto create a disk image of a partition:sudo dd if=/dev/sdX1 of=disk_image.dd bs=4M
- Use
mmlsfrom Sleuth Kit to display the partition layout of the disk image:sudo mmls disk_image.dd
- Mount the disk image as a loop device and analyze its contents:
sudo mount -o loop,ro disk_image.dd /mnt cd /mnt ls -l
Expected Output: You should be able to create a disk image and analyze its contents, identifying key file system artifacts.
With these exercises, you will gain practical experience in analyzing Linux file systems and recovering deleted files. This will enhance your skills in digital forensics and help you effectively investigate and recover valuable data from Linux systems.