CY 2550 - Foundations of Cybersecurity
Project 6: Forensics
Description and DeliverablesIn this project, you will play the role of digital forensic analyst. You will be given a bootable disk image that was captured from a server that may-or-may-not have been hacked and infected with malware. Your job is to traces the attacker's footsteps from the origin of the breach, all the way to their ultimate payload.
To receive full credit for this project, you will turn in a single file:
- A file named answers.txt.asc that contains the answers to the five questions posed below. This file must be signed using your private GPG key, and encrypted using the class GPG public key.
Brief Introduction to Digital ForensicsDigital forensics is the art of investigating computer systems to identify and isolate evidence. Forensics has applications to law enforcement as well as compromise triage more generally. In the former case, law enforcement officers must follow strict protocols governing electronic evidence to maintain the "chain of custody" of any evidence that is obtained so that it is admissable in court. This often involves the use of specialized digital forensics equipment that has been certified for use in law enforcement contexts. In the latter case, the goal of triage is typically to determine how an attacker broke into a system, what they did while they had access, determining whether the attacker still has access (e.g. did they plant a backdoor or rootkit?), and ultimately disinfecting the system so that the attacker no longer poses a threat. You will engage in this latter task, i.e. triaging a compromised system.
Getting StartedIn this project, you will play the role of a digital security expert who has been asked to forensically analyze a disk image that was captured from a compromised server. This server, owned and maintained by an employee of Happy Funtime Plastic Co., hosted a simple website that allowed people to upload and view images. However, the owner of the server began to notice strange behavior on the server, so they shut it down, cloned the hard drive to an image file, and sent the image to you for analysis. The disk image can be downloaded here:
- Server Image (warning: this file is 3 gigabytes, it may take a few minutes to download)
Note that while this assignment simulates a server that has been hacked and infected with malware, it is perfectly safe. Booting into this system is not a security risk to you or your host operating system.
- What was the name of the malicious script uploaded to the web server?
The HFPC employee who maintained this server believes that the attacker somehow broke into the server through this website, but is unsure how. Thus, you should begin your investigation here.
The web server uses the standard Apache web server software package. The configuration files for the Apache software are located in /etc/apache2/, and the files that compromise the website itself are located in /var/www/html/. Apache logs all incoming HTTP requests in the file /var/log/apache2/access.log; any requests that generate errors are logged in /var/log/apache2/error.log.
There is enough information left in these places to piece together how the attacker was able to initially breach the server. Once you've figured out how the initial breach occurred, move on to the next question.
- At what date/time did the attacker first log-in to the server?
- What critical system file was viewed/stolen by the attacker? Give the full path to this file.
- What is the name of malicious process running on this machine?
One way to schedule processes to run periodically on Linux systems is the Cron tool. Cron is like an alarm clock: it can be configured to run other programs on a schedule, i.e. once a day, once a week, or once a minute. Cron has various configuration files, all located in /etc/. /etc/crontab is the system-wide Cron configuration file, and there are additional, per-process configuration files in the folders /etc/cron.d/, /etc/cron.hourly/, /etc/cron.daily/, /etc/cron.weekly/, and /etc/cron.monthly/.
- What binary was back-doored? Give the full path.
One way to achieve these ends is by modifying the system utilities that everyone uses to manage to their systems (e.g. programs like ls and ps). In this case, did the attacker attempt to back door any system utilities? One way to see if system programs have been modified is by running the debsums tool: it checks the cryptographic hash of all system files and compares them to a list of known-good hashes. debsums prints "FAILED" for any file that appears to have been modified.
File Format for answers.txt.ascTo receive full credit on this assignment, you must turn in a single (ASCII formatted with Unix-style line breaks) text file named answers.txt.asc that contains the answers to the five questions given above. Note the .asc file extension: this is the default extension used by GPG when it produces encrypted files.
You should create a file named answers.txt that contains your answers. Each answer should be on its own line. For example, your answers.txt file might look like the following:
definitely_not_malware.exe Jan. 21 15:10:49 /usr/local/spark/sbin/start-all.sh gremlin-daemon /usr/bin/system-integrity-checkYour file should contain exactly five lines. Lines 1 and 4 should name particular files/processes. Lines 3 and 5 should state the full path of a file. Line 2 should be a date/time in exactly the format given above, i.e. three-letter abbreviated month, two digit day, and six digit hour:minute:second in 24-hour format.
Take your answers.txt file and encrypt and sign it with GPG. By default, this will produce a new, encrypted and signed file named answers.txt.asc. This is the file you will turn in. Make sure to sign the file using your private key, and encrypt it using the class GPG public key.
Submitting Your ProjectBefore turning in the project, you must register yourself for our grading system using the following command:
$ /course/cs2550sp19/bin/register-student [NUID]NUID is your Northeastern ID number, including any leading zeroes. This command is available on all of the Khoury College lab machines.
In this assignment, you will turn in exactly one file:
- An encrypted and signed answers.txt.asc file containing the answers to the above questions. As noted above, the file must be formatted with one answer per line. Make sure your file uses Unix-style line endings before you submit (by using the file and dos2unix commands).
$ /course/cs2550sp19/bin/turnin project6 <project directory>where <project directory> is the name of the directory with your submission. The script will print out every file that you are submitting, so make sure that it prints out all of the files you wish to submit! The turn-in script will not accept submissions that are missing answers.txt.asc. You may submit as many times as you wish; only the last submission will be graded, and the time of the last submission will determine whether your assignment is late.
At any time, you can run the following command to see all of your current grades for projects, essays, quizzes, and tests.
GradingThis project is worth 10% of your final grade, broken down as follows (out of 100):
- 20 points each per answer (five answers)