]> git.ipfire.org Git - people/pmueller/ipfire-3.x.git/blob - suricata/suricata.conf
suricata: Update to rc1 and changed rule config directory.
[people/pmueller/ipfire-3.x.git] / suricata / suricata.conf
1 %YAML 1.1
2 ---
3 # Suricata Emergingthreats Pro Open Rulesets Recommended
4 reference-config-file: /etc/suricata/rules/reference.config
5
6 # Number of packets allowed to be processed simultaneously. Default is a
7 # conservative 50. a higher number will make sure CPU's/CPU cores will be
8 # more easily kept busy, but will negatively impact caching.
9 #
10 # If you are using the CUDA pattern matcher (b2g_cuda below), different rules
11 # apply. In that case try something like 4000 or more. This is because the CUDA
12 # pattern matcher scans many packets in parallel.
13 #max-pending-packets: 50
14
15 # Set the order of alerts bassed on actions
16 # The default order is pass, drop, reject, alert
17 action-order:
18 - pass
19 - drop
20 - reject
21 - alert
22
23
24 # The default logging directory. Any log or output file will be
25 # placed here if its not specified with a full path name. This can be
26 # overridden with the -l command line parameter.
27 default-log-dir: /var/log/suricata
28
29 # Configure the type of alert (and other) logging you would like.
30 outputs:
31
32 # a line based alerts log similar to Snort's fast.log
33 - fast:
34 enabled: yes
35 filename: fast.log
36
37 # log output for use with Barnyard
38 - unified-log:
39 enabled: no
40 filename: unified.log
41
42 # Limit in MB.
43 #limit: 32
44
45 # alert output for use with Barnyard
46 - unified-alert:
47 enabled: no
48 filename: unified.alert
49
50 # Limit in MB.
51 #limit: 32
52
53 # alert output for use with Barnyard2
54 - unified2-alert:
55 enabled: no
56 filename: unified2.alert
57
58 # Limit in MB.
59 #limit: 32
60
61 # a line based log of HTTP requests (no alerts)
62 - http-log:
63 enabled: yes
64 filename: http.log
65
66 # a full alerts log containing much information for signature writers
67 # or for investigating suspected false positives.
68 - alert-debug:
69 enabled: no
70 filename: alert-debug.log
71
72 # alert output to prelude (http://www.prelude-technologies.com/) only
73 # available if Suricata has been compiled with --enable-prelude
74 - alert-prelude:
75 enabled: no
76 profile: suricata
77
78 defrag:
79 max-frags: 65535
80 prealloc: yes
81 timeout: 60
82
83 # You can specify a threshold config file by setting "threshold-file"
84 # to the path of the threshold config file:
85 # threshold-file: /etc/suricata/threshold.config
86
87 # The detection engine builds internal groups of signatures. The engine
88 # allow us to specify the profile to use for them, to manage memory on an
89 # efficient way keeping a good performance. For the profile keyword you
90 # can use the words "low", "medium", "high" or "custom". If you use custom
91 # make sure to define the values at "- custom-values" as your convenience.
92 # Usually you would prefer medium/high/low
93 detect-engine:
94 - profile: medium
95 - custom-values:
96 toclient_src_groups: 2
97 toclient_dst_groups: 2
98 toclient_sp_groups: 2
99 toclient_dp_groups: 3
100 toserver_src_groups: 2
101 toserver_dst_groups: 4
102 toserver_sp_groups: 2
103 toserver_dp_groups: 25
104
105 # Suricata is multi-threaded. Here the threading can be influenced.
106 threading:
107 # On some cpu's/architectures it is beneficial to tie individual threads
108 # to specific CPU's/CPU cores. In this case all threads are tied to CPU0,
109 # and each extra CPU/core has one "detect" thread.
110 #
111 # On Intel Core2 and Nehalem CPU's enabling this will degrade performance.
112 #
113 set_cpu_affinity: no
114 #
115 # By default Suricata creates one "detect" thread per available CPU/CPU core.
116 # This setting allows controlling this behaviour. A ratio setting of 2 will
117 # create 2 detect threads for each CPU/CPU core. So for a dual core CPU this
118 # will result in 4 detect threads. If values below 1 are used, less threads
119 # are created. So on a dual core CPU a setting of 0.5 results in 1 detect
120 # thread being created. Regardless of the setting at a minimum 1 detect
121 # thread will always be created.
122 #
123 detect_thread_ratio: 1.5
124
125 # Select the cuda device to use. The device_id identifies the device to be used
126 # if one has multiple devices on the system. To find out device_id associated
127 # with the card(s) on the system run "suricata --list-cuda-cards".
128 cuda:
129 device_id: 0
130
131 # Select the multi pattern algorithm you want to run for scan/search the
132 # in the engine. The supported algorithms are b2g, b3g and wumanber.
133 #
134 # There is also a CUDA pattern matcher (only available if Suricata was
135 # compiled with --enable-cuda: b2g_cuda. Make sure to update your
136 # max-pending-packets setting above as well if you use b2g_cuda.
137
138 mpm-algo: b2g
139
140 # The memory settings for hash size of these algorithms can vary from lowest
141 # (2048) - low (4096) - medium (8192) - high (16384) - highest (32768) - max
142 # (65536). The bloomfilter sizes of these algorithms can vary from low (512) -
143 # medium (1024) - high (2048).
144 #
145 # For B2g/B3g algorithms, there is a support for two different scan/search
146 # algorithms. For B2g the scan algorithms are B2gScan & B2gScanBNDMq, and
147 # search algorithms are B2gSearch & B2gSearchBNDMq. For B3g scan algorithms
148 # are B3gScan & B3gScanBNDMq, and search algorithms are B3gSearch &
149 # B3gSearchBNDMq.
150 #
151 # For B2g the different scan/search algorithms and, hash and bloom
152 # filter size settings. For B3g the different scan/search algorithms and, hash
153 # and bloom filter size settings. For wumanber the hash and bloom filter size
154 # settings.
155
156 pattern-matcher:
157 - b2g:
158 scan_algo: B2gScanBNDMq
159 search_algo: B2gSearchBNDMq
160 hash_size: low
161 bf_size: medium
162 - b3g:
163 scan_algo: B3gScanBNDMq
164 search_algo: B3gSearchBNDMq
165 hash_size: low
166 bf_size: medium
167 - wumanber:
168 hash_size: low
169 bf_size: medium
170
171 # Flow settings:
172 # By default, the reserved memory (memcap) for flows is 32MB. This is the limit
173 # for flow allocation inside the engine. You can change this value to allow
174 # more memory usage for flows.
175 # The hash_size determine the size of the hash used to identify flows inside
176 # the engine, and by default the value is 65536.
177 # At the startup, the engine can preallocate a number of flows, to get a better
178 # performance. The number of flows preallocated is 10000 by default.
179 # emergency_recovery is the percentage of flows that the engine need to
180 # prune before unsetting the emergency state. The emergency state is activated
181 # when the memcap limit is reached, allowing to create new flows, but
182 # prunning them with the emergency timeouts (they are defined below).
183 # If the memcap is reached, the engine will try to prune prune_flows
184 # with the default timeouts. If it doens't find a flow to prune, it will set
185 # the emergency bit and it will try again with more agressive timeouts.
186 # If that doesn't work, then it will try to kill the last time seen flows
187 # not in use.
188
189 flow:
190 memcap: 33554432
191 hash_size: 65536
192 prealloc: 10000
193 emergency_recovery: 30
194 prune_flows: 5
195
196 # Specific timeouts for flows. Here you can specify the timeouts that the
197 # active flows will wait to transit from the current state to another, on each
198 # protocol. The value of "new" determine the seconds to wait after a hanshake or
199 # stream startup before the engine free the data of that flow it doesn't
200 # change the state to established (usually if we don't receive more packets
201 # of that flow). The value of "established" is the amount of
202 # seconds that the engine will wait to free the flow if it spend that amount
203 # without receiving new packets or closing the connection. "closed" is the
204 # amount of time to wait after a flow is closed (usually zero).
205 #
206 # There's an emergency mode that will become active under attack circumstances,
207 # making the engine to check flow status faster. This configuration variables
208 # use the prefix "emergency_" and work similar as the normal ones.
209 # Some timeouts doesn't apply to all the protocols, like "closed", for udp and
210 # icmp.
211
212 flow-timeouts:
213
214 default:
215 new: 30
216 established: 300
217 closed: 0
218 emergency_new: 10
219 emergency_established: 100
220 emergency_closed: 0
221 tcp:
222 new: 60
223 established: 3600
224 closed: 120
225 emergency_new: 10
226 emergency_established: 300
227 emergency_closed: 20
228 udp:
229 new: 30
230 established: 300
231 emergency_new: 10
232 emergency_established: 100
233 icmp:
234 new: 30
235 established: 300
236 emergency_new: 10
237 emergency_established: 100
238
239 # Stream engine settings. Here the TCP stream tracking and reaasembly
240 # engine is configured.
241 #
242 # stream:
243 # memcap: 33554432 # 32mb tcp session memcap
244 # checksum_validation: yes # To validate the checksum of received
245 # packet. If csum validation is specified as
246 # "yes", then packet with invalid csum will not
247 # be processed by the engine stream/app layer.
248 # max_sessions: 262144 # 256k concurrent sessions
249 # prealloc_sessions: 32768 # 32k sessions prealloc'd
250 # midstream: false # don't allow midstream session pickups
251 # async_oneside: false # don't enable async stream handling
252 # reassembly:
253 # memcap: 67108864 # 64mb tcp reassembly memcap
254 # depth: 1048576 # 1 MB reassembly depth
255 stream:
256 memcap: 33554432
257 checksum_validation: yes
258 reassembly:
259 memcap: 67108864
260 depth: 1048576
261
262 # Logging configuration. This is not about logging IDS alerts, but
263 # IDS output about what its doing, errors, etc.
264 logging:
265
266 # The default log level, can be overridden in an output section.
267 # Note that debug level logging will only be emitted if Suricata was
268 # compiled with the --enable-debug configure option.
269 #
270 # This value is overriden by the SC_LOG_LEVEL env var.
271 default-log-level: info
272
273 # The default output format. Optional parameter, should default to
274 # something reasonable if not provided. Can be overriden in an
275 # output section. You can leave this out to get the default.
276 #
277 # This value is overriden by the SC_LOG_FORMAT env var.
278 #default-log-format: "[%i] %t - (%f:%l) <%d> (%n) -- "
279
280 # A regex to filter output. Can be overridden in an output section.
281 # Defaults to empty (no filter).
282 #
283 # This value is overriden by the SC_LOG_OP_FILTER env var.
284 default-output-filter:
285
286 # Define your logging outputs. If none are defined, or they are all
287 # disabled you will get the default - console output.
288 outputs:
289 - console:
290 enabled: yes
291 - file:
292 enabled: yes
293 filename: /var/log/suricata.log
294 - syslog:
295 enabled: no
296 facility: local5
297 format: "[%i] <%d> -- "
298
299 # PF_RING configuration. for use with native PF_RING support
300 # for more info see http://www.ntop.org/PF_RING.html
301 pfring:
302
303 # Default interface we will listen on.
304 interface: eth0
305
306 # Default clusterid. PF_RING will load balance packets based on flow.
307 # All threads/processes that will participate need to have the same
308 # clusterid.
309 cluster-id: 99
310
311 # Default PF_RING cluster type. PF_RING can load balance per flow or per hash.
312 # This is only supported in versions of PF_RING > 4.1.1.
313 cluster-type: cluster_round_robin
314
315 # For FreeBSD ipfw(8) divert(4) support.
316 # Please make sure you have ipfw_load="YES" and ipdivert_load="YES"
317 # in /etc/loader.conf or kldload'ing the appropriate kernel modules.
318 # Additionally, you need to have an ipfw rule for the engine to see
319 # the packets from ipfw. For Example:
320 #
321 # ipfw add 100 divert 8000 ip from any to any
322 #
323 # The 8000 above should be the same number you passed on the command
324 # line, i.e. -d 8000
325 #
326 ipfw:
327
328 # Reinject packets at the specified ipfw rule number. This config
329 # option is the ipfw rule number AT WHICH rule processing continues
330 # in the ipfw processing system after the engine has finished
331 # inspecting the packet for acceptance. If no rule number is specified,
332 # accepted packets are reinjected at the divert rule which they entered
333 # and IPFW rule processing continues. No check is done to verify
334 # this will rule makes sense so care must be taken to avoid loops in ipfw.
335 #
336 ## The following example tells the engine to reinject packets
337 # back into the ipfw firewall AT rule number 5500:
338 #
339 # ipfw-reinjection-rule-number: 5500
340
341 # Set the default rule path here to search for the files.
342 # if not set, it will look at the current working dir
343 default-rule-path: /etc/suricata/rules/
344 rule-files:
345 # - emerging-ftp.rules
346 # - emerging-policy.rules
347 # - emerging-trojan.rules
348 # - emerging-games.rules
349 # - emerging-pop3.rules
350 # - emerging-user_agents.rules
351 # - emerging-activex.rules
352 # - emerging-rpc.rules
353 # - emerging-virus.rules
354 # - emerging-attack_response.rules
355 # - emerging-icmp.rules
356 # - emerging-scan.rules
357 # - emerging-scada.rules
358 # - emerging-voip.rules
359 # - emerging-chat.rules
360 # - emerging-icmp_info.rules
361 # - emerging-shellcode.rules
362 # - emerging-web_client.rules
363 # - emerging-imap.rules
364 # - emerging-web_server.rules
365 # - emerging-current_events.rules
366 # - emerging-inappropriate.rules
367 # - emerging-smtp.rules
368 # - emerging-web_specific_apps.rules
369 # - emerging-deleted.rules
370 # - emerging-malware.rules
371 # - emerging-snmp.rules
372 # - emerging-worm.rules
373 # - emerging-dns.rules
374 # - emerging-misc.rules
375 # - emerging-sql.rules
376 # - emerging-dos.rules
377 # - emerging-netbios.rules
378 # - emerging-telnet.rules
379 # - emerging-exploit.rules
380 # - emerging-p2p.rules
381 # - emerging-tftp.rules
382 # - emerging-botcc.rules
383 # - emerging-compromised.rules
384 # - emerging-drop.rules
385 # - emerging-dshield.rules
386 # - emerging-rbn.rules
387 # - emerging-rbn-malvertisers.rules
388 # - emerging-tor.rules
389 # - emerging-mobile_malware.rules
390
391 classification-file: /etc/suricata/rules/classification.config
392
393 # Holds variables that would be used by the engine.
394 vars:
395
396 # Holds the address group vars that would be passed in a Signature.
397 # These would be retrieved during the Signature address parsing stage.
398 address-groups:
399
400 HOME_NET: "[192.168.0.0/16,10.0.0.0/8,172.16.0.0/12]"
401
402 EXTERNAL_NET: any
403
404 HTTP_SERVERS: "$HOME_NET"
405
406 SMTP_SERVERS: "$HOME_NET"
407
408 SQL_SERVERS: "$HOME_NET"
409
410 DNS_SERVERS: "$HOME_NET"
411
412 TELNET_SERVERS: "$HOME_NET"
413
414 AIM_SERVERS: any
415
416 #These vars are required if you're using the Digitalbond Scada signatures in the scada.rules category
417 # DNP3_SERVER: "$HOME_NET"
418 # DNP3_CLIENT: "$HOME_NET"
419 # MODBUS_CLIENT: "$HOME_NET"
420 # MODBUS_SERVER: "$HOME_NET"
421 # ENIP_CLIENT: "$HOME_NET"
422 # ENIP_SERVER: "$HOME_NET"
423
424
425 # Holds the port group vars that would be passed in a Signature.
426 # These would be retrieved during the Signature port parsing stage.
427 port-groups:
428
429 HTTP_PORTS: "80"
430
431 SHELLCODE_PORTS: "!80"
432
433 ORACLE_PORTS: 1521
434
435 SSH_PORTS: 22
436
437 # DNP3_PORTS: 20000
438
439 # Host specific policies for defragmentation and TCP stream
440 # reassembly. The host OS lookup is done using a radix tree, just
441 # like a routing table so the most specific entry matches.
442 host-os-policy:
443 # Make the default policy windows.
444 windows: [0.0.0.0/0]
445 bsd: []
446 bsd_right: []
447 old_linux: []
448 linux: [10.0.0.0/8, 192.168.1.100, "8762:2352:6241:7245:E000:0000:0000:0000"]
449 old_solaris: []
450 solaris: ["::1"]
451 hpux10: []
452 hpux11: []
453 irix: []
454 macos: []
455 vista: []
456 windows2k3: []
457
458 ###########################################################################
459 # Configure libhtp.
460 #
461 #
462 # default-config: Used when no server-config matches
463 # personality: List of personalities used by default
464 #
465 # server-config: List of server configurations to use if address matches
466 # address: List of ip addresses or networks for this block
467 # personalitiy: List of personalities used by this block
468 #
469 # Currently Available Personalities:
470 # Minimal
471 # Generic
472 # IDS (default)
473 # IIS_4_0
474 # IIS_5_0
475 # IIS_5_1
476 # IIS_6_0
477 # IIS_7_0
478 # IIS_7_5
479 # Apache
480 # Apache_2_2
481 ###########################################################################
482 libhtp:
483
484 default-config:
485 personality: IDS
486
487 server-config:
488
489 - apache:
490 address: [192.168.1.0/24, 127.0.0.0/8, "::1"]
491 personality: Apache_2_2
492
493 - iis7:
494 address:
495 - 192.168.0.0/24
496 - 192.168.10.0/24
497 personality: IIS_7_0
498
499 # rule profiling settings. Only effective if Suricata has been built with the
500 # the --enable-profiling configure flag.
501 #
502 profiling:
503
504 rules:
505
506 # Profiling can be disabled here, but it will still have a
507 # performance impact if compiled in.
508 enabled: yes
509
510 # Sort options: ticks, avgticks, checks, matches
511 sort: avgticks
512
513 # Limit the number of items printed at exit.
514 limit: 100
515
516