Intrusion Detection and Prevention



Similar documents
Lab exercise: Working with Wireshark and Snort for Intrusion Detection

Intrusion Detection and Prevention: Network and IDS Configuration and Monitoring using Snort

IDS and Penetration Testing Lab III Snort Lab

Network Security, ISA 656, Angelos Stavrou. Snort Lab

Exercise 7 Network Forensics

EZ Snort Rules Find the Truffles, Leave the Dirt. David J. Bianco Vorant Network Security, Inc. 2006, Vorant Network Security, Inc.

Lab 3: Recon and Firewalls

How To Set Up A Network Map In Linux On A Ubuntu 2.5 (Amd64) On A Raspberry Mobi) On An Ubuntu (Amd66) On Ubuntu 4.5 On A Windows Box

Introduction to Intrusion Detection and Snort p. 1 What is Intrusion Detection? p. 5 Some Definitions p. 6 Where IDS Should be Placed in Network

disect Systems Logging Snort alerts to Syslog and Splunk PRAVEEN DARSHANAM

IDS and Penetration Testing Lab II

Vulnerability analysis

An Open Source IPS. IIT Network Security Project Project Team: Mike Smith, Sean Durkin, Kaebin Tan

NETWORK SECURITY. Scott Hand. Melanie Rich-Wittrig. Enrique Jimenez

Intrusion Detection & SNORT. Fakrul Alam fakrul@bdhbu.com

CHAPETR 3. DISTRIBUTED DEPLOYMENT OF DDoS DEFENSE SYSTEM

Lab Objectives & Turn In

From Network Security To Content Filtering

Snort. A practical NIDS

Make a folder named Lab3. We will be using Unix redirection commands to create several output files in that folder.

IDS and Penetration Testing Lab ISA656 (Attacker)

Intrusion Detection System Based Network Using SNORT Signatures And WINPCAP

nmap, nessus, and snort Vulnerability Analysis & Intrusion Detection

Intrusion Detection Systems

AlienVault Unified Security Management (USM) 4.x-5.x. Deploying HIDS Agents to Linux Hosts

Security Power Tools

Firewalls and Software Updates

Threat Advisory: Trivial File Transfer Protocol (TFTP) Reflection DDoS

Penetration Testing Lab. Reconnaissance and Mapping Using Samurai-2.0

IDS Categories. Sensor Types Host-based (HIDS) sensors collect data from hosts for

APPENDIX 1. DDoS RULES

Lab 1: Network Devices and Technologies - Capturing Network Traffic

Packet Sniffers. * Windows and Linux - Wireshark

Tk20 Network Infrastructure

Information Security Training. Assignment 1 Networking

These instructions will allow you to configure your computer to install necessary software to access mystanwell.com.

To read more Linux Journal or start your subscription, please visit

Device Integration: Checkpoint Firewall-1

During your session you will have access to the following lab configuration. CLIENT1 (Windows XP Workstation) /24

Passive Logging. Intrusion Detection System (IDS): Software that automates this process

Monitoring Clearswift Gateways with SCOM

Deploy the ExtraHop Discover Appliance with Hyper-V

Penetration Testing LAB Setup Guide

Penetration Testing LAB Setup Guide

Network Intrusion Analysis (Hands-on)

Websense Web Security Gateway: What to do when a Web site does not load as expected

Author: Sumedt Jitpukdebodin. Organization: ACIS i-secure. ID: My Blog:

Intrusion Detection in AlienVault

Lab 2: Secure Network Administration Principles - Log Analysis

Network Security Monitoring

Creating an ESS instance on the Amazon Cloud

Hadoop Data Warehouse Manual

Viking VPN Guide Linux/UNIX

Introduction. Installation of SE S AM E BARCODE virtual machine distribution. (Windows / Mac / Linux)

Why do I need a pen test lab? Requirements. Virtual Machine Downloads

Security Monitoring and Architectures for Security Logging

REQUIREMENTS AND INSTALLATION OF THE NEFSIS DEDICATED SERVER

Networks and Security Lab. Network Forensics

EFFECTIVE IMPLEMENTATION OF DYNAMIC CLASSIFICATION FOR NETWORK FORENSIC AND TRAFFIC ANALYSIS

APPLICATION NOTE. How to build pylon applications for ARM

WatchGuard Dimension v1.1 Update 1 Release Notes

Altor Virtual Network Security Analyzer v1.0 Installation Guide

QNAP SYSTEMS INC. QNAP Digital Signage Player Web Console Manual

CSE331: Introduction to Networks and Security. Lecture 17 Fall 2006

60467 Project 1. Net Vulnerabilities scans and attacks. Chun Li

STABLE & SECURE BANK lab writeup. Page 1 of 21

Network Security EDA /2012. Laboratory assignment 4. Revision A/576, :13:02Z

Overview - Snort Intrusion Detection System in Cloud Environment

Security Advisory. Some IPS systems can be easily fingerprinted using simple techniques.

Installation Guide. Before We Begin: Please verify your practice management system is compatible with Dental Collect Enterprise.

