Solved

Importing Snort's tcpdump into mysql

Posted on 2006-07-12
6
1,452 Views
Last Modified: 2006-11-18
We crated snort database using the schema file "create_mysql" in mysql database.
After running the snort with -L option for some time (ex: snort -L tcpdump.log), we want to import the data in tcpdump.log into snort database which we have created earlier in mysql. How to that ?
0
Comment
Question by:raghuni
  • 3
6 Comments
 
LVL 40

Expert Comment

by:noci
ID: 17093757
Right..., to fill the database you need to add a special line to the snort config file,
along:

output database: log, mysql, dbname=snort, username=snort.....
or
output database: alert, mysql, dbname=snort, username=snort, password=....

If everything has been install correctly there is a configuration description in the file called README.database
then everything will be put into the database by snort itself....... No need to import.

In the mean time I will look if I can find a solution to the actual question..... ;-)
0
 
LVL 40

Expert Comment

by:noci
ID: 17095076
If you configure snort to log everything to MySQL according to the docs you should be able to reread
the binary log with 'snort -r tcpdump.log' to process all packets again and get them into the database.

The file has tcpdump format, ethereal et al can read them, but packets are encapsulated within a
"SNORT-protocol" that shows up as ip-proto-255 with some cause code appended.
0
 

Author Comment

by:raghuni
ID: 17096606
I already had some tcpdump file. I want to dump the content of the this file into snort database.
0
 
LVL 40

Accepted Solution

by:
noci earned 200 total points
ID: 17097067
'snort -r tcpdump.log'

from man snort:

    -r tcpdump-file
              Read  the  tcpdump-formatted file tcpdump-file.  This will cause Snort to read and process the file fed to it.  This is useful if,
              for instance, you've got a bunch of SHADOW files that you want to process for content, or even if you've got a bunch  of  reassem-
              bled packet fragments which have been written into a tcpdump formatted file.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Is using shell_exec safe? 8 99
WEBSITE Capture via Linux Router 2 99
I am not sure how to read what this IP tables statement means 2 124
Help With Shell Script Centos 6 6 67
Hello EE, Today we will learn how to send all your network traffic through Tor which is useful to get around censorship and being tracked all together to a certain degree. This article assumes you will be using Linux, have a minimal knowledge of …
Fine Tune your automatic Updates for Ubuntu / Debian
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

766 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question