Lab7 Snort
Lab7 Snort
We will be using SNORT NIDS in this assignment. Its easy to use it or install it within Linux based systems. If
you have one, you dont need to use Deterlab for this assignment. If you dont have one, reserve one machine
in Deterlaband use it for this assignment (Reserve one or two machines)
-------------------------------- SNORT.ns-----------------------------------
sourcetb_compat.tcl
$ns run
-------------------------------------------------------------------------------------------------------------------
Read the comments in /etc/snort/snort.conf carefully and pay attention to the definition of variable
HOME_NET and EXTERNAL_NET.
You can test configuration by:
sudosnort -T -c /etc/snort/snort.conf
Then try running Snort as root: (basic command with no options sudo snort, monitoring mode). Image
below after trying ping to the node.
$sudo snort -c /etc/snort/snort.conf
Watch the output carefully, and address any errors in your config file. (Hint: some default .rules files
contain deprecated format, try to comment those files in the config file). Continue re-running snort until
you get it working correctly.
The file (local.rule) is created for users to add their own rules (as its empty by default). We will add our
experimental rules to this one
Next, verify in your Snort logs that your attack triggered an alert based on that. (Hint:/var/log/snort/)
Step 3: Snort also allows us to write custom rules. Open the file /etc/snort/rules/local.rules and add one rule
that detects each visit to www.google.com that is made by the virtual machine. The rule should look for any
outbound TCP traffic that is going to port 80 and contains the pattern "www.google.com" in the URL and trigger
an alert when it gets a match. Give the rule an SID of 1000000 or higher. Then visit Google with a web browser
and check if your rule triggered an alert.
Record your screenshots as steps to write and test your (google) created rule
Questions:
1. In step 1, how did you modify the config file to make it work?
2. In step 2, describe the two attack signatures you chose and explain the corresponding rules against them.
How did you attempt to trigger the alert? How did snort process your requests?
3. In step 3, copy/paste your new rule here. How did you confirm that your rule was enforced by snort?