LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 11-11-2004, 02:38 AM   #1
jarien
LQ Newbie
 
Registered: Nov 2004
Location: Malaysia
Distribution: redhat 9
Posts: 18

Rep: Reputation: 0
Unhappy how to link snort output to mysql


i'm a newbie in snort. i'd install snort rpm in redhat linux 9.

currently the snort is running fine. However, i'm having some problems with its output. i'm wanted to have it output to be dumped into mysql. However, i dun really have any idea of how to do it.

i've modified the snort.conf as below but it does not work.
"output database: alert, mysql, user=snort password=snort dbname=snort host=localhost"

as for the mysql db, i created the snort database myself separately. i wonder if that's why it doesn't work. morever, i cant access the snort db as "snort" but instead can only access it as "root" user.

plz help...
 
Old 11-11-2004, 02:50 AM   #2
linux_terror
Member
 
Registered: Aug 2004
Location: Northbrook, Illinois
Distribution: CentOS-5
Posts: 311

Rep: Reputation: 30
personally I would set up ACID/Snort/MySql to work together. There are excellent tutorials on how to accomplish the setup here --> http://internetsecurityguru.com/
Good luck to ya.

linux_terror
 
Old 11-11-2004, 10:25 AM   #3
jarien
LQ Newbie
 
Registered: Nov 2004
Location: Malaysia
Distribution: redhat 9
Posts: 18

Original Poster
Rep: Reputation: 0
is there any possibility if i only use snort with mysql without the ACID tool? this is because i wish to reduce the usage of extra tools if possible.

thanx.
 
Old 11-11-2004, 03:24 PM   #4
linux_terror
Member
 
Registered: Aug 2004
Location: Northbrook, Illinois
Distribution: CentOS-5
Posts: 311

Rep: Reputation: 30
ACID will help you infinitely as far as analyzing the reports that snort will log to the database, otherwise you will end up with a database full of warnings and how are you going to view them? ACID is very simple to set up and its a web based interface that is accessible via browser, it will not eat system resources, it will simply query your database for the results from snort and present them to you in an organized graphical fashion for analysis.

linux_terror
 
Old 11-11-2004, 08:08 PM   #5
jarien
LQ Newbie
 
Registered: Nov 2004
Location: Malaysia
Distribution: redhat 9
Posts: 18

Original Poster
Rep: Reputation: 0
ehmm, actually i wanted to do some data matching based on the snort log that i dump into mysql. correct me if i'm wrong, acid seems to be a reporting tool for mysql.

or will acid help me with the data matching that i want to do?
 
Old 11-11-2004, 09:51 PM   #6
linux_terror
Member
 
Registered: Aug 2004
Location: Northbrook, Illinois
Distribution: CentOS-5
Posts: 311

Rep: Reputation: 30
The Analysis Console for Intrusion Databases (ACID) is a PHP-based analysis engine to search and process a database of security events generated by various IDSes, firewalls, and network monitoring tools. The features currently include:

* Query-builder and search interface for finding alerts matching on alert meta information (e.g. signature, detection time) as well as the underlying network evidence (e.g. source/destination address, ports, payload, or flags).

* Packet viewer (decoder) will graphically display the layer-3 and layer-4 packet information of logged alerts

* Alert management by providing constructs to logically group alerts to create incidents (alert groups), deleting the handled alerts or false positives, exporting to email for collaboration, or archiving of alerts to transfer them between alert databases.

* Chart and statistics generation based on time, sensor, signature, protocol, IP address, TCP/UDP ports, or classification

ACID has the ability to analyze a wide variety of events which are post-processed into its database. Tools exist for the following formats:

* using Snort (www.snort.org)
o Snort alerts
o tcpdump binary logs
* using logsnorter ( www.snort.org/downloads/logsnorter-0.2.tar.gz)
o ipchains
o iptables
o ipfw

taken from http://acidlab.sourceforge.net/

linux_terror
 
Old 11-12-2004, 07:06 AM   #7
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Re: how to link snort output to mysql

