Network Security, ISA 656, Angelos Stavrou. Snort Lab



Similar documents
IDS and Penetration Testing Lab III Snort Lab

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

Lab Conducting a Network Capture with Wireshark

IDS and Penetration Testing Lab ISA656 (Attacker)

SOUTHERN POLYTECHNIC STATE UNIVERSITY. Snort and Wireshark. IT-6873 Lab Manual Exercises. Lucas Varner and Trevor Lewis Fall 2013

EINTE LAB EXERCISES LAB EXERCISE #5 - SIP PROTOCOL

Setting Up Scan to SMB on TaskALFA series MFP s.

Lab - Using Wireshark to View Network Traffic

Setting Up Your FTP Server

Virtual Office Remote Installation Guide

Intrusion Detection and Prevention

How to use SURA in three simple steps:

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

IIS, FTP Server and Windows

Installation and Deployment

Talk Internet User Guides Controlgate Administrative User Guide

Configure Single Sign on Between Domino and WPS

owncloud Configuration and Usage Guide

Lab exercise: Working with Wireshark and Snort for Intrusion Detection

Lab 1: Network Devices and Technologies - Capturing Network Traffic

Dial-up Installation for CWOPA Users (Windows Operating System)

TANDBERG MANAGEMENT SUITE 10.0

Livezilla How to Install on Shared Hosting By: Jon Manning

Using Internet or Windows Explorer to Upload Your Site

Kaseya Server Instal ation User Guide June 6, 2008

Installation Guidelines (MySQL database & Archivists Toolkit client)

Figure 1. Wireshark Menu Bar

Hands-on Network Traffic Analysis Cyber Defense Boot Camp

Test Case 3 Active Directory Integration

From a Finder window choose Applications (shown circled in red) and then double click the Tether icon (shown circled in green).

Intrusion Detection System Based Network Using SNORT Signatures And WINPCAP

Network Probe User Guide

Computer Networking LAB 2 HTTP

Setting up Sharp MX-Color Imagers for Inbound Fax Routing to or Network Folder

User Manual. Onsight Management Suite Version 5.1. Another Innovation by Librestream

Windows Mobile from Vodafone

M2M Series Routers. Port Forwarding / DMZ Setup

Using. Microsoft Virtual PC. Page 1

First Time On-Campus VLab Setup Windows XP Edition

How To Create An Easybelle History Database On A Microsoft Powerbook (Windows)

Network Defense Tools

SOA Software API Gateway Appliance 7.1.x Administration Guide

Browser Client 2.0 Admin Guide

WestermoConnect User Guide. VPNeFree Service

Parallels Panel. Parallels Small Business Panel 10.2: User's Guide. Revision 1.0

How to Remotely View Security Cameras Using the Internet

DESLock+ Basic Setup Guide Version 1.20, rev: June 9th 2014

VPN: Virtual Private Network Setup Instructions

Installing the Microsoft Network Driver Interface

BlackBerry Internet Service Using the Browser on Your BlackBerry Smartphone Version: 2.8

Installation Guide. Research Computing Team V1.9 RESTRICTED

Virtual Owl. Guide for Windows. University Information Technology Services. Training, Outreach, Learning Technologies & Video Production

User guide. Business

Server & Workstation Installation of Client Profiles for Windows

Advanced Internetworking

Advanced Event Viewer Manual

Using a Remote SQL Server Best Practices

ilaw Installation Procedure

Technote 20 Using MSIE to FTP into an AcquiSuite

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

1. Introduction What is Axis Camera Station? What is Viewer for Axis Camera Station? AXIS Camera Station Service Control 5

User Guide. Time Warner Cable Business Class Cloud Solutions Control Panel. Hosted Microsoft Exchange 2007 Hosted Microsoft SharePoint 2007

MobileStatus Server Installation and Configuration Guide

RemotelyAnywhere Getting Started Guide

5. At the Windows Component panel, select the Internet Information Services (IIS) checkbox, and then hit Next.