Detecting Attacks. Signature-based Intrusion Detection. Signature-based Detection. Signature-based Detection. Problems

CIS 4361: Applied Security Lab 4

Vulnerability Assessment Lab

Building a Penetration Testing Virtual Computer Laboratory

the barricademx end user interface documentation for barricademx users

Backup & Disaster Recovery Appliance User Guide

Server Configuration and Deployment (part 1) Lotus Foundations Essentials

Smartphone Pentest Framework v0.1. User Guide

Intrusion Detection System

Contents. Platform Compatibility. GMS SonicWALL Global Management System 5.0

EINTE LAB EXERCISES LAB EXERCISE #5 - SIP PROTOCOL

Linux Network Security

Chapter 14 Analyzing Network Traffic. Ed Crowley

NCS 430 Penetration Testing Lab #2 Tuesday, February 10, 2015 John Salamy

Security Event Management. February 7, 2007 (Revision 5)

PHD Virtual Backup for Hyper-V

How to install PowerChute Network Shutdown on VMware ESXi 3.5, 4.0 and 4.1

HOWTO: Set up a Vyatta device with ThreatSTOP in bridge mode

Using Virtual Machines

Introducing the Adafruit Bluefruit LE Sniffer

5nine Security for Hyper-V Datacenter Edition. Version 3.0 Plugin for Microsoft System Center 2012 Virtual Machine Manager

HOWTO: Set up a Vyatta device with ThreatSTOP in router mode

INASP: Effective Network Management Workshops

Using RADIUS Agent for Transparent User Identification

WRITING HONEYPOINT PLUGINS WITH HONEYPOINT SECURITY SERVER

Configuring Snort as a Firewall on Windows 7 Environment

Transcription:

Intrusion Detection and Prevention

Packet Capture The first step in understanding how an IDS works is to understand packet capture. The best way to do this is to grab some packets with TCPdump. TCPdump is built upon BPF which takes a filter and compiles it into machine code that is used to filter in packet stream for only those packets that you're interested in.

TCPdump There are a lot of command line options for TCPdump. Here's a common way in which it is run: tcpdump -i le0 -n -c 20 -s0 -i le0 capture packets from the eth0 interface -n do not resolve IP addresses -c 10 stop after capturing 10 packets -s0 capture packets with "full snap length" Other commonly use command line options include -X, -w filename, -r filename

Exercise #1 - Capturing Packets Use TCPdump to capture some packets on the victim network: 1. Make sure that all VMs are up and running. 2. Start up TCPdump on the Linux Victim host sudo tcpdump -i le0 -n -c 100 -s0 3. Scan the internal network from the Linux Attacker nmap -sp 172.16.10.0/24 4. Restart TCPdump on the Victim (if necessary) 5. Scan the Victim host from the Attacker nmap -A 172.16.10.10

Exercise #1a - Capturing Packets Use TCPdump to capture more packets on the victim network: 1. Restart TCPdump on the Victim with the -X flag sudo tcpdump -i le0 -n -c 100 -s0 -X 2. Nmap the victim network from the Attacker nmap -A 172.16.10.1-20

Snort Snort is one of the most commonly used Intrusion Detection Systems in use today. It's so popular because it's free, it's very good at what it does and it's well supported. You can even buy commercial versions from SourceFire. It's also very well documented.

Snort Rules Let's look at an example rule and take it apart: alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any (msg:"shellcode Linux shellcode"; content:" 90 90 90 E8 C0 FF FF FF /bin/sh"; reference:arachnids,343; classtype:shellcode-detect; sid:652; rev:9;)

Snort Rules Let's make that a little more readable and examine it: alert ip $EXTERNAL_NET $SHELLCODE_PORTS -> $HOME_NET any ( msg:"shellcode Linux shellcode"; content:" 90 90 90 E8 C0 FF FF FF /bin/sh"; reference:arachnids,343; classtype:shellcode-detect; sid:652; rev:9; )

Exercise #2: Snort in pfsense The first step to getting Snort into pfsense is to download and install the snort package for pfsense. This has already been done for you here, but here are the steps. 1. On the Linux Victim, open Firefox and go to http://172.16.10.254 2. Go to System -> Packages 3. Snort is already installed, but examine the other available packages

Exercise #3: Installing Snort Rules Snort isn't much good until it has some rules to work with. By default, the snort package for pfsense comes with no rules at all. To install the standard rules, you have to register for an account at www.snort.org and then generate an oinkmaster code. Again, this has already been done for you, but here are the steps. 1.Point a browser at www.snort.org 2.Create a new snort.org account (click on Not Registered?) 3.Wait for the email to come back... 4.Log in using your snort.org account and generate an oinkmaster code 5.You'll get a really long hex string for your oinkmaster code 6.Go back to the Linux victim, point a browser at the pfsense console and log in 7.Go to Packages -> Snort -> and enter your code 8.Go to Packages -> Snort -> Update Rules and wait for snort to update itself 9.You are now running snort with (relatively) up to date rules

