Ver 1.4.4 - Last Updated 07/26/2006
This is a quick guide to help you setup SnortSMS. It will be assumed you have at least two servers available to fuction as the SnortSMS Collector and SnortSMS Sensor. Here's what should be on each system:
SnortSMS Collector
Be sure include the CLI build option for PHP as SnortSMS requires some scripts to execute from the command line shell. Mysql, cURL, pcre, and pcntl should be compiled into PHP or available as a PHP module extention.
SnortSMS IDS Sensor
The sensor Agent software is a custom Webmin module, so you will need to install Webmin on the sensor as a prerequisite. This shouldn't be an issue since Webmin is also a good administration tool for the sensor as well.
Barnyard is an optional tool which allows Snort alerts to be propagated to a central database in the background. Although Snort can write to the database directly, we recommend Barnyard as it is more reliable and frees Snort of latency and fail-over issues.
Prerequisites
We assume you have an available server established with Apache, PHP (with above requirements), and MySQL client libraries (and MySQL server - if you plan to run the databases locally).
Installing the SnortSMS Collector Website
# chown :www conf/ conf/conf.php # chmod 775 conf/ # chmod 664 conf/conf.php
short_open_tag = On max_execution_time = 120 max_input_time = 120 memory_limit = 100M post_max_size = 20M upload_max_filesize = 20M include_path = ".:/usr/local/share/pear"
# mkdir /var/tmp/snortsms # chmod 1777 /var/tmp/snortsms
Creating the SnortSMS Database
# mysql -u root -p < {snortsms_source}/schema/SNORTSMS.mysql
Creating the Snort Alert Database (optional)
If you would like a central database where all Snort sensors can send the Alert events to, you can create a Snort database on the SnortSMS collector or an alternate server.
# mysql -u root -p < {snort-x.x.x}/schemas/create_mysql
Modify the Snort Event Database
Note: If you plan to use the SnortSMS Alert Browser to view incoming alerts, you will need to modify Snort's default database.
mysql> use {your snort db name}; mysql> alter table event add column viewed tinyint (1);Or execute the script we've supplied with SnortSMS:
# mysql -d {SnortDB} -u root -p < {snortsms_source}/schema/SNORT_DB_mod.mysql
Prerequisites
We assume you have an available server established with a basic installation of Snort and Webmin (also Barnyard and MySQL Client libraries if you desire to propagate Snort Events to a central database).
Installing the SnortSMS Agent
The SnortSMS Agent is designed to reside on the remote Snort sensor and is packaged as a third-party Webmin Module. The Agent included with the SnortSMS Collector distribution under the 'Agent' directory path. This Agent allows the SnortSMS Collector server to communicate and remotely control the sensor.
Testing
It is possible to test the Agent via the browser. Point your web browser to:
http://userid:password@<sensorip>:10000/snortsms/agent.cgi?ac=test
Be sure to use the correct protocol (http/https), the correct login/password, and sensor IP. If all is configured correctly, you should see a simple test page.
Prerequisites
At this juncture, you should have a SnortSMS Collector and at least one SnortSMS sensor established and functional. We will now walk you through a few steps required to get SnortSMS configured and start managing your Snort sensor(s).
Configure SnortSMS global settings
Create a Snort Daemon Profile
You MUST create at least one Snort Daemon Profile.
This is used to tell SnortSMS how to launch the snort process on the remote sensor.
Populating the libraries
Before you can assign configurations to your sensors, you must first populate the SnortSMS configuration libraries.
The easiest way to fill up the libraries is to import the various Snort snapshot tarball files.
The Snort source code tarball contains much of the default varaibles and config directives.
There are also many VRT and Community rules now available in seperate files.
So start by importing the Snort source tarball (i.e. Snort-x.x.x.tar.gz). Don't worry, SnortSMS will only find what it needs.
Next, import any of the Rule distribution tarballs (i.e. Community-Rules-x.x.tar.gz).
You can either download it to your local desktop or import it from the web.
This will parse the tarball file, detecting any and all rules and directives, thus populating the SnortSMS libraries accordingly. Once this is done, you should be able to browse the libraries and verify the imported resources.
Create a Rule Profile
Now that your resource libraries are full, we suggest you 1st create at least one rule profile.
You cannot assign rules directly to sensors, only rule profiles can be assigned to each sensor.
Adding Sensors
Now you are ready to start adding sensor profiles into the SnortSMS console.
Testing
At this point, SnortSMS should be properly configured. We also assume you have at least one functional Snort-base sensor defined.
From the Administration Console, click anywhere on your sensor line.
You should be able to get statistical data from the 'Status' tab.
There is also a "Test Configuration" under the Settings menu. This is very helpful in determining common issues.
Issue: | I can't log into SnortSMS. |
Resolution: |
|
Note: If the "conf/conf.php" file doesn't exist, SnortSMS authentication check are completely bypassed. You must Update the 'Global Settings' at least once to generate the config file. | |
Issue: | I get an error while trying to save the Global Settings. |
Resolution: |
|
Issue: | I cannot connect to the remote sensor agent. |
Resolution: |
|
Issue: | I get a database connection error. |
Resolution: |
|
Issue: | I get an error "Missing DB.php". |
Resolution: |
|
Issue: | Importing Snort snapshot file failed. |
Resolution: |
|
Issue: | Snort Fails to start via SnortSMS. |
Resolution: |
|
Issue: | Barnyard Fails to start via SnortSMS. |
Resolution: |
|