Ticket #42858: oinkmaster-suricata.2.conf

File oinkmaster-suricata.2.conf, 20.5 KB (added by jul_bsd@…, 9 years ago)
Line 
1# $Id: oinkmaster.conf,v 1.132 2006/02/02 12:05:08 andreas_o Exp $ #
2
3# This file is pretty big by default, but don't worry.
4# The only things required are "path" and "update_files". You must also
5# set "url" to point to the correct rules archive for your version of
6# Snort, unless you prefer to specify this on the command line.
7# The rest in here is just a few recommended defaults, and examples
8# how to use all the other optional features and give some ideas how they
9# could be used.
10
11# Remember not to let untrusted users edit Oinkmaster configuration
12# files, as things like the PATH to use during execution is defined
13# in here.
14
15
16
17# Use "url = <url>" to specify the location of the rules archive to
18# download. The url must begin with http://, https://, ftp://, file://
19# or scp:// and end with .tar.gz or .tgz, and the file must be a
20# gzipped tarball what contains a directory named "rules".
21# You can also point to a local directory with dir://<directory>.
22# Multiple "url = <url>" lines can be specified to grab multiple rules
23# archives from different locations.
24#
25# Note: if URL is specified on the command line, it overrides all
26#       possible URLs specified in the configuration file(s).
27#
28# The location of the official Snort rules you should use depends
29# on which Snort version you run. Basically, you should go to
30# http://www.snort.org/rules/ and follow the instructions
31# there to pick the right URL for your version of Snort
32# (and remember to update the URL when upgrading Snort in the
33# future). You can of course also specify locations to third party
34# rules.
35#
36# As of March 2005, you must register on the Snort site to get access
37# to the official Snort rules. This will get you an "oinkcode".
38# You then specify the URL as
39# http://www.snort.org/pub-bin/oinkmaster.cgi/<oinkcode>/<filename>
40# For example, if your code is 5a081649c06a277e1022e1284b and
41# you use Snort 2.4, the url to use would be (without the wrap):
42# http://www.snort.org/pub-bin/oinkmaster.cgi/
43# 5a081649c06a277e1022e1284bdc8fabda70e2a4/snortrules-snapshot-2.4.tar.gz
44# See the Oinkmaster FAQ Q1 and http://www.snort.org/rules/ for
45# more information.
46
47## 2014/03/14
48url = http://rules.emergingthreats.net/open/suricata/emerging.rules.tar.gz
49
50# URL examples follows. Replace <oinkcode> with the code you get on the
51# Snort site in your registered user profile.
52
53# Example for Snort 2.4
54# url = http://www.snort.org/pub-bin/oinkmaster.cgi/<oinkcode>/snortrules-snapshot-2.4.tar.gz
55
56# Example for Snort-current ("current" means cvs snapshots).
57# url = http://www.snort.org/pub-bin/oinkmaster.cgi/<oinkcode>/snortrules-snapshot-CURRENT.tar.gz
58
59# Example for Community rules
60# url = http://www.snort.org/pub-bin/downloads.cgi/Download/comm_rules/Community-Rules.tar.gz
61
62# Example for rules from the Bleeding Snort project
63# url = http://www.bleedingsnort.com/bleeding.rules.tar.gz
64
65# If you prefer to download the rules archive from outside Oinkmaster,
66# you can then point to the file on your local filesystem by using
67# file://<filename>, for example:
68# url = file:///tmp/snortrules.tar.gz
69
70# In rare cases you may want to grab the rules directly from a
71# local directory (don't confuse this with the output directory).
72# url = dir:///etc/snort/src/rules
73
74# Example to use scp to copy the rules archive from another host.
75# Only OpenSSH is tested. See the FAQ for more information.
76# url = scp://user@somehost.example.com:/somedir/snortrules.tar.gz
77
78# If you use -u scp://... and need to specify a private ssh key (passed
79# as -i <key> to the scp command) you can specify it here or add an
80# entry in ~/.ssh/config for the Oinkmaster user as described in the
81# OpenSSH manual.
82# scp_key = /home/oinkmaster/oinkmaster_privkey
83
84
85# The PATH to use during execution. If you prefer to use external
86# binaries (i.e. use_external_bins=1, see below), tar and gzip must be
87# found, and also wget if downloading via ftp, http or https. All with
88# optional .exe suffix. If you're on Cygwin, make sure that the path
89# contains the Cygwin binaries and not the native Win32 binaries or
90# you will get problems.
91# Assume UNIX style by default:
92path = /bin:/usr/bin:/usr/local/bin:/opt/local/bin
93
94# Example if running native Win32 or standalone Cygwin:
95# path = c:\oinkmaster;c:\oinkmaster\bin
96
97# Example if running standalone Cygwin and you prefer Cygwin style path:
98# path = /cygdrive/c/oinkmaster:/cygdrive/c/oinkmaster/bin
99
100
101# We normally use external binaries (wget, tar and gzip) since they're
102# already available on most systems and do a good job. If you have the
103# Perl modules Archive::Tar, IO::Zlib and LWP::UserAgent, you can use
104# those instead if you like. You can set use_external_bins below to
105# choose which method you prefer. It's set to 0 by default on Win32
106# (i.e. use Perl modules), and 1 on other systems (i.e. use external
107# binaries). The reason for that is that the required Perl modules
108# are included on Windows/ActivePerl 5.8.1+, so it's easier to use
109# those than to install the ported Unix tools. (Note that if you're
110# using scp to download the archive, external scp  binary is still
111# used.)
112# use_external_bins = 0
113
114
115# Temporary directory to use. This directory must exist when starting and
116# Oinkmaster will then create a temporary sub directory in here.
117# Keep it as a #comment if you want to use the default.
118# The default will be checked for in the environment variables TMP,
119# TMPDIR or TEMPDIR, or otherwise use "/tmp" if none of them was set.
120
121# Example for UNIX.
122# tmpdir = /home/oinkmaster/tmp/
123
124# Example if running native Win32 or Cygwin.
125# tmpdir = c:\tmp
126
127# Example if running Cygwin and you prefer Cygwin style path.
128# tmpdir = /cygdrive/c/tmp
129
130
131# The umask to use during execution if you want it to be something
132# else than the current value when starting Oinkmaster.
133# This will affect the mode bits when writing new files.
134# Keep it commented out to keep your system's current umask.
135# umask = 0027
136
137
138# Files in the archive(s) matching this regular expression will be
139# checked for changes, and then updated or added if needed.
140# All other files will be ignored. You can then choose to skip
141# individual files by specifying the "skipfile" keyword below.
142# Normally you shouldn't need to change this one.
143update_files = \.rules$|\.config$|\.conf$|\.txt$|\.map$
144
145
146# Regexp of keywords that starts a Snort rule.
147# May be useful if you create your own ruletypes and want those
148# lines to be regarded as rules as well.
149# rule_actions = alert|drop|log|pass|reject|sdrop|activate|dynamic
150
151
152# If the number of rules files in the downloaded archive matching the
153# 'update_files' regexp is below min_files, or if the number
154# of rules is below min_rules, the rules are regarded as broken
155# and the update is aborted with an error message.
156# Both are set to 1 by default (i.e. the archive is only regarded as
157# broken if it's totally empty).
158# If you download from multiple URLs, the count is the total number
159# of files/rules across all archives.
160# min_files = 1
161# min_rules = 1
162
163
164# By default, a basic sanity check is performed on most paths/filenames
165# to see if they contain illegal characters that may screw things up.
166# If this check is too strict for your system (e.g. you get bogus
167# "illegal characters in filename" errors because of your local language
168# etc) and you're sure you want to disable the checks completely,
169# set use_path_checks to 0.
170# use_path_checks = 1
171
172
173# If you want Oinkmaster to send a User-Agent HTTP header string
174# other than the default one for wget/LWP, set this variable.
175# user_agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
176
177
178# You can include other files anywhere in here by using
179# "include <file>". <file> will be parsed just like a regular
180# oinkmaster.conf as soon as the include statement is seen, and then
181# return and continue parsing the rest of the original file. If an
182# option is redefined, it will override the previous value. You can use
183# as many "include" statements as you wish, and also include even more
184# files from included files. Example to load stuff from "/etc/foo.conf".
185# include /etc/foo.conf
186
187
188
189#######################################################################
190# Files to totally skip (i.e. never update or check for changes)      #
191#                                                                     #
192# Syntax: skipfile filename                                           #
193# or:     skipfile filename1, filename2, filename3, ...               #
194#######################################################################
195
196# Ignore local.rules from the rules archive by default since we might
197# have put some local rules in our own local.rules and we don't want it
198# to get overwritten by the empty one from the archive after each
199# update.
200skipfile local.rules
201
202# The file deleted.rules contains rules that have been deleted from
203# other files, so there is usually no point in updating it.
204skipfile deleted.rules
205
206# Also skip snort.conf by default since we don't want to overwrite our
207# own snort.conf if we have it in the same directory as the rules. If
208# you have your own production copy of snort.conf in another directory,
209# it may be really nice to check for changes in this file though,
210# especially since variables are sometimes added or modified and
211# new/old files are included/excluded.
212skipfile snort.conf
213
214# You may want to consider ignoring threshold.conf for the same reasons
215# as for snort.conf, i.e. if you customize it locally and don't want it
216# to become overwritten by the default one. It may be better to put
217# local thresholding/suppressing in some local file and still update
218# and use the official one though, in case important stuff is added to
219# it some day. We do update it by default, but it's your call.
220# skipfile threshold.conf
221
222# If you update from multiple URLs at the same time you may need to
223# ignore the sid-msg.map (and generate it yourself if you need one) as
224# it's usually included in each rules tarball. See the FAQ for more info.
225# skipfile sid-msg.map
226
227
228
229##########################################################################
230# SIDs to modify after each update (only for the skilled/stupid/brave).  #
231# Don't use it unless you have to. There is nothing that stops you from  #
232# modifying rules in such ways that they become invalid or generally     #
233# break things. You have been warned.                                    #
234# If you just want to disable SIDs, please skip this section and have a  #
235# look at the "disablesid" keyword below.                                #
236#                                                                        #
237# You may specify multiple modifysid directives for the same SID (they   #
238# will be processed in order of appearance), and you may also specify a  #
239# list of SIDs on which the substitution should be applied.              #
240# If the argument is in the form something.something it's regarded       #
241# as a filename and the substitution will apply on all rules in that     #
242# file. The wildcard ("*") can be used to apply the substitution on all  #
243# rules regardless of the SID or file. Please avoid using #comments      #
244# at the end of modifysid lines, they may confuse the parser in some     #
245# situations.                                                            #
246#                                                                        #
247# Syntax:                                                                #
248#   modifysid SID "replacethis" | "withthis"                             #   
249# or:                                                                    #
250#   modifysid SID1, SID2, SID3, ... "replacethis" | "withthis"           #
251# or:                                                                    #
252#   modifysid file "replacethis" | "withthis"                            #   
253# or:                                                                    #
254#   modifysid * "replacethis" | "withthis"                               #
255#                                                                        #
256# The strings within the quotes will basically be passed to a            #
257# s/replacethis/withthis/ statement in Perl, so they must be valid       #
258# regular expressions. The strings are case-insensitive and only the     #
259# first occurrence will be replaced. If there are multiple occurrences   #
260# you want to replace, simply repeat the same modifysid line.            #
261# As the strings are regular expressions, you MUST escape special        #
262# characters like $ \ / ( ) | by prepending a "\" to them.               #
263#                                                                        #
264# If you specify a modifysid statement for a multi-line rule, Oinkmaster #
265# will first translate the rule into a single-line version and then      #
266# perform the substitution, so you don't have to care about the trailing #
267# backslashes and newlines.                                              #
268#                                                                        #
269# If you use backreference variables in the substitution expression,     #
270# it's strongly recommended to specify them as ${1} instead of $1 and so #
271# on, to avoid parsing confusion with unexpected results in some         #
272# situations. Note that modifysid statements will process both active    #
273# and inactive (disabled) rules.                                         #
274#                                                                        #
275# You may want to check out README.templates and template-examples.conf  #
276# to find how you can simplify the modifysid usage by using templates.   #
277##########################################################################
278
279# Example to enable a rule (in this case SID 1325) that is disabled by
280# default, by simply replacing leading "#alert" with "alert".
281# (You should really use 'enablesid' for this though.)
282# Oinkmaster removes whitespaces next to the leading "#" so you don't
283# have to worry about that, but be careful about possible whitespace in
284# other places when writing the regexps.
285# modifysid 1325 "^#alert" | "alert"
286
287# You could also do this to enable it no matter what type of rule it is
288# (alert, log, pass, etc).
289# modifysid 1325 "^#" | ""
290
291# Example to add "tag" stuff to SID 1325.
292# modifysid 1325 "sid:1325;" | "sid:1325; tag: host, src, 300, seconds;"
293
294# Example to make SID 1378 a 'drop' rule (valid if you're running
295# Snort_inline).
296# modifysid 1378 "^alert" | "drop"
297
298# Example to replace first occurrence of $EXTERNAL_NET with $HOME_NET
299# in SID 302.
300# modifysid 302 "\$EXTERNAL_NET" | "\$HOME_NET"
301
302# You can also specify that a substitution should apply on multiple SIDs.
303# modifysid 302,429,1821 "\$EXTERNAL_NET" | "\$HOME_NET"
304
305# You can take advantage of the fact that it's regular expressions and
306# do more complex stuff. This example (for Snort_inline) adds a 'replace'
307# statement to SID 1324 that replaces "/bin/sh" with "/foo/sh".
308# modifysid 1324 "(content\s*:\s*"\/bin\/sh"\s*;)" | \
309#                "${1} replace:"\/foo\/sh";"
310
311# If you for some reason would like to add a comment inside the actual
312# rules file, like the reason why you disabled this rule, you can do
313# like this (you would normally add such comments in oinkmaster.conf
314# though).
315# modifysid 1324 "(.+)" | "# 20020101: disabled this rule just for fun:\n#${1}"
316
317# Here is an example that is actually useful. Let's say you don't care
318# about incoming welchia pings (detected by SID 483 at the time of
319# writing) but you want to know when infected hosts on your network
320# scans hosts on the outside. (Remember that watching for outgoing
321# malicious packets is often just as important as watching for incoming
322# ones, especially in this case.) The rule currently looks like
323# "alert icmp $EXTERNAL_NET any -> $HOME_NET any ..."
324# but we want to switch that so it becomes
325# "alert icmp $HOME_NET any -> $EXTERNAL_NET any ...".
326# Here is how it could be done.
327# modifysid 483 \
328# "(.+) \$EXTERNAL_NET (.+) \$HOME_NET (.+)" | \
329# "${1} \$HOME_NET ${2} \$EXTERNAL_NET ${3}"
330
331# The wildcard (modifysid * ...) can be used to do all kinds of
332# interesting things. The substitution expression will be applied on all
333# matching rules. First, a silly example to replace "foo" with "bar" in
334# all rules (that have the string "foo" in them, that is.)
335# modifysid * "foo" | "bar"
336
337# If you for some reason don't want to use the stream preprocessor to
338# match established streams, you may want to replace the 'flow'
339# statement with 'flags:A+;' in all those rules.
340# modifysid * "flow:[a-z,_ ]+;" | "flags:A+;"
341
342# Example to convert all rules of classtype attempted-admin to 'drop'
343# rules (for Snort_inline only, obviously).
344# modifysid * "^alert (.*classtype\s*:\s*attempted-admin)" | "drop ${1}"
345
346# This one will append some text to the 'msg' string for all rules that
347# have the 'tag' keyword in them.
348# modifysid * "(.*msg:\s*".+?)"(\s*;.+;\s*tag:.*)" | \
349#             "${1}, going to tag this baby"${2}"
350
351# There may be times when you want to replace multiple occurrences of a
352# certain keyword/string in a rule and not just the first one. To
353# replace the first two occurrences of "foo" with "bar" in SID 100,
354# simply repeat the modifysid statement:
355# modifysid 100 "foo" | "bar"
356# modifysid 100 "foo" | "bar"
357 
358# Or you can even specify a SID list but repeat the same SID as many
359# times as required, like:
360# modifysid 100,100,100 "foo" | "bar"
361
362# Enable all rules in the file exploit.rules.
363# modifysid exploit.rules "^#" | ""
364
365# Enable all rules in exploit.rules, icmp-info.rules and also SID 1171.
366# modifysid exploit.rules, snmp.rules, 1171 "^#" | ""
367
368
369
370########################################################################
371# SIDs that we don't want to update.                                   #
372# If you for some reason don't want a specific rule to be updated      #
373# (e.g. you made local modifications to it and you never want to       #
374# update it and don't care about changes in the official version), you #
375# can specify a "localsid" statement for it. This means that the old   #
376# version of the rule (i.e. the one in the rules file on your          #
377# harddrive) is always kept, regardless if the official version has    #
378# been updated. Please do not use this feature unless in special       #
379# cases as it's easy to end up with many signatures that aren't        #
380# maintained anymore. See the FAQ for details about this and hints     #
381# about better solutions regarding customization of rules.             #
382#                                                                      #
383# Syntax:  localsid SID                                                #
384# or:      localsid SID1, SID2, SID3, ...                              #
385########################################################################
386
387# Example to never update SID 1325.
388# localsid 1325
389
390
391
392########################################################################
393# SIDs to enable after each update.                                    #
394# Will simply remove all the leading '#' for a specified SID (if it's  #
395# a multi-line rule, the leading '#' for all lines are removed.)       #
396# These will be processed after all the modifysid and disablesid       #
397# statements. Using 'enablesid' on a rule that is not disabled is a    #
398# NOOP.                                                                #
399#                                                                      #
400# Syntax:  enablesid SID                                               #
401# or:      enablesid SID1, SID2, SID3, ...                             #
402########################################################################
403
404# Example to enable SID 1325.
405# enablesid 1325
406
407
408
409########################################################################
410# SIDs to comment out, i.e. disable, after each update by placing a    #
411# '#' in front of the rule (if it's a multi-line rule, it will be put  #
412# in front of all lines).                                              #
413#                                                                      #
414# Syntax:  disablesid SID                                              #
415# or:      disablesid SID1, SID2, SID3, ...                            #
416########################################################################
417
418# You can specify one SID per line.
419# disablesid 1
420# disablesid 2
421# disablesid 3
422
423# And also as comma-separated lists.
424# disablesid 4,5,6
425
426# It's a good idea to also add comment about why you disable the sid:
427# disablesid 1324    # 20020101: disabled this SID just because I can
428
429## 20140509 JTO: too many occurence of "SURICATA STREAM"
430##      http://taosecurity.blogspot.ca/2013/02/recovering-from-suricata-gone-wild.html
431##      https://lists.emergingthreats.net/pipermail/emerging-sigs/2012-October/020564.html
432##      http://blog.inliniac.net/2013/04/19/suricata-handling-of-multiple-different-synacks/
433disablesid 2210020
434disablesid 2210021
435disablesid 2210029
436disablesid 2210045