Install Snort Intrusion Detection System

From BubbaWiki
Revision as of 15:45, 24 December 2010 by Asad (talk | contribs) (Created page with 'Installing Snort Intrusion Detection System. Snort is an intrusion detection system that can monitor network traffic and alert on malicious traffic or just monitor what users ar...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Installing Snort Intrusion Detection System.

Snort is an intrusion detection system that can monitor network traffic and alert on malicious traffic or just monitor what users are doing on the network.

apt-get install snort

When snort asks for the interface, enter: br0
When snort asks for the network mask, enter: 192.168.0.0/16 (This includes the Bubba LAN network, and any additional networks you may create later for VPN, as long as they start on 192.168.*.*)
Do not select yes to disable promiscious mode.
You may enter an email address to e-mail alerts to.
Enable missing rules (In this case we enable the the porn, chat and p2p rules)

nano /etc/snort/snort.conf

Uncomment the lines below and save the file.

# Policy related rules:
# include $RULE_PATH/policy.rules
# include $RULE_PATH/community-policy.rules
include $RULE_PATH/porn.rules
# include $RULE_PATH/community-inappropriate.rules
include $RULE_PATH/chat.rules
# include $RULE_PATH/multimedia.rules
include $RULE_PATH/p2p.rules
# include $RULE_PATH/community-game.rules
# include $RULE_PATH/community-misc.rules

Example: Change the chat.rules file to get the complete MSN Message:

nano /etc/snort/rules/chat.rules

Edit the actual rule:

alert tcp $HOME_NET any <> $EXTERNAL_NET 1863 (msg:"CHAT MSN message"; flow:established; content:"MSG "; depth:100; content:"Content-Type|3A|"; nocase;

content:"text/plain"; distance:1; classtype:policy-violation; sid:540; rev:11;)

Here we change depth:1 to 100 which means, display the first 100 bytes from the match.

Restart snort

service snort restart

To start snort

service snort start

To stop snort

service snort stop

To check snort status

service snort status

  Change snort parameters later:

dpkg-reconfigure snort

Check snort alerts: (For example filter all MSN traffic)

cat /var/log/snort/alert | grep -B5 MSN

Tutotial not finished yet.