Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Snort-Users
[Top] [All Lists]

Re: [Snort-users] SQL to purge alerts over 1 month old?

Subject: Re: [Snort-users] SQL to purge alerts over 1 month old?
Date: Mon, 4 Feb 2008 10:31:16 -0500
This is a project I've been attempting myself, with limited success.
Best I came up with is a shellscript as follows--but be warned, this
seems to leave some stuff behind:

#!/bin/bash

Mysql -u snort -psnort snort<<EOFMYSQL

DELETE data FROM acid_event,data WHERE acid_event.timestamp <=
current_timestamp() - INTERVAL 3 DAY && acid_event.cid = data.cid;

DELETE event FROM acid_event,event WHERE acid_event.timestamp <=
current_timestamp() - INTERVAL 3 DAY && acid_event.cid = event.cid;

DELETE icmphdr FROM acid_event,icmphdr WHERE acid_event.timestamp <=
current_timestamp() - INTERVAL 3 DAY && acid_event.cid = icmphdr.cid;

DELETE iphdr FROM acid_event,iphdr WHERE acid_event.timestamp <=
current_timestamp() - INTERVAL 3 DAY && acid_event.cid = iphdr.cid;

DELETE opt FROM acid_event,opt WHERE acid_event.timestamp <=
current_timestamp() - INTERVAL 3 DAY && acid_event.cid = opt.cid;

DELETE tcphdr FROM Acid_event,tcphdr WHERE acid_event.timestamp <=
current_timestamp() - INTERVAL 3 DAY && acid_event.cid = tcphdr.cid;

DELETE udphdr FROM acid_event,udphdr WHERE acid_event.timestamp <=
current_timestamp() - INTERVAL 3 DAY && acid_event.cid = udphdr.cid;

DELETE acid_event FROM acid_event WHERE acid_event.timestamp <=
current_timestamp() - INTERVAL 3 DAY;

OPTIMIZE TABLE acid_event,data,event,icmphdr,iphdr,opt,tcphdr,udphdr;


-----Original Message-----
From: snort-users-bounces@lists.sourceforge.net
[mailto:snort-users-bounces@lists.sourceforge.net] On Behalf Of Michael
W Cocke
Sent: Monday, February 04, 2008 9:14 AM
To: snort-users@lists.sourceforge.net
Subject: [Snort-users] SQL to purge alerts over 1 month old?

The subject line pretty much says it - I'm medium fair at SQL, but I'm
not seeing this;  Anyone know the syntax to flush alerts older than
one month from the alerts DB (MySQL if it matters)?

Thanks!

Mike-
--
If you're not confused, you're not trying hard enough.
--
Please note - Due to the intense volume of spam, we have installed 
site-wide spam filters at catherders.com.  If email from you bounces,
try non-HTML, non-encoded, non-attachments,

------------------------------------------------------------------------
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Snort-users mailing list
Snort-users@lists.sourceforge.net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Snort-users mailing list
Snort-users@lists.sourceforge.net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users

<Prev in Thread] Current Thread [Next in Thread>