Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

[Snort-devel] Patch: exec option for starting programs triggered by rules

From: Stefan Schlott <stefan.schlott(at)informatik.uni-ulm.de>
Date: Thu Jun 26 2003 - 08:50:51 EDT


Hi all,

I had the need to run a program when snort matched a specific signature (I wanted to find out more about the attacker's host, e.g. by running nmap). I didn't find a function in snort, so I wrote a new detection plugin (analogous to react and respond). It uses a comma-separated list of option=value touples as syntax. I implemented the following options:

program=programname option option...
ratelimit=i
output=file

program denotes the command to be executed. Options will be passed to the program; the special options "#s" and "#d" are replaced with the source/ destination IP of the triggering packet. ratelimit limits the rule to be triggered at most i times per second. output redirects stdout and stderr of the forked process to the given file.

In my example, I used the following options:   exec:program=/usr/local/snort/nmap -sS -O #s,ratelimit=3,output=/var/log/snort/nmap.log

The plugin is enabled with the --enable-flexresp option in the configure script, just like react and respond.

Patch against today's snapshot is attached; hope you find it useful.

Stefan.

-- 
*--- please cut here... -------------------------------------- thanks! ---*

|-> E-Mail: stefan.schlott@informatik.uni-ulm.de PGP-Key: 0x2F36F4FE <-|
| There are only 10 types of people in this world -- those that | | understand binary and those that don't. | *-------------------------------------------------------------------------*

------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ Snort-devel mailing list Snort-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/snort-devel

Received on Fri Jun 27 10:02:02 2003
Do you need help?X

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:08:06 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library