Linux/MacOS Image Analysis with Autopsy
In this lab, you will capture a forensic image of a Linux filesystem and analyze it using the Autopsy web interface to the sleuthkit tools. In order to keep the size of the image and time required for the task to a minimum, we will create a small filesystem specifically for this purpose.
Create filesystems to capture on virtual disk under Linux
Create a small filesystem on a tiny drive that we can use for our forensic image
- On your Linux VM
- Shutdown your Linux client OS
- Add a hard disk to your VM, 100MB in size is enough
- Boot your VM
- Start a terminal window
- In your terminal window, identify the drive name using the fdisk or lsblk command (i.e. look for the 100MB drive)
- Use fdisk or a similar tool to put a single partition on the drive, be very careful you use the right drive name
- at the fdisk prompt, enter n to make a new partition and just take the defaults for all questions it asks so that you get a single partition that includes the entire drive
- when you get the fdisk prompt again, enter w to write the partition table to the disk
- Make a typical Linux filesystem in the partition
sudo mkfs -t ext4 /dev/sdb1
- Make a directory to attach the new drive to
- Mount the new drive so you can access the files on it
sudo mount -t ext4 /dev/sdb1 /m
- On the new drive, create some files, then delete some files, so you will have the opportunity to compare the results of deleting files in Linux versus Windows
sudo bash << EOF
cd /m
wget zonzorp.net/pics.zip
unzip pics.zip
mv pics.zip /root
rm -rf catfiles
EOF
- Detach the new drive so it can be imaged
- Create an image file from the new drive, install dc3dd first if necessary be very careful you use the right drive name
sudo apt update
sudo apt install dc3dd
sudo dc3dd if=/dev/sdb hash=md5 hash=sha1 hash=sha256 hash=sha512 hlog=linuxdrive.hlog | gzip > linuxdrive.dc3dd.gz
- Copy your image file and hash files to your Forensics station (where you installed the Autopsy tool)
- Open a new case and add a host for the suspect machine under investigation
- Add an image file data source, using the image file we just captured named linuxdrive.dd
- For image file import, put in your hash values from the linuxdrive.hlog file
- This is our only image file, so just click Ok when it is done
- Return to the Filesystem list, and Explore the Analyze function, as well as the timeline function
Grading
This lab is not marked. It is a learning activity to gain familiarity with doing storage device imaging.