In this lab, we will try capturing forensic images of filesystems using various tools. In order to keep the size of the images and time required for the task to a minimum, we will create a small drive specifically for this purpose. In order to use tools for both Windows and Linux, we will create filesystems which are Windows-compatible. We will conveniently ignore the main Windows drive because it is too big. While searching a real drive is a valuable exercise, it is also very time consuming.
The scenario we will emulate is one where Donald has downloaded some files from the internet to his work computer. Donald then became concerned that he shouldn’t have those files on the work computer, and deleted some of them. But most of the people in the office saw him do this (he does things like this all the time) and several reported to their manager that he was using his computer for inappropriate activities, because the company does sensitive military work and there are strict policies about how computers get used. It is well known amongst the group of co-workers that Donald is a Clint Eastwood fan and regularly uses his work computer to find photos of him on company time. We have been instructed by our manager Robert to examine Donald’s disk to see if the allegations made by his co-workers are true. It is policy in our company that anything kept on work equipment is the property of the company and no expectation of privacy is warranted. Robert has the authority to have Donald’s computer searched.
First we will have to commit Donald’s misconduct. We will make a small second drive to put the files on to make the imaging tasks faster and more focused. We will download the files, then delete them and remove the drive.
The first step in the investigation is to get authorization and the definition of the investigation including its scope. The next step is to identify what evidence we will examine. The next step is to gather the evidence, i.e. make an image of the drive. As we perform these tasks, we need to document our activities so that our results are credible and usable. Your final report should document your work on this investigation, what you did, when you did it, and who else may have been involved in your doing it. Create a directory to hold all the files related to this investigation and start a document file to record a list of your activities. Add entries describing the purpose of the investigation, the evidence items identified, and the authorization obtained to access the evidence items.
mkdir -p ~/Documents/Donald-investigation
cd ~/Documents/Donald-investigation
vi activities.txt
Now we will take the role of investigator. First we will create or appropriate a forensics computer. Then we will attach the suspect drive to our forensics system, and image the evidence drive in multiple ways.
apt update
apt install dc3dd gzip
sudo lshw -class disk -businfo
sudo fdisk -l /dev/sdb
sudo dd if=/dev/sdb bs=1M | gzip > wholedrive.dd.gz
sudo dd if=/dev/sdb1 bs=1M | gzip >part1.dd.gz
sudo dd if=/dev/sdb2 bs=1M | gzip >part2.dd.gz
sudo apt update
sudo apt install dc3dd
sudo dc3dd if=/dev/sdb hash=md5 hash=sha1 hash=sha256 hash=sha512 hlog=wholedrive.hlog | gzip > wholedrive.dc3dd.gz
gunzip wholedrive.dd.gz wholedrive.dc3dd.gz
cmp wholedrive.dd wholedrive.dc3dd
gzip wholedrive.dd wholedrive.dc3dd
gunzip < wholedrive.dd.gz|md5sum > wholedrive.md5
gunzip < wholedrive.dd.gz|sha1sum > wholedrive.sha1
gunzip < wholedrive.dd.gz|sha256sum > wholedrive.sha256
gunzip < wholedrive.dd.gz|sha512sum > wholedrive.sha512
more wholedrive.md5 wholedrive.sha*
Use the following command to properly shutdown your ubuntu VM.
sudo poweroff
When the VM has finished shutting down, use your file manager to find the files for your VM, which typically will be in a directory called Virtual Machines
in your home directory. Open the file for your vm called VMNAME.vmx and add the following line to the end of the file.
disk.EnableUUID = "TRUE"
Now use the VM or Virtual Machine menu in VMWare to create a snapshot. You should create a snapshot after every lab is completed, so that if you mess something up, the worst impact is that you will have to go back to your snapshot and redo the current lab. If you don’t have the snapshots, you will have to start back at lab 0 if you mess up your VM during the semester. Once you have made the snapshot, you can run the VM again in VMWare so that it is ready for use in the next lab.
This lab is preparation for the filesystem analysis lab. This lab is not marked, but the files produced will be required for the filesystem lab.