[Snort-sigs] Adding Changing Snort Rules
r.fulton at ...575...
Sun Jun 9 20:29:01 EDT 2002
On Fri, 2002-06-07 at 22:06, Matt wrote:
> Hello I was wondering if there is a down and dirty "howto" on
> adding/changing new rules?
> I have been using snort for a little over a month and would like to start
> tweaking my rules a little. I have noticed some nice rules come thru here
> that I think would be nice to try out on my home system(winxp/snort1.8.6)
> and have struggled with an efficient way to go about adding/changing rules,
> I end up taking two steps forward and ten steps back it seems and would like
> to know if there is a better way?
Hmmm... there are a whole bunch of issues that might be relevant here.
If you want to add rules you can use the local rules file (jst make sure
it does not get overwritten when you update your rule file). As others
have noted the snort manual gives detailed instructions on writing your
own rules (a basic understanding of how TCP/IP works in needed).
I have written a script (best described as alpha software -- some
features are not fully tested and are almost certainly broken) that down
loads a new rule set and then runs a batch editor that can edit the
control file and or rules files. You can delete rules or modify their
headers or attributes. I mostly use the facilities to delete noisy
rules and have just started using it to alter the header of some rules.
Fiddling with attributes has not been tested.
The script takes a mods file like this:
# changes to control file. indexed on first two tokens
rep var HOME_NET [22.214.171.124/16,126.96.36.199/24]
rep var SMTP [188.8.131.52,184.108.40.206]
rep var DNS_SERVERS [220.127.116.11,18.104.22.168]
rep var RULE_PATH /home/snort/snort-rules/current
del include $RULE_PATH/web-xxx.rules
#rules indexed by sid:revision
5bb:2 src !$HOME_NET
Russell Fulton, Computer and Network Security Officer
The University of Auckland, New Zealand
More information about the Snort-sigs