Solved

Importing Snort's tcpdump into mysql

Posted on 2006-07-12
6
1,439 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 39

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 39

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 39

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

​Being a Managed Services Provider (MSP) has presented you  with challenges in the past— and by meeting those challenges you’ve reaped the rewards of success.  In 2014, challenges and rewards remain; but as the Internet and business environment evol…
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 …
This video discusses moving either the default database or any database to a new volume.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now