What do we have in this session?
Snort, Win XP Pro SP2, PHP and WinPcap
Now, we are ready to install and configure Snort. Please download Snort’s executable for Windows at: Snort download. The current version is 2.8.6.
Double click the executable and follow the instructions displayed on the screen.
MySQL and ODBC already supported by default. We enable the IPv6 support. Click Next.
Select all the components and click Next.
Please use installation path without any spaces such as "C:\Program Files". White space known to have issues on Windows machines. Click Next.
You can see the setup details by clicking the Show details button.
Look like the installation was done successfully else error(s) will be displayed on the screen. The following screenshot shows the Snort’s installation path and folders. If you want to uninstall Snort, run the Uninstall.exe file located on the Snort’s root folder.
Editing the snort.conf Config File
Next, we are ready to do some basic configuration to make sure Snort can run properly without any error(s). The configuration file is snort.conf which located under C:\Snort\etc folder shown below.
Download and Install Snort Rules
Before configuring Snort, let download the Snort Rules files. In order to download Snorts’ rule files (and update later on), we need create an account (register) at Snort.org and it is free. It is also useful in getting the Oinkmaster code to complete Oinkmaster installation later. After creating an account, use the credentials to login.
Then, download a proper Rules file (registered-user Release) which is a free version with delayed update Release. It is better to store the compressed file under Snort root folder so when we uncompress the file, it will overwrite any existing folders (older files and folders).
-----------------------------------------------------------------
By default the Snort’s rules folder is empty.
Use 7-zip file compression tool to uncompress the tar/gz file. Choose Extract Here menu which will overwrite the existing, same folder and file names.
Just overwrite the existing, older files.
Then, the Snort’s rules folder will be populated by the rule files. Take note that the .so rule files are for Linux/Unix system.
Now we are ready to modify snort.conf config file just to make snort operate properly at the most basic level. Take note that originally, this config file provided for Linux/Unix system. Open snort.conf file in any unformatted text editor such as Wordpad. Change the following settings:
# Path to your rules files (this can be a relative path)
# Note for Windows users: You are advised to make this an absolute path,
# such as: c:\snort\rules
var RULE_PATH ../rules
var SO_RULE_PATH ../so_rules
var PREPROC_RULE_PATH ../preproc_rules
To the following:
# Path to your rules files (this can be a relative path)
# Note for Windows users: You are advised to make this an absolute path,
# such as: c:\snort\rules
var RULE_PATH c:\snort\rules
var SO_RULE_PATH c:\snort\so_rules
var PREPROC_RULE_PATH c:\snort\preproc_rules
Then, add the following dynamicpreprocessor DLL files which should be matched with the physical files shown in the above screenshot.
###################################################
# Step #4: Configure dynamic loaded libraries.
# For more information, see Snort Manual, Configuring Snort - Dynamic Modules
###################################################
# path to dynamic preprocessor libraries
dynamicpreprocessor file C:\Snort\lib\snort_dynamicpreprocessor\sf_dce2.dll
dynamicpreprocessor file C:\Snort\lib\snort_dynamicpreprocessor\sf_dcerpc.dll
dynamicpreprocessor file C:\Snort\lib\snort_dynamicpreprocessor\sf_dns.dll
dynamicpreprocessor file C:\Snort\lib\snort_dynamicpreprocessor\sf_ftptelnet.dll
dynamicpreprocessor file C:\Snort\lib\snort_dynamicpreprocessor\sf_sdf.dll
dynamicpreprocessor file C:\Snort\lib\snort_dynamicpreprocessor\sf_smtp.dll
dynamicpreprocessor file C:\Snort\lib\snort_dynamicpreprocessor\sf_ssh.dll
dynamicpreprocessor file C:\Snort\lib\snort_dynamicpreprocessor\sf_ssl.dll
Next, add the dynamicengine path and should also matched with the physical file.
# path to base preprocessor engine
# dynamicengine /usr/local/lib/snort_dynamicengine/libsf_engine.so
dynamicengine C:\Snort\lib\snort_dynamicengine\sf_engine.dll
Next, comment the dynamicdetection setting.
# path to dynamic rules libraries
# dynamicdetection directory /usr/local/lib/snort_dynamicrules