+ All Categories
Home > Documents > Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab...

Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab...

Date post: 22-Aug-2020
Category:
Upload: others
View: 4 times
Download: 0 times
Share this document with a friend
44
Snort & Windows 2000 A Practical Guide David Elfering Based on paper by Michael Steele
Transcript
Page 1: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000

A Practical GuideDavid Elfering

Based on paper by Michael Steele

Page 2: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

ObjectiveWindows 2000

Flexible, enterprise readyLeverage 2000's crypto capabilities Distributed, economical, web based NIDS architectureWeb server

Either IIS or Apache will work

SnortFree & openIs this cats & dogs living together?

Page 3: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

WinPcapDownload

http://netgroup-serv.polito.it/winpcap/install/

InstallSimple “click-n-shoot” operationFor problems see WinPcap FAQ

Page 4: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

MySQL – InstallationDownload: http://www.mysql.comChoose "typical" as installation type

Note: Install from control panel on W2K ServerPassword?

Open WinMySQLAdminCreate "Start Menu" item

Located on my.ini Setup

Page 5: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

MySQL – Create the DatabaseCreate & Configure SNORT database

Right Click MySQL icon in the system tray (select "show me")Select Database tab and "Create Database" to create "snort" database

Page 6: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

MySQL – Setting PermissionsExecute C:\MySQL\bin\MySQL

Type "\u mysql;Type "grant INSERT,SELECT,CREATE,DELETE on snort.* to snort@localhost;"

Now type "\u mysql" then "show tables;" Now try "select * from user;"

Page 7: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Snort-Download

Snort-win32 MySQL binaryGrab “Snortrules.tar.gz”Grab “Snort.conf”

-InstallCreate 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"Install Snort into "C:\Snort\Bin" folder

This is a manual copy – no setup file needed

Page 8: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Snort (2)Install the latest FULL set of rules and snort.conf fileEdit the snort.conf file

To reflect your HOME_NET

Remove # before “output database: log, mysql

Copy the file called "create_mysql" from the "contrib" folder of Unix tar

http://www.snort.org/Files/snort-1.7.tar.gz

Page 9: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Snort Database CreationExecute it "C:\MySQL\Bin>MySQL -u snort snort < C:\MySQL\Bin\create_mysql“

Page 10: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Snort – Finishing the SetupBe sure to “hard code” snort.conf rules

Should look like this:

Test SNORTC:\snort\bin\snort –c snort.conf –l c:\snort\logsShould fire up and log to MySQLIf you get no error messages, you’re ok!

Page 11: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Snort – What You Should SeeNow test Snort

Page 12: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Web Server TimeHow-to assumes IIS 5.0

May want to harden it a bit ☺Ships with Windows

Apache will work great tooFree, which is usually goodftp://httpd.apache.org/dist/httpd

Page 13: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

PHP-Download: www.php.net/downloads.php

-Install-Create c:\usr and copy mibs directory in-Copy DLL's into winnt\system32 directory (avoid overwrites)-Copy php.ini-dist to server root (c:\) & rename tophp.ini

-Do not edit the php.ini file

Page 14: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Make PHP ExecutableNow Add a new entry to IIS Application Mappings

Control Panel -> Administrative Tools -> Internet Services Manager -> Default Web SiteSelect right-click then properties

Page 15: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

IIS – Adding PHP ExtensionUse the path to php.exe as the Executable, supply .php as the extension

Page 16: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Final PHP InstallationLeave 'Method exclusions', blank, and check the Script engine checkbox

Put a .php file under your Web server's document root and check if it works

Voila!

Page 17: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Checkpoint!Where are we at?

MySQL Installed & configured

SnortInstalled, configured & logging to database

PHPInstalled and tested

Now tackle ADODB & ACID

Page 18: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Getting ACID & ADODBThis setup was on ACID 0.9.6b9

http://acidlab.sourceforge.net

ADODB version 1.11http://php.weblogs.com/adodb

Page 19: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

ADODB & ACID Setup - 1Adds hooks between DB & web GUIDrop “ACID” into C:\inetpub\wwwrootDrop the “ADODB” directory into c:\Edit acid_conf.php in the acid folder

Page 20: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Acid Setup PT-1Open Microsoft Management ConsoleRight click on your Web server node (will most probably appear as 'Default Web Server'), and select 'Properties'.Select 'Home Directory', click on the 'Configuration' button.

Page 21: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Set ACID HomepageNow set ACID as the web root

Page 22: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

ACID/ADODB Gotcha’s - 1Be sure to set this in acid_conf.php

Now open the web site in a browserhttp://127.0.0.1 if on Snort server

Page 23: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Web Based Steps - 1Now we should see:

Not much farther to go!

Page 24: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

ACID/ADODB Gotcha’s - 2Click on the “setup” link to get this:

Click “Create ACID AG”

Page 25: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

ACID/ADODB Finishing UpNow we see

Page 26: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Voila! An IDS is Born!

Page 27: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Securing the ServerRestricting IP access to IISSetting up SSLSetting up Windows 2000 encryption