Funeral Home Software Instruction Manual

13.1 Backup virtual machines running on VMware ESXi / ESX Server

State of Michigan Data Exchange Gateway. Web-Interface Users Guide

Section 1: Overture (Yahoo) PPC Conversion Tracking Activation

Installation Instruction STATISTICA Enterprise Small Business

StoreGrid Backup Server With MySQL As Backend Database:

Freshservice Discovery Probe User Guide

Using Remote Web Workplace Version 1.01

Installing Oracle 12c Enterprise on Windows 7 64-Bit

Local Caching Servers (LCS): User Manual

for Networks Installation Guide for the application on the server July 2014 (GUIDE 2) Lucid Rapid Version 6.05-N and later

TECHNICAL NOTE. The following information is provided as a service to our users, customers, and distributors.

Deploying Windows Streaming Media Servers NLB Cluster and metasan

NSi Mobile Installation Guide. Version 6.2

Volume SYSLOG JUNCTION. User s Guide. User s Guide

Network Connect & Junos Pulse Performance Logs on Windows

Olathe District Schools 1 of 11 GroupWise 7

Bitrix Site Manager ASP.NET. Installation Guide

Installing, Uninstalling, and Upgrading Service Monitor

NovaBACKUP Central Management Console

Using and Contributing Virtual Machines to VM Depot

How to install and run an OpenVPN client on your Windows-based PC

TSM for Windows Installation Instructions: Download the latest TSM Client Using the following link:

OUTLOOK ANYWHERE CONNECTION GUIDE FOR USERS OF OUTLOOK 2010

Your Archiving Service