Exercise #4: Generate Some Alerts Now that snort is installed and is running with updated rules let's generate some alerts. 1. Start the nessus client on the Attacker nessus 2. Login to nessus and start a scan of 172.16.10.10 3. In the pfsense web console, go to Services -> Snort -> Alerts 4. Refresh a few times if there are no alerts

Exercise #5: Under The Hood Snort and all of the configuration files that are documented are sitting on pfsense. If you are feeling adventurous and know what you're doing, you edit them directly. This is not recommended. 1. On the pfsense VM, enter a command shell (option 8) 2. cd /usr/local/etc/snort 3. snort.conf contains the primary configuration files for Snort

Questions?

Intrusion Detection and Prevention

Packet Capture The first step in understanding how an IDS works is to understand packet capture. The best way to do this is to grab some packets with TCPdump. TCPdump is built upon BPF which takes a filter and compiles it into machine code that is used to filter in packet stream for only those packets that you're interested in.

TCPdumpTherearealotofcomandline comonwayinwhichitisrun:tcpdump-ile0-n-c20 -ile0capturepacketsfrom optionsfortcpdump.here'sa -s0 theth0interface -ndonotresolveipad -c10stopaftercapturing1 -s0capturepacketswith Othercomonlyusecomandl -X,-wfilename,-rfil reses 0packets "fulsnaplength" ineoptionsinclude ename

Exercise#1-CapturingPacketsUseTCPdumptocapturesomep 1.MakesurethatalVMsareu 2.StartupTCPdumpontheLin sudotcpdump-ile0 3.Scantheinternalnetworkfro pandruning. -n-c10-s0 mthelinuxatacker uxvictimhost acketsonthevictimnetwork: nmap-sp172.16.10.0 4.RestartTCPdumpontheVict 5.ScantheVictimhostfromthe nmap-a172.16.10.10 /24 Atacker im(ifnecesary)

Exercise#1a-CapturingPacketsUseTCPdumptocapturemorep 1.RestartTCPdumpontheVict sudotcpdump-ile0 2.Nmapthevictimnetworkfro nmap-a172.16.10.1- acketsonthevictimnetwork: imwiththe-xflag -n-c10-s0-x mtheatacker 20

SnortSnortisoneofthemostcomon Systemsinusetoday.It'sopopu atwhatitdoesandit'swelsupo Youcanevenbuycomercialve It'salsoveryweldocumented. rted. lyusedintrusiondetection larbecauseit'sfre,it'sverygod rsionsfromsourcefire.

SnortRulesLet'slokatanexampleruleand alertip$external_net$shel (msg:"shelcodelinuxshelc C0F /bin/sh";refere clastype:shelcode-detect; takeitapart: LCODE_PORTS->$HOME_NETany ode";content:" 909090E8 nce:arachnids,343; sid:652;rev:9;)

SnortRulesLet'smakethatalitlemoreread alertip$external_net$shel (msg:"shelcodelinuxshe content:" 909090E8C0 ableandexamineit: LCODE_PORTS->$HOME_NETany lcode"; F /bin/sh"; reference:arachnids,343;clastype:shelcode-dete sid:652;rev:9;) ct;

Exercise#2:SnortinpfSenseThefirststeptogetingSnortinto instalthesnortpackageforpfse youhere,butherearethesteps.1.onthelinuxvictim,openfiref 2.GotoSystem->Packages pfsenseistodownloadand oxandgotohtp:/172.16.10.254 nse.thishasalreadybendonefor 3.Snortisalreadyinstaled,butex aminetheotheravailablepackages

Exercise#3:InstalingSnortRulesSnortisn'tmuchgoduntilithasomerulest pfsensecomeswithnorulesatal.toinstalt acountatw.snort.organdthengeneratean Again,thishasalreadybendoneforyou,but 1.Pointabrowseratw.snort.org2.Createanewsnort.orgacount(clickonN herearethesteps. otregistered?) oworkwith.bydefault,thesnortpackagefor oinkmastercode. hestandardrules,youhavetoregisterforan 3.Waitforthemailtocomeback.4.Loginusingyoursnort.orgacountandg 5.You'lgetarealylonghexstringforyour 6.GobacktotheLinuxvictim,pointabrow 7.GotoPackages->Snort->andenteryo 8.GotoPackages->Snort->UpdateRule andwaitforsnortoupdateitself9.youarenowruningsnortwith(relativel enerateanoinkmastercode urcode y)uptodaterules serathepfsenseconsoleandlogin s

Exercise#4:GenerateSomeNowthatsnortisinstaledandis generatesomealerts.1.starthenesusclientonthe nesus2.logintonesusandstartasc runingwithupdatedruleslet's Atacker anof172.16.10.10 3.InthepfSensewebconsole,g 4.Refreshafewtimesiftherea otoservices->snort->alerts renoalerts

Exercise#5:UnderTheHodSnortandaloftheconfiguration sitingonpfsense.ifyouarefel you'redoing,youedithemdirec 1.OnthepfSenseVM,enterac filesthataredocumentedare tly.thisisnotrecomended. ingadventurousandknowhat omandshel(option8) 2.cd/usr/local/etc/sn 3.snort.confcontainsthep Snort ort rimaryconfigurationfilesfor

Questions?