Page 28: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Securing the IIS ServerIIS – Surely you’re kidding right?

My names not surely ☺

Only allow “authorized” usersRestrict IP addresses to web siteUse el-cheapo firewall

Page 29: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Restricting IIS AccessHead to Control Panel/Administrative Tools/Administrative ToolsOpen “Internet Services Manager”

Right-click “Default Web Site” propertiesSelect “Directory Security” tabRemove “Anonymous Access”

Page 30: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

IIS Address RestrictionsNow set IIS to only allow certain IP’s

Select “IP address and domain name restrictions”

Set this to be VERY restrictive

Page 31: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Setting Up SSL EncryptionOnly log in using strong cryptoEasy to get a “test” certificateCertificate are cheap insurance

Page 32: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Getting a CertificateVeriSign outlines the following steps:’

Confirm DomainObtain Proof of RightGenerate CSR (private key docs!)Submit CSRComplete ApplicationWait for ProcessingInstall your ID

Page 33: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

IIS Certificate Step OneSelect Directory Security/Secure Communications/Server CertificateNow follow the wizard!

Create a new certificate (CSR)Prepare request now but send it laterUse longer key lengthsFill in organization info as requiredDrop the request on the drive

Page 34: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

What is a CSR?Your web server’s CSR public key that you ask a certificate authority to “sign”Your server will produce a plain text block like this:

-----BEGIN CERTIFICATE REQUEST----MIIBujCCASMCAQAwejELMAkGA1UEBhMCQ0ExEzARBgNVBAgTClRFc3QgU3RhdGUxETAPBgNVBAcTCENvbG9yYWR0MRswGQYDVQQKExJDYW5hZGlhbiBUZXN0IE9yZy4xEjAQBgNVBAsTCU9VIE9mZmljZTESMBAGA1UEAxMJd3d3LmV4LmNhMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD5PIij2FNa+Zfk1OHtptspcSBkfkfZ3jFxYA6ypo3+YbQhO3PLTvNfQj9mhb0xWyvoNvL8Gnp1GUPgiw9GvRao603yHebgc2bioAKoTkWTmW+C8+Ka42wMVrgcW32rNYmDnDWOSBWWR1L1j1YkQBK1nQnQzV3U/h0mr+ASE/nV7wIDAQABoAAwDQYJKoZIhvcNAQEEBQADgYEAAAhxY1dcw6P8cDEDG4UiwB0DOoQnFb3WYVl7d4+6lfOtKfuL/Ep0blLWXQoVpOICF3gfAF6wcAbeg5MtiWwTwvXRtJ2jszsZbpOuIt0WU1+cCYivxuTi18CQNQrsrD4s2ZJytkzDTAcz1Nmiuh93eqYw+kydUyRYlOMEIomNFIQ=

-----END CERTIFICATE REQUEST-----

Page 35: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

IIS SSL Certificate Step TwoShould see “ “Free “test” certs available from Thawte

http://www.thawte.comPast the contents of “certreq.txt”

Page 36: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Finishing Certificate InstallOther options for “test” certificate

Test duration can be up to 365 daysDon’t change any other settings

You should get this:

Now rerun “Server Certificate” wizardPaste the certificate contents via notepad to your hard drive for input to wizard

Page 37: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Now Test It!Netscape and Explorer both give connection information

Page 38: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Server Side Crypto SettingsWhat about governing crypto at the server?If we control the endpoint, then the battle tilts in our favorNetscape & IIS allow different degrees of control

Page 39: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Require Strong Crypto!Set IIS to only allow strong SSL

Default Web Site Properties/Directory Security/Secure Communications/Edit

This disallows unencrypted logins

Page 40: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

CheckpointAt this point we should

Have an operational Snort probeHave strongly encrypted access

Test the connectionhttps://insert.your.server.addressLogin using user/passwordTell browser to accept the certificate

It may complain, but ignore it ☺

Page 41: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Cheap Firewall ProtectionWe will demo BlackIce

Simple setupThere are others

Sygate, Symantec, ZoneAlarm, etc.

BlackIce is simple, cheap and effective$40, a credit card and 20 minutes are all you need ☺

Page 42: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Quick & Dirty BlackIceDo a normal install (click/shoot)Once running we’ll tweak two settings

Right-click BlackIce in service trayBring up properties and set Protection Level to paranoid

Page 43: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Finishing BlackIce SetupUsing BlackIce to restrict clients

Right-click the BlackIce in the system traySelect “Advanced Firewall Settings”Now add specific addresses to allow

Once done, simply “ok” all changes

Page 44: Snort & Windows 2000 - 8BallNews.com€¦ · Leverage 2000's crypto capabilities ... Grab “Snort.conf” -Install Create 3 Folders: "C:\Snort\" - "C:\Snort\Bin\" - "C:\Snort\Logs\"

Snort & Windows 2000 by Dave Elfering - Based on article by Michael Steel

Finished Probe ResultsSnort up and runningSecure, web based GUIEconomical firewall protection


Recommended