How To Remotely View Your Security Cameras Through An Ezwatch Pro Dvr/Camera Server On A Pc Or Ipod (For A Small Charge) On A Network (For An Extra $20) On Your Computer Or Ipo (For Free

Installation Guide For Choic Enterprise Edition

Using Windows Task Scheduler instead of the Backup Express Scheduler

Cloudfinder for Office 365 User Guide. November 2013

Microsoft XP Professional Remote Desktop Connection

How to Earn IPv6 Certifications (Windows Version: Fast) Why? Macintosh Instructions Windows Versions Tips for Windows Home Edition Users

Introduction to Network Security Lab 1 - Wireshark

DNS (Domain Name System) is the system & protocol that translates domain names to IP addresses.

Transcription:

Snort Lab Purpose: In this lab, we will explore a common free Intrusion Detection System called Snort. Snort was written initially for Linux/Unix, but most functionality is now available in Windows. In this lab, we will use the windows version, but there is an extra credit section to setup and use Snort on Linux (See Extra Credit Section). Software Requirements: WinIDS AIO Software Pack which mainly includes the following: 1. Snort 2. Active Perl 3. Oinkmaster The package will be provided you; you may also download it from: http://www.winsnort.com/modules.php?op=modload&name=downloads&fi le=index&req=viewsdownload&sid=22 2. WinPcap. If you already installed Wireshark on the Windows XP machine, then you probably already have it. To verify go to Start > Control Panel > Add Remove Programs to check. If not, then download it from here: http://www.winpcap.org/install/default.htm 3. Wireshark. Download from: http://sourceforge.net/project/downloading.php?groupname=wireshark&file name=wireshark-setup-0.99.6a.exe&use_mirror=superb-west References: 1. http://ww.winsnort.com 2. http://www.wireshark.org/download.html 3. http://elc.fhda.edu 4. http://www.winsnort.com/index.php?name=sections&req=viewarticle&artid=39& allpages=1&theme=printer 5. www.snort.com 6. http://www.snort.org/docs/snort_manual/ 7. http://ussrback.com/docs/papers/ids/snort_rules.htm.html 8. http://www.internetsecurityguru.com/documents/snort_base_minimal_centos_5.pdf Lab Exercise: 1

1. In your WinIDS_Support_Pack folder, install Snort by double-clicking on the Snort Installer file. Keep defaults values. 2. Snort has three main modes of operations. The sniffer mode, the packet logger mode, and the Network Intrusion Detection mode. Do some reading on these modes (http://www.snort.org/docs/snort_manual/node2.html) 3. Snort Modes: a. Sniffer Mode: 1. In a command prompt, cd to c:\snort 2..\bin\snort help >>> View different options for snort. 3. Use the appropriate flag to list available interfaces. (What flag did you use? ) 4. Run snort in the sniffer mode by typing.\bin\snort v i2 Important: Note that you need to replace the i2 with whichever your network interface is (see point 3 above). Also note that this lab assumes that you are not using a wireless interface. If you want to use a wireless NIC card, then you need to install a Pcap for wireless traffic like AirPcap. You should see something like this: 2

5. Ctrl c will stop the capture. Notice that no data-link headers are being displayed. Find the flag that will also display data-link headers as well as the raw packets in HEX/ASCII. What command/flags did you use? b. Packet Logger Mode: 1. In this mode, Snort will log some activities to a log directory. If you look at the c:\snort\log directory, it should be empty. Type a snort command that will start snort in the Logger mode. (don't forget to specify the output directory.\log after the appropriate flag; also don't forget to specify the right interface). What command did you type? 2. To get some logs, open up a browser and go to www.gmu.edu. 3. Ctrl + c to stop Snort. Now look at the \log directory, you should see some Snort. log files. These files are Capture files and you can import them into Wireshark to view details. Open up Wireshark and import the log file that was just created. Can you see the page request to www.gmu.edu? Provide a snap shot. c. IDS Mode: 1. In the Snort Network Intrusion Detection Mode, Snort uses some configuration files and a set of Rule's files. The configuration files will help configure different options in Snort. The Rule's files are files that include signatures against which Snort is comparing all captured traffic. We will be writing some of these signatures. If some traffic pattern matches some signature, a Snort "alert" will be fired. Snort also has Preprocessors also. Preprocessors will check flow of traffic as well. For example if an attacker sends a packet that has "user:" and then later sends another one that has "root". If there is a Snort signature to trigger on text content: "user: root". It will not catch this attempt of remotely trying to access resources with root privileges. The 'Preprocessor' will try to process the stream of data, and reassemble it before it goes into the detection engine, so it detects such tricks of evading the IDS. As a matter of fact, there is an excellent paper that discusses IDS evasion. Read this article that summarizes it: http://www.securityfocus.com/infocus/1852 2. Look at the main Snort configuration file under c:\snort\etc\snort.conf. There is a line that specifies the Rule's path: var RULE_PATH../rules. Change this line to read: var RULE_PATH c:\snort\rules 3

This tells the Snort engine where to find the Rules files. If you look at the rules folder now, it should be empty. You can populate it by using a Perl script called Oinkmaster. This script automatically goes to the Snort website to get more rules. We will take the time here to get Oinkmaster up and running to load the rules files. To do this, follow the following steps: A) Install Active Perl. Note that Active Perl is part of the package that you have already downloaded. Also install Oinkmaster which is also part of that package. (Hint: a very useful document is the README.win32 under the following directory (WinIDS_Support_Pak- 081007\oinkmaster-2.0\oinkmaster). B) You need to make a change on the "oinkmaster.conf" file. To specify the URL from which you will download the rules. But to be able to do this, you need to be registered (with a snort username and password). Go ahead and create an account for yourself in the snort website www.snort.com. Once you create the account and login to it, you can scroll to the bottom of the page and click on get Oink Code. This will give you the Oink Code that you will use in your "oinkmaster.conf" file. Once you have this code, replace the <oinkcode> on the line shown below with the new code you just got: # Example for Snort-current ("current" means cvs snapshots). # url = http://www.snort.org/pubbin/oinkmaster.cgi/<oinkcode>/snortrules-snapshot-current.tar.gz C) Now you can execute the Oinkmaster script to go out and get the rules by executing the following line (Note, the path might be different for you): (Format is: [Perl] [Source Perl script] [output]) c:\perl\bin\perl c:\winids_support_pak-081007\oinkmaster- 2.0\oinkmaster.pl -o c:\snort\rules. Please note that if some folder names have spaces, you need to include the path in double quotes, like: "My documents". This should start installing the Snort rules and the rules file should be populated. 3. There are some minor changes that need to take place in the "Snort.conf" file. To make it simple, just delete the entire file and create the one provided. 4. Now run snort in the Network IDS mode by typing the following:.\bin\snort c.\etc\snort.conf 4

5. Keep snort running as an IDS and let s trigger an alert. An easy trick to trigger an alert is to open up your browser and type: www.gmu.edu/readme.eml The following signature from the web-client.rules file should trigger: alert tcp $HOME_NET any -> $EXTERNAL_NET $HTTP_PORTS (msg:"web-client readme.eml download attempt"; flow:from_client,established; uricontent:"/readme.eml"; nocase; reference:url,www.cert.org/advisories/ca-2001-26.html; classtype:attempted-user; sid:1284; rev:10;) Go ahead and stop Snort (Ctrl + c). No go to the Log directory and you should see "alert.ids" file. Open the file and you should see more details on the alert. Extra Credit: Use the following document to install Snort on Linux in a Vmware. Get it up and running and save the VMware image. Turn in your VMware image. http://www.internetsecurityguru.com/documents/snort_base_minimal_centos_5.pdf 5

Wireshark Lab Purpose: In this lab, we will explore a tool called Wireshark (a new version of Ethereal), to capture traffic and identify packet headers and data information. Software Requirements: Wireshark for windows: http://sourceforge.net/project/downloading.php?groupname=wireshark&filename=wir eshark-setup-0.99.6a.exe&use_mirror=superb-west References: http://www.wireshark.org/download.html Part 1: 4. Download and install Wireshark for windows on your windows XP machine. 5. Wireshark will capture raw traffic from the network interface card. 6. Run the program, and under the 'Capture' Menu, go to Options. Under "Display Options", make sure that "Update list of packets in real time" and "Automatic scrolling in live capture" are both checked. 7. Under the "Capture" menu, choose "Interfaces". (You might see some Vmware virtual interfaces). You want to choose your host's Interface card. 8. Now we are ready to capture traffic as soon we click on the start button. We will capture some web traffic and try to analyze the packet captures. 9. Note: Try to do the following steps consecutively and quickly so you can minimize the noise in the desired traffic capture. 10. Click on start in Wireshark to start capturing traffic. 11. Open up an internet browser and go to www.mail.com. 12. Sign in at the right side of the page with username: gmu@hotmail.com, and password "testing" 13. After the page loads up, stop the capture by clicking on "stop" under the 'Capture' menu. Part 2: Data Analysis 1. Take a look at the Captured traffic in Wireshark. Notice three sections that show traffic summary, packet headers, and raw data. In the traffic summary section, identify different colors that correspond to different protocols being used. 2. Now you want to search for the username and password that were entered when you logged in. You will be looking at the bottom section where it displays the raw data. To make this easier, click on one of the green-colored 6

captured packets. Then click on the 'Analyze' menu, and choose 'Follow TCP Stream'. Perform a find for the username and password. Part 3: Questions 1. Provide a screen shot for the TCP Stream where it shows the username and password. 2. Under the menu bar, you will see the word 'Filter'. That's were you place filters to the packet captures. (You will see a filter that you have placed when you chose to follow the TCP stream). Click on 'clear' to see all traffic again. Now look for the DNS query response corresponding to the query for mail.com. What is answer returned? Provide a screen shot that shows the DNS header with the returned answer. 3. Now you need to perform another packet capture. Go to 'mail.gmu.edu'. Then start your capture. Sign in to your GMU mail account, and then stop the capture. Go back and perform another 'Follow TCP stream' from under the 'Analyze' menu. Can you find your username or password? Why or why not? 4. Do some reading on SSL, and provide a good definition of SSL and a short explanation on how it works. 7