SCENARIO
The objective of this laboratory test, scenario is to create a solution and instructions for testing an IDS\^1 systems usefulness for detecting attacks against a wordpress site. In addition, a repeatable process to evaluate vendor claims. Whatever passive IDS system sample delivered as a VM or a dedicated box. Creating the IDS system itself is out of scope.
The process must be detailed enough so that somebody else can get the same results when applying that. The “other person” is expected to have IT knowledge sufficient to install and run a Linux desktop. Budget requirements: Modest – 2 machines + a tester (Joe) + networking equipment to connect the two machines and an IDS together. The process must test at least the following attacks:
-
Port scan
-
SYN flood
-
“Regular” DoS overwhelming attack (Ab)
Optionally the process may test:
-
slowloris/pyloris
-
Apache Range header DoS vulnerability http://httpd.apache.org/security/CVE-011-3192.txt
-
An attack targeting any other fairly recent (not older than 3-4 years) known vulnerability that could in theory apply to the target system (wordpress server)
However the competition rules are: The highest number of attacks evaluated. Limits:
-
Each attack must be relevant eg. if it attacks IIS it’s NOT relevant. If it attacks Windows RPC it’s not relevant. If it attacks some other CMS eg. Drupal it’s NOT relevant. * Basically equivalent attacks count as one (different port scanners for example).
-
You must be able to explain in broad terms what the attack does eg: attacks the vulnerability #X in Apache server If the #attacks is equal.
Lab instaractions:
Install 3 VM-s: Attacker IDS and Target
1. Make sure all VM-s have two network adapters: NAT and Host-Only.2. Install Snort and it’s GUI called “acidbase” on IDS https://help.ubuntu.com/community/SnortIDS.
3. Install Apache, Mysql and WordPress on Target.
4. Execute an attack on Attacker towards the IP address on the Host Only network.
5. Take notice of the results displayed on Acid console.
6. Reset counters, move on to next attack.
Additionally, illustration 1 describes the overview of above scenario
Illustration 1: Lab 5 Illustration of Scenario
Firstly, setup procedure of snort, secondly available proposals and thirdly illustrating the results and the functionality of proposals. Finally, closing this laboratory report with conclusion. In addition, appendixes is configuration of VM’s – Virtual Machines.
SETUP of SNORT
To setup snort in a right way, that will work for the second Host only network please following the instruction link provided with a full description and configuration of snort [SNORT2].
After completing the setup and configuration to run snort on the second interface use the following command:
snort -c /etc/snort/snort/conf -i eth1
PROPOSALS
In total three proposals and each one is highlighted in the next sub-sections.
PROPOSAL 1
Full instructions
1. Set up IDS (Snort) and WordPress on the first PC
2. Install Ubuntu server on the second PC . Then install all attacking tools there:
```wget enos.itcollege.ee/\~avein/lab4i.sh
sudo sh lab4i.sh
cd /pentest/enumeration/ids/pytbull/
gedit config.cfg
Example conf file: http://www.tud.ttu.ee/\~t061780/attacks/config.cfg
Now get custom DoS module to have hping SYN flood and ApacheBench DoS tests covered.
cd modules
mv denialOfService.py denialOfService.py-backup
wget http://www.tud.ttu.ee/\~t061780/attacks/denialOfService.py
You may want to refer to Pytbull documentation
cd /pentest/stressing
wget www.tud.ttu.ee/\~t061780/attacks/slowloris.pl
Slowloris attack has been written into DoS module, you have to uncomment it. Lines 47-52.
gedit /pentest/enumeration/ids/pytbull/modules/denialOfService.py
Step 2: Quick-Install OpenVAS
Step 3: Quick-Start OpenVAS
(copy and paste whole block, during first time you will be asked to set a password for user “admin”)
Step 4: Log into OpenVAS as “admin”
Open https://localhost:9392/
or start “gsd”
on a command line as a
regular user (not as root!). Optional we can use and the Slowloris and
Pyloris DoS attacks.
Download link for Slowloris is: http://ha.ckers.org/slowloris/slowloris.pl
The above solution and tool will help us to check and test our IDS system usefulness. It tests the following attacks: Port scan, SYN flood, DoS, etc. The results are presented with nice GUI interface. For more info about the project please refer to www.openvas.org.
RESULTS
After executing the above proposal we will highlight the results. Nevertheless, only the Proposal 1 was able to run the test. Others two, Proposal 2 and Proposal 3 were unsuccessful of installation process and configuration and to run the attacks. Moreover, the result are presented from the total amount of reports, registered alerts in the snort. This is done by help of web interface of Basic Analysis and Security Engine in addition Analysis Console for Intrusion Databases (ACID) project tool [ACID]. Therefore, the result from the Proposal 1 and from the rest are highlighted below:
- Proposal 1
- DoS – registered alerts: 2;
- Port scan : 8;
- synf.sh: 1344;
- slowloris.pl: 1782;
-
apachekiller.pl: not working;
-
Proposal 2
-
pytbull: 0, the message was: Error: FTP error, 550 failed to open file.
-
Proposal 3
- Too complicated to be configured and installed. The instructions and the procedures should be more easy. After few hours of configuring and test, tweaks are is still not working. Yet there are many good tutorials how to configure OpenVAS please refer [OpenVas1] and [OpenVas2].
CONCLUSION
Primarily, setting-up IDS, the Snort, it is not an easy task to complete. On the other hand, configuring, installing, etc. the testing tools for IDS system is even more complicated. Therefore, the Proposal 1 has the best solution and installation process of the test tools. Despite, that it was the only one that worked. Finally, recommendation for the IDS solutions and in addition to the penetrating tools to test the usefulness of IDS has to be more simple and stepwise solution. However, the above scenario and proposals are great tools and solutions for a future reader.
APPENDIXES
Appendix 1 is the configuration of the attacker virtual machine, in more detail Blacktrack distribution. Secondly, Appendix 2 is the ubuntu wordpress configuration server and additional is the configuration and setup process and refer links of IDS Snort virtual machine.
APPENDIX 1
- Installation media: Black Track 5 GNOME 32bit iso image;
- HW: Virtualbox, 1CPU 32bit, 512MB RAM, 8GB HD (dynamic allocation);
- NIC1 NAT;
- NIC2 host only (for ssh and http access from host);
- Downloadable link: http://www.backtrack-linux.org/downloads/
APPENDIX 2
- Installation media: Ubuntu 10.04 32bit iso image;
- HW: Virtualbox, 1CPU 32bit, 512MB RAM, 8GB HD (dynamic allocation);
- NIC1 NAT;
- NIC2 host only (for ssh and http access from host);
- Language used in installation process: English and country Estonia;
- Keyboard Layout English;
- Hostname: pece
- Partition methods: Guided, use entire disk
- Username: pece
- no http proxy
- Default applications
Change the settings to your needs.
APPENDIX 3
- Installation media: Ubuntu 10.04 32bit iso image;
- HW: Virtualbox, 1CPU 32bit, 512MB RAM, 8GB HD (dynamic allocation);
- NIC1 NAT;
- NIC2 host only (for ssh and http access from host);
- Language used in installation process: English and country Estonia;
- Keyboard Layout English;
- Hostname: pece
- Partition methods: Guided, use entire disk
- Username: pece
- no http proxy
- Default applications
- Snort configuration and installation refer to [SNORT1] in addition, please refer to [SNORT2].
Bibliography
SNORT2: Nick Moore, Snort 2.8.4.1 Ubuntu 9 Installation Guide, June 2009, http://www.snort.org/assets/113/Snort_2.8.4.1_Ubuntu.pdf
ACID: Basic Analysis and Security Engine, Welcome to the Basic Analysis and Security Engine (BASE) project, 2008, http://base.secureideas.net/about.php
OpenVas1: NA, Backtrack 5- OpenVas Tutorial, NA, http://www.ehacking.net/2011/06/backtrack-5-openvas-tutorial.html
OpenVas2: BackTrack Linux, Getting started with OpenVas, June 2011, http://www.backtrack-linux.org/wiki/index.php/OpenVas
SNORT1: kat-amsterdam, SnortIDS, December 2010, https://help.ubuntu.com/community/SnortIDS
[1] IDS – Intrusion detection system