Snort mailing list archives
Re: Updated IP Blacklisting patch (version 2)
From: Eoin Miller <eoin.miller () trojanedbinaries com>
Date: Tue, 07 Jul 2009 13:02:00 -0400
Martin Roesch wrote:
Hi Eoin, That's what I was thinking of doing too. Really I think it's a one liner change to do that, you just have to edit line 376 in src/preprocessors/spp_iplist.c from: SnortEventqAdd(GENERATOR_SPP_IPLIST, IPLIST_BLACKLIST, 1, 0, 0, to SnortEventqAdd(GENERATOR_SPP_IPLIST, (int)pn->data, 1, 0, 0, and that ought to do it. Give it a shot and let me know if it works for you. Marty
Marty,
After the update to the code, there was an 15% or so up-tick in system
processor utilization which is leading to exceptionally mild increase in
packet loss. Not really a surprise since when SnortEventqAdd is called,
it now does two lookups to find the number of the list and then the
number of the list again to refrence the name:
SnortEventqAdd(GENERATOR_SPP_IPLIST, (int)pn->data, 1, 0, 0,
list_names[(int)pn->data], 0);
So to try and streamline this a bit more, I added a new int inside of
IpListEval:
void IpListEval(Packet *p, void *conext)
{
int foo;
Then inside of the if(blacklist_detect) we grab (int)pn->data once and
then save it as foo and just use foo when calling SnortEventqAdd:
if(blacklist_detect)
{
if(!noalerts)
foo = (int)pn->data;
SnortEventqAdd(GENERATOR_SPP_IPLIST, foo, 1, 0, 0,
list_names[foo], 0);
This drops the system processor utilization back down by about 10% or so
and completely stops the packet loss we were experiencing. Some links to
gnuplot graphs based off the snort.stats file are included below to
support this are below:
http://trojanedbinaries.com/security/snort/cpu.png
http://trojanedbinaries.com/security/snort/dropped.png
Hope this can prove useful!
--
Eoin Miller
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/blackberry
_______________________________________________
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
Current thread:
- Re: Updated IP Blacklisting patch (version 2) Martin Roesch (Jul 06)
- Re: Updated IP Blacklisting patch (version 2) Eoin Miller (Jul 06)
- Re: Updated IP Blacklisting patch (version 2) Martin Roesch (Jul 07)
- Re: Updated IP Blacklisting patch (version 2) Eoin Miller (Jul 07)
- Re: Updated IP Blacklisting patch (version 2) Eoin Miller (Jul 07)
- Re: Updated IP Blacklisting patch (version 2) Martin Roesch (Jul 07)
- Re: Updated IP Blacklisting patch (version 2) Eoin Miller (Jul 07)
- Re: Updated IP Blacklisting patch (version 2) Martin Roesch (Jul 07)
- Re: Updated IP Blacklisting patch (version 2) Eoin Miller (Jul 09)
- Re: Updated IP Blacklisting patch (version 2) Martin Roesch (Jul 09)
- Re: Updated IP Blacklisting patch (version 2) Eoin Miller (Jul 09)
- Re: Updated IP Blacklisting patch (version 2) Martin Roesch (Jul 09)
- Re: Updated IP Blacklisting patch (version 2) Eoin Miller (Jul 10)
- Re: Updated IP Blacklisting patch (version 2) Martin Roesch (Jul 07)
- Re: Updated IP Blacklisting patch (version 2) Eoin Miller (Jul 06)
