« Tuning Snort and flex response

Installing Snort sensor with Mysql and BASE on CentOS Linux

10/30/08 | by Andrew Useckas [mail] | Categories: Uncategorized

Installing BASE

BASE is the Basic Analysis and Security Engine. It is based on the code from the Analysis Console for Intrusion Databases (ACID) project. This application provides a web front-end to query and analyze the alerts coming from a SNORT IDS.

You will need to install the following packages before installing BASE:

php-mysql
php-gd
php-pear-Net-SMTP

To install these packages execute:

# yum install php-mysql php-gd php-pear-Net-SMTP

You will also need the following pear packages:

Image_Color
Image_Canvas-alpha
Image_Graph-alpha

You can install them by executing:

# pear install Image_Color
# pear install Image_Canvas-alpha
# pear install Image_Graph-alpha

BASE also needs adodb. You can download it from http://adodb.sourceforge.net/#download. Make sure that the version you download corresponds with your version of PHP.

I use adodb-php5-only which you can get here: http://superb-east.dl.sourceforge.net/sourceforge/adodb/adodb506a.tgz

You can use wget to download it:

# cd /tmp/
# wget http://superb-east.dl.sourceforge.net/sourceforge/adodb/adodb506a.tgz

After download uncompress it to your web directory, usually /var/www/html:

# cd /var/www/html
# tar xvzf /tmp/adodb506a.tgz

Now download BASE to the same directory. BASE can be found here: http://base.secureideas.net/. You can also use the direct link:

# cd /tmp/
# wget http://voxel.dl.sourceforge.net/sourceforge/secureideas/base-1.4.1.tar.gz

Uncompress BASE to the web directory:

# cd /var/www/html
# tar xvzf /tmp/base-1.4.1.tar.gz

Rename the BASE directory:

# mv base-php5 base

Configure BASE:

# cd base
# cp base_conf.php.dist base_conf.php

Edit base_conf.php:

# vi base_conf.php

Change BASE_url_path variable to "/base".

Change Dblib_path variable to the location of adodb, in this case "/var/www/html/adodb5".

Configure mysql access the following way:

$Dbtype = 'mysql'
$alert_dbbame="snort"
$alert_host="localhost"
$alert_port=""
$alert_user="snort"
$alert_password="password"

$archive_exists=0
$archive_dbbame="snort"
$archive_host="localhost"
$alert_port=""
$archive_user="snort"
$archive_password="password"

Now start apache:

# /etc/init.d/httpd start

And add apache to the startup:

# chkconfig --level 345 httpd on

Now you should be able to access BASE through your web browser:

http://[snort_IP]/base/

If BASE complains about invalid database structure follow the links to the "Setup Page" and add BASE tables from there. Then go to the Main page and you should have a working snort sensor with BASE front end.

If you wish to enable authentication for BASE, create a user under Administration section of BASE interface, and then go back to base_conf.php and flip the value of "Use_Auth_System" variable.

Enjoy!

Pages: 1 · 2 · 3

6 comments

Comment from: Fred [Visitor]
Nice job Andrew. Thanks for posting this.
10/31/08 @ 19:28
Comment from: jiangzhw2008@yeah.net [Visitor] Email
Thank you for your wonderful work!When i
execute the "./configure --with-mysql --prefix-/usr
" ,it prompts "no such file or directory",what
is the purpose of this command?Besides,when i
run the "yum install mysqlclient10",it tells me
there is no mysqlclient10 available then i install
the mysqlclient10-3.23.58-9.2.1.i386.rpm,is that
OK?Lookforward your reply.
02/10/09 @ 23:09
Comment from: Ayo Rotibi [Visitor] Email · http://rotibi.cet
Thanks Andrew, I am a 1st timer Linux and I have been able to use this guide to install Snort on my network.
06/30/09 @ 09:38
Comment from: sergio [Visitor]
Nice manual! thank you!
12/15/09 @ 04:29
Comment from: chami [Visitor]
100 % working. every easy to understand even for a beginner. great job. thanks boss.
03/12/10 @ 06:04
Comment from: chami [Visitor]
one more thing... i got a problem when installing pear install Image_Canvas-alpha
and pear install Image_Graph-alpha. it said my PEAR installer version is not enough. what you have to do is download new package and intall it.
03/12/10 @ 06:08

This post has 16 feedbacks awaiting moderation...

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
September 2010
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Andrew Useckas shares his Linux experience

Search

XML Feeds

powered by b2evolution