Quote:
Originally posted by jarien

as for the mysql db, i created the snort database myself separately. i wonder if that's why it doesn't work. morever, i cant access the snort db as "snort" but instead can only access it as "root" user.

plz help...
This is your problem. Until you can access the snort db as the snort user, you're not going to be able to log to mysql (unless you do it as root, which is really not a good idea). There is a very good pdf that explains how to set up Snort and mysql on the Snort site. Don't let the fact that it is aimed at Fedora fool you, the majority of the information is applicable to any distro. In your case, you need to look at the section describing how to set up your snort user

Code:
mysql> SET PASSWORD FOR snort@localhost=PASSWORD('password_from_snort.conf');
>Query OK, 0 rows affected (0.25 sec)
mysql> grant CREATE, INSERT, SELECT, DELETE, UPDATE on snort.* to snort@localhost;
>Query OK, 0 rows affected (0.02 sec)
mysql> grant CREATE, INSERT, SELECT, DELETE, UPDATE on snort.* to snort;
>Query OK, 0 rows affected (0.02 sec)
If you didn't do something like this, then it isn't giong to work.
 
Old 11-12-2004, 10:52 AM   #8
jarien
LQ Newbie
 
Registered: Nov 2004
Location: Malaysia
Distribution: redhat 9
Posts: 18

Original Poster
Rep: Reputation: 0
snort can't run properly

well, i get to access my snort db as snort user.
however, there's another problem arise which is my snort.

i used to have snort running smoothly but not my snort can't run.
i run my snort using "/etc/init.d/snortd start", it shows OK
but when i checked its status using "/etc/init.d/snortd status"
i get this message "snort dead but subsys locked"

i've checked out and found out that there are a few suggested solutions
such as
- removed the /var/lock/subsys/snort file
- commented out the "classification.config" in snort.conf file
- check for config file error with "snort -T"

for the first 2 method i tried but i doesn't work.

the 3rd method, it shows the message

Running in IDS mode with inferred config file: ./snort.conf
Log directory = /var/log/snort
ERROR:
[!] ERROR: Can not get write access to logging directory "/var/log/snort".
(directory doesn't exist or permissions are set incorrectly
or it is not a directory at all)

Fatal Error, Quitting..

is there any other solutions to get the snort running properly??

i am wondering what is the difference if i run snort with "/etc/init.d/snortd start" and "/usr/sbin/snort [options]"
although i cant run snort with "/etc/...", i still manage to run snort with "/usr/..."

Last edited by jarien; 11-17-2004 at 02:12 AM.
 
Old 11-12-2004, 05:06 PM   #9
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
Check the permissions on /var/log/snort. If snort is running under its own user (i.e. snort) then the snort user must have write permissions to /var/log/snort and everything in that directory.

P.S. For any Gentoo users this guide rocks for setting up Snort, Acid, and MySql:

http://forums.gentoo.org/viewtopic.php?t=78718


Last edited by Crashed_Again; 11-12-2004 at 05:07 PM.
 
Old 11-17-2004, 02:10 AM   #10
jarien
LQ Newbie
 
Registered: Nov 2004
Location: Malaysia
Distribution: redhat 9
Posts: 18

Original Poster
Rep: Reputation: 0
Unhappy snort ownsership

i think my problem lies on the owner of snort ... but how can i check the owner of my application as well as the privileges i have ( such as read, write)

is the command "ll" applicable to the situation??
as i noe by typing the command "ll", the owner, group and privileges get to be seen ...
but it's for files and folders ... what about application??
is it the same way, too??
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
snort and mysql lord-fu *BSD 1 11-20-2005 09:11 PM
snort and mysql ilnli Linux - General 1 03-28-2005 02:20 PM
mysql snort acid HELP wylie1001 Linux - Software 0 01-01-2005 06:51 PM
Snort & ACID no output dfhzn Linux - Security 1 10-01-2004 02:33 AM
Question about Snort output level of detail. Pcghost Linux - Security 2 04-23-2004 10:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration