In the second course project, you will install an operating system with a variety of vulnerabilities and then install tools that monitor attacks into it. After you have the system running, you will work with penetration testing software to attack the system. Please note that this project is challenging and completing it may take a lot of time if you're not comfortable with the command line.
The system that you are expected to install is Metasploitable 3. We recommend that you create a virtual machine for the installation by, e.g., using Virtualbox (See installation notes in Appendix A on the bottom of the page). Once you have the Metasploitable 3 virtual machine running, install Snort into it -- see their F.A.Q.. Make sure that your Snort (community) rules are up to date.
Now you have a system that you can attack! Next, download Metasploit and get familiar with it.
As a primer to the attacks, read Intrusion detection evasion: How Attackers get past the burglar alarm.
Start your attacks by a simple port scan. If you worked through the Securing Software -course, you can also use the portscanner that you implemented as a part of the first assignments.
You will then write a brief (1000 words) report with the title "Is it easier to fix the application than to detect attacks?". Include at least three attacks that Snort could identify and two attacks that Snort could not identify into the report. If you cannot find any attacks that Snort cannot identify, remove some of the Snort rules (and include description about this into the report as well!).
Once your report is completed, you will review three reports from other course participants. Note that your report should be +- 20% of the expected report length and it must include the content expected above.
Returning the project
Performing the reviews
Appendix A: Installation notes
- Download and install Virtualbox and Vagrant.
- Download the Vagrantfile on to your local machine and use vagrant to build it, i.e., "vagrant up" in the same folder as the Vagrant file.
- The default address, username and password can be read from the Vagrantfile.
- Log into the newly created box. (vagrant ssh)
- Install snort to the box, i.e., "apt install snort"
- wget https://www.snort.org/downloads/community/community-rules.tar.gz
- Unpack it to snort rules folder ("/etc/snort/rules/"), i.e., "tar xzf community-rules.tar.gz -C /etc/snort/rules"
- wget the emerging rules set, i.e., wget https://rules.emergingthreats.net/open/snort-2.9.0/emerging.rules.tar.gz
- "tar xzf emerging.rules.tar.gz -C /etc/snort/rules/"
- Modify the "/etc/snort/snort.conf" to include all the rules in the "/etc/snort/snort.conf" or use the one we provided: snort.conf
- Note that some of the rules may conflict and cannot be enabled at the same time.
- Do remember that in a production setup you would not enable all of the rules by default but would choose a set of rules that you think are the important ones. Which of them are, there is a good question?
- Finalize snort configuration. We for example changed the file /etc/snort/snort.debian.conf to to the following: snort.debian.conf.
- Restart snort with "sudo service snort restart"
- Test the box and it's snort with metasploitable commandline, i.e., msfconsole
- Some usefull commands to use in msfconsole are:
- use [exploit/...]
- set RHOST [targetIP]
- show options
- search [KEYWORD]
- You can check that snort logged by tailing "/var/log/syslog" (or "/var/snort/snort.log", depending on your configuration). If that doesn't work you can try starting snort from the command line -- you can force it to print straight to the console with the right options.
- Note that you can see malformed traffic without any attacks.