SuricataWinInstallationGuide v1.3 PDF
SuricataWinInstallationGuide v1.3 PDF
SuricataWinInstallationGuide v1.3 PDF
IDS/IPS
1|Page
6
7
7
8
8
8
10
13
13
24
30
33
33
34
39
39
43
45
50
2|Page
3|Page
52
This is a guide of how to compile and come up with your own executable/binary of Suricata on
Windows. If you do not want to do that there is a auto installation (MSI) windows native
package here:
http://www.openinfosecfoundation.org/index.php/download-suricata
just run it and it will install Suricata for you on your Windows system.
4|Page
w32api, mpfr, pthreads, gcc-core , gcc4-core , make , zlib , autoconf , automake , libtool , glib ,
pkg-config , pkg-config , git .
Or in a bit more detail:
5|Page
6|Page
Suricata Stable (at the moment of this writing the stable version is 1.2.1):
7|Page
libtoolize -c && autoreconf -fv --install && ./configure --with-libnss-libraries=/usr/lib --withlibnss-includes=/usr/include/nss/ --with-libnspr-libraries=/usr/lib --with-libnsprincludes=/usr/include/nspr && make
For git
Make sure you add the following DLLs to the directory where you will run suricata (copy them
from the Cygwin\bin directory):
cygfreebl3.dll
8|Page
cygnspr4.dll
cygnss3.dll
cygnssckbi.dll
cygnssdbm3.dll
cygnssutil3.dll
cygplc4.dll
cygplds4.dll
cygsmime3.dll
cygsoftokn3.dll
cygssl3.dll
Then continue with the instructions below (the bellow mentioned DLLs are also needed), just
substitute the oisf directory with suricata-1.2.1 directory!
After it is done, go to your /oisf/src/.lib (or /suricata-1.2.1/src/.lib for Suricata stable) directory
and copy the Suricata.exe file to a dedicated directory, for example C:\Suricata
Also - copy classification.config , reference.config and suricata.yaml (form your oisf/ directory)
to (your dedicated directory) C:\Suricata
NOTE: If you would like to make a standalone installation, copy (from C:\cygwin\bin)
cygz.dll
cygwin1.dll
cygpcre-0.dll
cygmagic-1.dll
9|Page
cyggcc_s-1.dll
cygnspr4.dll
cygnss3.dll
Download some rule sets and copy them to your rules directory.
Edit your suricata.yaml - (for example, at least change these lines and create the necessary
folders respectively):
default-log-dir: C:\Suricata\log
- file:
enabled: yes
filename: C:\Suricata\suricata.log
.
default-rule-path: C:\Suricata\rules\
10 | P a g e
classification-file: C:\Suricata\classification.config
Open a cmd.
cd to your Suricata directory , execute
suricata.exe -c suricata.yaml -i 192.168.1.71
change 192.168.1.71 with your respective IP and you are done.
NOTE:
If you need to run Suricata on an un-ip'd interfaces(thanks to Rich Rumble for pointing that
out):
You can get the NIC UUID in a variety of ways, the simplest is using a single command for
WMIC:(from cmd prompt paste in the following)
wmic nicconfig get ipaddress,SettingID
If you know your NIC's IP you can filter the results with findstr:
wmic nicconfig get ipaddress,SettingID | findstr 1.2.3.4
(replace 1.2.3.4 with your NIC's IP)
11 | P a g e
12 | P a g e
The following installations instructions were executed on Windows Server 2008R2 64 bit.
About 500 -600MB of space needed in total with all the necessary prerequisites installed.
13 | P a g e
Pic1
14 | P a g e
Pic2
15 | P a g e
Pic3
16 | P a g e
Pic4
17 | P a g e
Pic5
18 | P a g e
Pic6
19 | P a g e
Pic7
You might get a warning if you already have installed CYGWIN this is a guide for an installation
from scratch :
20 | P a g e
Pic8
Click next:
21 | P a g e
Pic9
Then CYGWIN will start downloading and installing the necessary packages:
22 | P a g e
Pic10
23 | P a g e
Pic11
24 | P a g e
Pic12
Here (Pic below) is where we search select and queue for installation the additional packages
needed.
In the picture below , in the search box type in the name of the package- the search will return
automatically , results , select the necessary package. Erase the contentment of the search box
and type in the name of the next package, select
Do the same for all the needed packages, DO NOT hit next until you have selected all the
packages.
25 | P a g e
Pic13
26 | P a g e
Pic14
After you are done selecting the packages make sure the search box is cleared, click the
view button until the text on the right of the button displays pending.
Check and make sure all the needed packages are selected! If something is missing, go back and
select it!
Click Next.
After that click next (make sure the option select required packages (RECOMMENDED) is
selected!) :
27 | P a g e
Pic15
The extra packages that you have selected will start to download and install:
28 | P a g e
Pic16
29 | P a g e
Pic17
30 | P a g e
Pic18
31 | P a g e
Pic19
Pic20
32 | P a g e
33 | P a g e
This is IMPORTANT , this is the development pack, we need that for Suricata to be able to run
on Windows.
Download the package
Unpack it anywhere you like.
Copy libraries (from the unpacked directory) like this:
Copy ALL the content of WpdPack\Lib\ to cygwin\lib\
Copy all headers (all the content)from WpdPack\Include\ to C:\cygwin\usr\include\
Rename libwpcap to libpcap (in your cygwin\lib\ directory)
34 | P a g e
Pic21
Type the following commands as shown in the picture below (hit enter after each command):
35 | P a g e
Pic22
Basically the commands are :
cd /tmp
cd yaml-0.1.4
./configure --prefix=/usr && make && make install
The last command above is on one line.
36 | P a g e
This will configure and install the yaml package that we need for Suricata, let it finish:
Pic23
37 | P a g e
Pic24
38 | P a g e
(Step 7.2 follows just after (7.1) Suricata stable latest stable release , if you would like to
use the stable version, please go to 7.2)
Get and compile Suricata.
As you are still in the CYGWIN environment Type in
git clone git://phalanx.openinfosecfoundation.org/oisf.git
Then after it is done
cd oisf
like so:
39 | P a g e
Pic25
40 | P a g e
Pic26
41 | P a g e
Pic27
After it is done:
42 | P a g e
Pic28
43 | P a g e
44 | P a g e
(--enable-debug and --enable-profiling are optional, you do not have to add them, I just add
them because I like them, (pic above))
Then continue with the instructions below, just substitute the oisf directory with suricata-1.2.1
directory!
45 | P a g e
default-log-dir: C:\Suricata\log
46 | P a g e
- file:
enabled: yes
filename: C:\Suricata\suricata.log
.
default-rule-path: C:\Suricata\rules\
classification-file: C:\Suricata\classification.config
HOME_NET: "[192.168.0.0/16]"
inspect)
Like shown on the pictures below:
47 | P a g e
Pic29
48 | P a g e
Pic30
49 | P a g e
Pic31
Adjust your home network to whatever network you intend the Suricata to protect/inspect (as
shown in the picture above).
50 | P a g e
Pic32
And you have yourself Suricata running (the start time could depend the PC/Server CPU/MEM
availability and of course how many rules do you load, but it is max about 1.5 min):
51 | P a g e
Pic33
Thats it.
From here on it is up to you to configure Suricata the way it suits you best!
Thanks
52 | P a g e
53 | P a g e