suricata.yaml

Xavier Lange, 03/21/2012 03:15 AM

Download (31.9 KB)

 
1
%YAML 1.1
2
---
3

    
4
# Suricata configuration file. In addition to the comments describing all
5
# options in this file, full documentation can be found at:
6
# https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Suricatayaml
7

    
8

    
9
# Number of packets allowed to be processed simultaneously.  Default is a
10
# conservative 50. a higher number will make sure CPU's/CPU cores will be
11
# more easily kept busy, but will negatively impact caching.
12
#
13
# If you are using the CUDA pattern matcher (b2g_cuda below), different rules
14
# apply. In that case try something like 4000 or more. This is because the CUDA
15
# pattern matcher scans many packets in parallel.
16
#max-pending-packets: 50
17

    
18
# Runmode custom mode the engine should run in.  Please check --list-runmodes
19
# to get the runmode custom modes that can be used here for a particular runmode.
20
#runmode: auto
21

    
22
# Default pid file.
23
# Will use this file if no --pidfile in command options.
24
pid-file: /var/log/suricta/suricata.pid
25

    
26
# Preallocated size for packet. Default is 1514 which is the classical
27
# size for pcap on ethernet. You should adjust this value to the highest
28
# packet size (MTU + hardware header) on your system.
29
#default-packet-size: 1514
30

    
31
# Set the order of alerts bassed on actions
32
# The default order is pass, drop, reject, alert
33
action-order:
34
  - pass
35
  - drop
36
  - reject
37
  - alert
38

    
39

    
40
# The default logging directory.  Any log or output file will be
41
# placed here if its not specified with a full path name.  This can be
42
# overridden with the -l command line parameter.
43
default-log-dir: /var/log/suricata/
44

    
45
# Configure the type of alert (and other) logging you would like.
46
outputs:
47

    
48
  # a line based alerts log similar to Snort's fast.log
49
  - fast:
50
      enabled: yes
51
      filename: fast.log
52
      append: yes
53
      #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
54

    
55
  # alert output for use with Barnyard2
56
  - unified2-alert:
57
      enabled: yes
58
      filename: unified2.alert
59

60
      # File size limit.  Can be specified in kb, mb, gb.  Just a number
61
      # is parsed as bytes.
62
      #limit: 32mb
63

    
64
  # a line based log of HTTP requests (no alerts)
65
  - http-log:
66
      enabled: yes
67
      filename: http.log
68
      append: yes
69
      #extended: yes     # enable this for extended logging information
70
      #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
71

    
72
  # a line based log to used with pcap file study.
73
  # this module is dedicated to offline pcap parsing (empty output
74
  # if used with an other kind of input). It can interoperate with
75
  # pcap parser like wireshark via the suriwire plugin.
76
  - pcap-info:
77
      enabled: no
78

    
79
  # Packet log... log packets in pcap format. 2 modes of operation: "normal"
80
  # and "sguil".
81
  #
82
  # In normal mode a pcap file "filename" is created in the default-log-dir,
83
  # or are as specified by "dir". In Sguil mode "dir" indicates the base directory.
84
  # In this base dir the pcaps are created in th directory structure Sguil expects:
85
  #
86
  # $sguil-base-dir/YYYY-MM-DD/$filename.<timestamp>
87
  #
88
  # By default all packets are logged except:
89
  # - TCP streams beyond stream.reassembly.depth
90
  # - encrypted streams after the key exchange
91
  #
92
  - pcap-log:
93
      enabled:  no
94
      filename: log.pcap
95

96
      # File size limit.  Can be specified in kb, mb, gb.  Just a number
97
      # is parsed as bytes.
98
      limit: 1000mb
99

100
      # If set to a value will enable ring buffer mode. Will keep Maximum of "max-files" of size "limit"
101
      max-files: 2000
102

103
      mode: normal # normal or sguil.
104
      #sguil-base-dir: /nsm_data/
105
      #ts-format: usec # sec or usec second format (default) is filename.sec usec is filename.sec.usec
106
      use-stream-depth: no #If set to "yes" packets seen after reaching stream inspection depth are ignored. "no" logs all packets
107

    
108
  # a full alerts log containing much information for signature writers
109
  # or for investigating suspected false positives.
110
  - alert-debug:
111
      enabled: no
112
      filename: alert-debug.log
113
      append: yes
114
      #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
115

    
116
  # alert output to prelude (http://www.prelude-technologies.com/) only
117
  # available if Suricata has been compiled with --enable-prelude
118
  - alert-prelude:
119
      enabled: no
120
      profile: suricata
121
      log-packet-content: no
122
      log-packet-header: yes
123

    
124
  # Stats.log contains data from various counters of the suricata engine.
125
  # The interval field (in seconds) tells after how long output will be written
126
  # on the log file.
127
  - stats:
128
      enabled: yes
129
      filename: stats.log
130
      interval: 8
131

    
132
  # a line based alerts log similar to fast.log into syslog
133
  - syslog:
134
      enabled: no
135
      # reported identity to syslog. If ommited the program name (usually
136
      # suricata) will be used.
137
      #identity: "suricata"
138
      facility: local5
139
      #level: Info ## possible levels: Emergency, Alert, Critical,
140
                   ## Error, Warning, Notice, Info, Debug
141

    
142
  # a line based information for dropped packets in IPS mode
143
  - drop:
144
      enabled: no
145
      filename: drop.log
146
      append: yes
147
      #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
148

    
149
  # output module to store extracted files to disk
150
  #
151
  # The files are stored to the log-dir in a format "file.<id>" where <id> is
152
  # an incrementing number starting at 1. For each file "file.<id>" a meta
153
  # file "file.<id>.meta" is created.
154
  #
155
  # File extraction depends on a lot of things to be fully done:
156
  # - stream reassembly depth. For optimal results, set this to 0 (unlimited)
157
  # - http request / response body sizes. Again set to 0 for optimal results.
158
  # - rules that contain the "filestore" keyword.
159
  - file-store:
160
      enabled: no       # set to yes to enable
161
      log-dir: files    # directory to store the files
162
      force-magic: no   # force logging magic on all stored files
163
      force-md5: no     # force logging of md5 checksums
164
      #waldo: file.waldo # waldo file to store the file_id across runs
165

    
166
  # output module to log files tracked in a easily parsable json format
167
  - file-log:
168
      enabled: no
169
      filename: files-json.log
170
      append: yes
171
      #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
172

173
      force-magic: no   # force logging magic on all logged files
174
      force-md5: no     # force logging of md5 checksums
175

    
176
# Magic file. The extension .mgc is added to the value here.
177
#magic-file: /usr/share/file/magic
178
magic-file: /usr/share/file/magic
179

    
180
# When running in NFQ inline mode, it is possible to use a simulated
181
# non-terminal NFQUEUE verdict.
182
# This permit to do send all needed packet to suricata via this a rule:
183
#        iptables -I FORWARD -m mark ! --mark $MARK/$MASK -j NFQUEUE
184
# And below, you can have your standard filtering ruleset. To activate
185
# this mode, you need to set mode to 'repeat'
186
# If you want packet to be sent to another queue after an ACCEPT decision
187
# set mode to 'route' and set next-queue value.
188
nfq:
189
#  mode: accept
190
#  repeat-mark: 1
191
#  repeat-mask: 1
192
#  route-queue: 2
193

    
194
# af-packet support
195
# Set threads to > 1 to use PACKET_FANOUT support
196
af-packet:
197
  - interface: eth0
198
    # Number of receive threads (>1 will enable experimental flow pinned
199
    # runmode)
200
    threads: 1
201
    # Default clusterid.  AF_PACKET will load balance packets based on flow.
202
    # All threads/processes that will participate need to have the same
203
    # clusterid.
204
    cluster-id: 99
205
    # Default AF_PACKET cluster type. AF_PACKET can load balance per flow or per hash.
206
    # This is only supported for Linux kernel > 3.1
207
    # possible value are:
208
    #  * cluster_round_robin: round robin load balancing
209
    #  * cluster_flow: all packets of a given flow are send to the same socket
210
    #  * cluster_cpu: all packets treated in kernel by a CPU are send to the same socket
211
    cluster-type: cluster_round_robin
212
    # In some fragmentation case, the hash can not be computed. If "defrag" is set
213
    # to yes, the kernel will do the needed defragmentation before sending the packets.
214
    defrag: yes
215
    # To use the ring feature of AF_PACKET, set 'use-mmap' to yes
216
    use-mmap: yes
217
    # recv buffer size, increase value could improve performance
218
    # buffer-size: 32768
219
    # Set to yes to disable promiscuous mode
220
    # disable-promisc: no
221
    # Choose checksum verification mode for the interface. At the moment
222
    # of the capture, some packets may be with an invalid checksum due to
223
    # offloading to the network card of the checksum computation.
224
    # Possible values are:
225
    #  - kernel: use indication sent by kernel for each packet (default)
226
    #  - yes: checksum validation is forced
227
    #  - no: checksum validation is disabled
228
    #  - auto: suricata uses a statistical approach to detect when
229
    #  checksum off-loading is used.
230
    # Warning: 'checksum-validation' must be set to yes to have any validation
231
    #checksum-checks: kernel
232
  - interface: eth1
233
    threads: 1
234
    cluster-id: 98
235
    cluster-type: cluster_round_robin
236
    defrag: yes
237
    # buffer-size: 32768
238
    # disable-promisc: no
239

    
240
defrag:
241
  max-frags: 65535
242
  prealloc: yes
243
  timeout: 60
244

    
245
# When run with the option --engine-analysis, the engine will read each of
246
# the parameters below, and print reports for each of the enabled sections
247
# and exit.  The reports are printed to a file in the default log dir
248
# given by the parameter "default-log-dir", with engine reporting
249
# subsection below printing reports in its own report file.
250
engine-analysis:
251
  # enables printing reports for fast-pattern for every rule.
252
  rules-fast-pattern: yes
253

    
254
#recursion and match limits for PCRE where supported
255
pcre:
256
  match-limit: 3500
257
  match-limit-recursion: 1500
258

    
259
# You can specify a threshold config file by setting "threshold-file"
260
# to the path of the threshold config file:
261
# threshold-file: /etc/suricata/threshold.config
262

    
263
# The detection engine builds internal groups of signatures. The engine
264
# allow us to specify the profile to use for them, to manage memory on an
265
# efficient way keeping a good performance. For the profile keyword you
266
# can use the words "low", "medium", "high" or "custom". If you use custom
267
# make sure to define the values at "- custom-values" as your convenience.
268
# Usually you would prefer medium/high/low.
269
#
270
# "sgh mpm-context", indicates how the staging should allot mpm contexts for
271
# the signature groups.  "single" indicates the use of a single context for
272
# all the signature group heads.  "full" indicates a mpm-context for each
273
# group head.  "auto" lets the engine decide the distribution of contexts
274
# based on the information the engine gathers on the patterns from each
275
# group head.
276
#
277
# The option inspection-recursion-limit is used to limit the recursive calls
278
# in the content inspection code.  For certain payload-sig combinations, we
279
# might end up taking too much time in the content inspection code.
280
# If the argument specified is 0, the engine uses an internally defined
281
# default limit.  On not specifying a value, we use no limits on the recursion.
282
detect-engine:
283
  - profile: medium
284
  - custom-values:
285
      toclient-src-groups: 2
286
      toclient-dst-groups: 2
287
      toclient-sp-groups: 2
288
      toclient-dp-groups: 3
289
      toserver-src-groups: 2
290
      toserver-dst-groups: 4
291
      toserver-sp-groups: 2
292
      toserver-dp-groups: 25
293
  - sgh-mpm-context: auto
294
  - inspection-recursion-limit: 3000
295

    
296
# Suricata is multi-threaded. Here the threading can be influenced.
297
threading:
298
  # On some cpu's/architectures it is beneficial to tie individual threads
299
  # to specific CPU's/CPU cores. In this case all threads are tied to CPU0,
300
  # and each extra CPU/core has one "detect" thread.
301
  #
302
  # On Intel Core2 and Nehalem CPU's enabling this will degrade performance.
303
  #
304
  set-cpu-affinity: no
305
  # Tune cpu affinity of suricata threads. Each family of threads can be bound
306
  # on specific CPUs.
307
  cpu-affinity:
308
    - management-cpu-set:
309
        cpu: [ 0 ]  # include only these cpus in affinity settings
310
    - receive-cpu-set:
311
        cpu: [ 0 ]  # include only these cpus in affinity settings
312
    - decode-cpu-set:
313
        cpu: [ 0, 1 ]
314
        mode: "balanced"
315
    - stream-cpu-set:
316
        cpu: [ "0-1" ]
317
    - detect-cpu-set:
318
        cpu: [ "all" ]
319
        mode: "exclusive" # run detect threads in these cpus
320
        # Use explicitely 3 threads and don't compute number by using
321
        # detect-thread-ratio variable:
322
        # threads: 3
323
        prio:
324
          low: [ 0 ]
325
          medium: [ "1-2" ]
326
          high: [ 3 ]
327
          default: "medium"
328
    - verdict-cpu-set:
329
        cpu: [ 0 ]
330
        prio:
331
          default: "high"
332
    - reject-cpu-set:
333
        cpu: [ 0 ]
334
        prio:
335
          default: "low"
336
    - output-cpu-set:
337
        cpu: [ "all" ]
338
        prio:
339
           default: "medium"
340
  #
341
  # By default Suricata creates one "detect" thread per available CPU/CPU core.
342
  # This setting allows controlling this behaviour. A ratio setting of 2 will
343
  # create 2 detect threads for each CPU/CPU core. So for a dual core CPU this
344
  # will result in 4 detect threads. If values below 1 are used, less threads
345
  # are created. So on a dual core CPU a setting of 0.5 results in 1 detect
346
  # thread being created. Regardless of the setting at a minimum 1 detect
347
  # thread will always be created.
348
  #
349
  detect-thread-ratio: 1.5
350

    
351
# Cuda configuration.
352
cuda:
353
  # The "mpm" profile.  On not specifying any of these parameters, the engine's
354
  # internal default values are used, which are same as the ones specified here.
355
  - mpm:
356
      # Threshold limit for no of packets buffered to the GPU.  Once we hit this
357
      # limit, we pass the buffer to the gpu.
358
      packet-buffer-limit: 2400
359
      # The maximum length for a packet that we would buffer to the gpu.
360
      # Anything over this is MPM'ed on the CPU.  All entries > 0 are valid.
361
      # Can be specified in kb, mb, gb.  Just a number indicates it's in bytes.
362
      packet-size-limit: 1500
363
      # No of packet buffers we initialize.  All entries > 0 are valid.
364
      packet-buffers: 10
365
      # The timeout limit for batching of packets in secs.  If we don't fill the
366
      # buffer within this timeout limit, we pass the currently filled buffer to the gpu.
367
      # All entries > 0 are valid.
368
      batching-timeout: 1
369
      # Specifies whether to use page-locked memory whereever possible.  Accepted values
370
      # are "enabled" and "disabled".
371
      page-locked: enabled
372
      # The device to use for the mpm.  Currently we don't support load balancing
373
      # on multiple gpus.  In case you have multiple devices on your system, you
374
      # can specify the device to use, using this conf.  By default we hold 0, to
375
      # specify the first device cuda sees.  To find out device-id associated with
376
      # the card(s) on the system run "suricata --list-cuda-cards".
377
      device-id: 0
378
      # No of Cuda streams used for asynchronous processing. All values > 0 are valid.
379
      # For this option you need a device with Compute Capability > 1.0 and
380
      # page-locked enabled to have any effect.
381
      cuda-streams: 2
382

    
383
# Select the multi pattern algorithm you want to run for scan/search the
384
# in the engine. The supported algorithms are b2g, b2gc, b2gm, b3g, wumanber,
385
# ac and ac-gfbs.
386
#
387
# The mpm you choose also decides the distribution of mpm contexts for
388
# signature groups, specified by the conf - "detect-engine.sgh-mpm-context".
389
# Selecting "ac" as the mpm would require "detect-engine.sgh-mpm-context"
390
# to be set to "single", because of ac's memory requirements, unless the
391
# ruleset is small enough to fit in one's memory, in which case one can
392
# use "full" with "ac".  Rest of the mpms can be run in "full" mode.
393
#
394
# There is also a CUDA pattern matcher (only available if Suricata was
395
# compiled with --enable-cuda: b2g_cuda. Make sure to update your
396
# max-pending-packets setting above as well if you use b2g_cuda.
397

    
398
mpm-algo: ac
399

    
400
# The memory settings for hash size of these algorithms can vary from lowest
401
# (2048) - low (4096) - medium (8192) - high (16384) - higher (32768) - max
402
# (65536). The bloomfilter sizes of these algorithms can vary from low (512) -
403
# medium (1024) - high (2048).
404
#
405
# For B2g/B3g algorithms, there is a support for two different scan/search
406
# algorithms. For B2g the scan algorithms are B2gScan & B2gScanBNDMq, and
407
# search algorithms are B2gSearch & B2gSearchBNDMq. For B3g scan algorithms
408
# are B3gScan & B3gScanBNDMq, and search algorithms are B3gSearch &
409
# B3gSearchBNDMq.
410
#
411
# For B2g the different scan/search algorithms and, hash and bloom
412
# filter size settings. For B3g the different scan/search algorithms and, hash
413
# and bloom filter size settings. For wumanber the hash and bloom filter size
414
# settings.
415

    
416
pattern-matcher:
417
  - b2gc:
418
      search-algo: B2gSearchBNDMq
419
      hash-size: low
420
      bf-size: medium
421
  - b2gm:
422
      search-algo: B2gSearchBNDMq
423
      hash-size: low
424
      bf-size: medium
425
  - b2g:
426
      search-algo: B2gSearchBNDMq
427
      hash-size: low
428
      bf-size: medium
429
  - b3g:
430
      search-algo: B3gSearchBNDMq
431
      hash-size: low
432
      bf-size: medium
433
  - wumanber:
434
      hash-size: low
435
      bf-size: medium
436

    
437
# Flow settings:
438
# By default, the reserved memory (memcap) for flows is 32MB. This is the limit
439
# for flow allocation inside the engine. You can change this value to allow
440
# more memory usage for flows.
441
# The hash-size determine the size of the hash used to identify flows inside
442
# the engine, and by default the value is 65536.
443
# At the startup, the engine can preallocate a number of flows, to get a better
444
# performance. The number of flows preallocated is 10000 by default.
445
# emergency-recovery is the percentage of flows that the engine need to
446
# prune before unsetting the emergency state. The emergency state is activated
447
# when the memcap limit is reached, allowing to create new flows, but
448
# prunning them with the emergency timeouts (they are defined below).
449
# If the memcap is reached, the engine will try to prune prune-flows
450
# with the default timeouts. If it doens't find a flow to prune, it will set
451
# the emergency bit and it will try again with more agressive timeouts.
452
# If that doesn't work, then it will try to kill the last time seen flows
453
# not in use.
454
# The memcap can be specified in kb, mb, gb.  Just a number indicates it's
455
# in bytes.
456

    
457
flow:
458
  memcap: 32mb
459
  hash-size: 65536
460
  prealloc: 10000
461
  emergency-recovery: 30
462
  prune-flows: 5
463

    
464
# Specific timeouts for flows. Here you can specify the timeouts that the
465
# active flows will wait to transit from the current state to another, on each
466
# protocol. The value of "new" determine the seconds to wait after a hanshake or
467
# stream startup before the engine free the data of that flow it doesn't
468
# change the state to established (usually if we don't receive more packets
469
# of that flow). The value of "established" is the amount of
470
# seconds that the engine will wait to free the flow if it spend that amount
471
# without receiving new packets or closing the connection. "closed" is the
472
# amount of time to wait after a flow is closed (usually zero).
473
#
474
# There's an emergency mode that will become active under attack circumstances,
475
# making the engine to check flow status faster. This configuration variables
476
# use the prefix "emergency-" and work similar as the normal ones.
477
# Some timeouts doesn't apply to all the protocols, like "closed", for udp and
478
# icmp.
479

    
480
flow-timeouts:
481

    
482
  default:
483
    new: 30
484
    established: 300
485
    closed: 0
486
    emergency-new: 10
487
    emergency-established: 100
488
    emergency-closed: 0
489
  tcp:
490
    new: 60
491
    established: 3600
492
    closed: 120
493
    emergency-new: 10
494
    emergency-established: 300
495
    emergency-closed: 20
496
  udp:
497
    new: 30
498
    established: 300
499
    emergency-new: 10
500
    emergency-established: 100
501
  icmp:
502
    new: 30
503
    established: 300
504
    emergency-new: 10
505
    emergency-established: 100
506

    
507
# Stream engine settings. Here the TCP stream tracking and reaasembly
508
# engine is configured.
509
#
510
# stream:
511
#   memcap: 32mb                # Can be specified in kb, mb, gb.  Just a
512
#                               # number indicates it's in bytes.
513
#   checksum-validation: yes    # To validate the checksum of received
514
#                               # packet. If csum validation is specified as
515
#                               # "yes", then packet with invalid csum will not
516
#                               # be processed by the engine stream/app layer.
517
#                               # Warning: locally generated trafic can be
518
#                               # generated without checksum due to hardware offload
519
#                               # of checksum. You can control the handling of checksum
520
#                                # on a per-interface basis via the 'checksum-checks'
521
#                                # option
522
#   max-sessions: 262144        # 256k concurrent sessions
523
#   prealloc-sessions: 32768    # 32k sessions prealloc'd
524
#   midstream: false            # don't allow midstream session pickups
525
#   async-oneside: false        # don't enable async stream handling
526
#   inline: no                  # stream inline mode
527
#
528
#   reassembly:
529
#     memcap: 64mb              # Can be specified in kb, mb, gb.  Just a number
530
#                               # indicates it's in bytes.
531
#     depth: 1mb                # Can be specified in kb, mb, gb.  Just a number
532
#                               # indicates it's in bytes.
533
#     toserver-chunk-size: 2560 # inspect raw stream in chunks of at least
534
#                               # this size.  Can be specified in kb, mb,
535
#                               # gb.  Just a number indicates it's in bytes.
536
#     toclient-chunk-size: 2560 # inspect raw stream in chunks of at least
537
#                               # this size.  Can be specified in kb, mb,
538
#                               # gb.  Just a number indicates it's in bytes.
539

    
540
stream:
541
  memcap: 32mb
542
  checksum-validation: yes      # reject wrong csums
543
  inline: no                    # no inline mode
544
  reassembly:
545
    memcap: 64mb
546
    depth: 1mb                  # reassemble 1mb into a stream
547
    toserver-chunk-size: 2560
548
    toclient-chunk-size: 2560
549

    
550
# Logging configuration.  This is not about logging IDS alerts, but
551
# IDS output about what its doing, errors, etc.
552
logging:
553

    
554
  # The default log level, can be overridden in an output section.
555
  # Note that debug level logging will only be emitted if Suricata was
556
  # compiled with the --enable-debug configure option.
557
  #
558
  # This value is overriden by the SC_LOG_LEVEL env var.
559
  default-log-level: info
560

    
561
  # The default output format.  Optional parameter, should default to
562
  # something reasonable if not provided.  Can be overriden in an
563
  # output section.  You can leave this out to get the default.
564
  #
565
  # This value is overriden by the SC_LOG_FORMAT env var.
566
  #default-log-format: "[%i] %t - (%f:%l) <%d> (%n) -- "
567

    
568
  # A regex to filter output.  Can be overridden in an output section.
569
  # Defaults to empty (no filter).
570
  #
571
  # This value is overriden by the SC_LOG_OP_FILTER env var.
572
  default-output-filter:
573

    
574
  # Define your logging outputs.  If none are defined, or they are all
575
  # disabled you will get the default - console output.
576
  outputs:
577
  - console:
578
      enabled: yes
579
  - file:
580
      enabled: no
581
      filename: /var/log/suricata.log
582
  - syslog:
583
      enabled: no
584
      facility: local5
585
      format: "[%i] <%d> -- "
586

    
587
# PF_RING configuration. for use with native PF_RING support
588
# for more info see http://www.ntop.org/PF_RING.html
589
pfring:
590
  - interface: eth0
591
    # Number of receive threads (>1 will enable experimental flow pinned
592
    # runmode)
593
    threads: 1
594

    
595
    # Default interface we will listen on.
596
    interface: eth0
597

    
598
    # Default clusterid.  PF_RING will load balance packets based on flow.
599
    # All threads/processes that will participate need to have the same
600
    # clusterid.
601
    cluster-id: 99
602

    
603
    # Default PF_RING cluster type. PF_RING can load balance per flow or per hash.
604
    # This is only supported in versions of PF_RING > 4.1.1.
605
    cluster-type: cluster_round_robin
606
    # bpf filter for this interface
607
    #bpf-filter: tcp
608
    # Choose checksum verification mode for the interface. At the moment
609
    # of the capture, some packets may be with an invalid checksum due to
610
    # offloading to the network card of the checksum computation.
611
    # Possible values are:
612
    #  - rxonly: only compute checksum for packets received by network card.
613
    #  - yes: checksum validation is forced
614
    #  - no: checksum validation is disabled
615
    #  - auto: suricata uses a statistical approach to detect when
616
    #  checksum off-loading is used. (default)
617
    # Warning: 'checksum-validation' must be set to yes to have any validation
618
    #checksum-checks: auto
619
  # Second interface
620
  #- interface: eth1
621
  #  threads: 3
622
  #  cluster-id: 93
623
  #  cluster-type: cluster_flow
624

    
625
pcap:
626
  - interface: eth0
627
    #buffer-size: 32768
628
    #bpf-filter: "tcp and port 25"
629
    # Choose checksum verification mode for the interface. At the moment
630
    # of the capture, some packets may be with an invalid checksum due to
631
    # offloading to the network card of the checksum computation.
632
    # Possible values are:
633
    #  - yes: checksum validation is forced
634
    #  - no: checksum validation is disabled
635
    #  - auto: suricata uses a statistical approach to detect when
636
    #  checksum off-loading is used. (default)
637
    # Warning: 'checksum-validation' must be set to yes to have any validation
638
    #checksum-checks: auto
639

    
640
# For FreeBSD ipfw(8) divert(4) support.
641
# Please make sure you have ipfw_load="YES" and ipdivert_load="YES"
642
# in /etc/loader.conf or kldload'ing the appropriate kernel modules.
643
# Additionally, you need to have an ipfw rule for the engine to see
644
# the packets from ipfw.  For Example:
645
#
646
#   ipfw add 100 divert 8000 ip from any to any
647
#
648
# The 8000 above should be the same number you passed on the command
649
# line, i.e. -d 8000
650
#
651
ipfw:
652

    
653
  # Reinject packets at the specified ipfw rule number.  This config
654
  # option is the ipfw rule number AT WHICH rule processing continues
655
  # in the ipfw processing system after the engine has finished
656
  # inspecting the packet for acceptance.  If no rule number is specified,
657
  # accepted packets are reinjected at the divert rule which they entered
658
  # and IPFW rule processing continues.  No check is done to verify
659
  # this will rule makes sense so care must be taken to avoid loops in ipfw.
660
  #
661
  ## The following example tells the engine to reinject packets
662
  # back into the ipfw firewall AT rule number 5500:
663
  #
664
  # ipfw-reinjection-rule-number: 5500
665

    
666
# Set the default rule path here to search for the files.
667
# if not set, it will look at the current working dir
668
default-rule-path: /usr/local/etc/suricata/rules
669
rule-files:
670
 - http-events.rules
671
et-rule-files:
672
 - botcc.rules
673
 - ciarmy.rules
674
 - compromised.rules
675
 - drop.rules
676
 - dshield.rules
677
 - emerging-activex.rules
678
 - emerging-attack_response.rules
679
 - emerging-chat.rules
680
 - emerging-current_events.rules
681
 - emerging-dns.rules
682
 - emerging-dos.rules
683
 - emerging-exploit.rules
684
 - emerging-ftp.rules
685
 - emerging-games.rules
686
 - emerging-icmp_info.rules
687
 - emerging-icmp.rules
688
 - emerging-imap.rules
689
 - emerging-inappropriate.rules
690
 - emerging-malware.rules
691
 - emerging-misc.rules
692
 - emerging-mobile_malware.rules
693
 - emerging-netbios.rules
694
 - emerging-p2p.rules
695
 - emerging-policy.rules
696
 - emerging-pop3.rules
697
 - emerging-rpc.rules
698
 - emerging-scada.rules
699
 - emerging-scan.rules
700
 - emerging-shellcode.rules
701
 - emerging-smtp.rules
702
 - emerging-snmp.rules
703
 - emerging-sql.rules
704
 - emerging-telnet.rules
705
 - emerging-tftp.rules
706
 - emerging-trojan.rules
707
 - emerging-user_agents.rules
708
 - emerging-virus.rules
709
 - emerging-voip.rules
710
 - emerging-web_client.rules
711
 - emerging-web_server.rules
712
 - emerging-web_specific_apps.rules
713
 - emerging-worm.rules
714
 - rbn-malvertisers.rules
715
 - rbn.rules
716
 - tor.rules
717
 - decoder-events.rules # available in suricata sources under rules dir
718
 - stream-events.rules  # available in suricata sources under rules dir
719
 - http-events.rules    # available in suricata sources under rules dir
720
 - smtp-events.rules    # available in suricata sources under rules dir
721

    
722
classification-file: /usr/local/etc/suricata/classification.config
723
reference-config-file: /usr/local/etc/suricata/reference.config
724

    
725
# Holds variables that would be used by the engine.
726
vars:
727

    
728
  # Holds the address group vars that would be passed in a Signature.
729
  # These would be retrieved during the Signature address parsing stage.
730
  address-groups:
731

    
732
    HOME_NET: "[192.168.0.0/16,10.0.0.0/8,172.16.0.0/12]"
733

    
734
    EXTERNAL_NET: "!$HOME_NET"
735

    
736
    HTTP_SERVERS: "$HOME_NET"
737

    
738
    SMTP_SERVERS: "$HOME_NET"
739

    
740
    SQL_SERVERS: "$HOME_NET"
741

    
742
    DNS_SERVERS: "$HOME_NET"
743

    
744
    TELNET_SERVERS: "$HOME_NET"
745

    
746
    AIM_SERVERS: "$EXTERNAL_NET"
747

    
748
  # Holds the port group vars that would be passed in a Signature.
749
  # These would be retrieved during the Signature port parsing stage.
750
  port-groups:
751

    
752
    HTTP_PORTS: "80"
753

    
754
    SHELLCODE_PORTS: "!80"
755

    
756
    ORACLE_PORTS: 1521
757

    
758
    SSH_PORTS: 22
759

    
760
# Host specific policies for defragmentation and TCP stream
761
# reassembly.  The host OS lookup is done using a radix tree, just
762
# like a routing table so the most specific entry matches.
763
host-os-policy:
764
  # Make the default policy windows.
765
  windows: [0.0.0.0/0]
766
  bsd: []
767
  bsd-right: []
768
  old-linux: []
769
  linux: [10.0.0.0/8, 192.168.1.100, "8762:2352:6241:7245:E000:0000:0000:0000"]
770
  old-solaris: []
771
  solaris: ["::1"]
772
  hpux10: []
773
  hpux11: []
774
  irix: []
775
  macos: []
776
  vista: []
777
  windows2k3: []
778

    
779

    
780
# Limit for the maximum number of asn1 frames to decode (default 256)
781
asn1-max-frames: 256
782

    
783
###########################################################################
784
# Configure libhtp.
785
#
786
#
787
# default-config:       Used when no server-config matches
788
#   personality:        List of personalities used by default
789
#   request-body-limit: Limit reassembly of request body for inspection
790
#                       by http_client_body & pcre /P option.
791
#
792
# server-config:        List of server configurations to use if address matches
793
#   address:            List of ip addresses or networks for this block
794
#   personalitiy:       List of personalities used by this block
795
#   request-body-limit: Limit reassembly of request body for inspection
796
#                       by http_client_body & pcre /P option.
797
#
798
# Currently Available Personalities:
799
#   Minimal
800
#   Generic
801
#   IDS (default)
802
#   IIS_4_0
803
#   IIS_5_0
804
#   IIS_5_1
805
#   IIS_6_0
806
#   IIS_7_0
807
#   IIS_7_5
808
#   Apache
809
#   Apache_2_2
810
###########################################################################
811
libhtp:
812

    
813
   default-config:
814
     personality: IDS
815
     # Can be specified in kb, mb, gb.  Just a number indicates
816
     # it's in bytes.
817
     request-body-limit: 3072
818
     response-body-limit: 3072
819

    
820
   server-config:
821

    
822
     - apache:
823
         address: [192.168.1.0/24, 127.0.0.0/8, "::1"]
824
         personality: Apache_2_2
825
         # Can be specified in kb, mb, gb.  Just a number indicates
826
         # it's in bytes.
827
         request-body-limit: 4096
828
         response-body-limit: 4096
829

    
830
     - iis7:
831
         address:
832
           - 192.168.0.0/24
833
           - 192.168.10.0/24
834
         personality: IIS_7_0
835
         # Can be specified in kb, mb, gb.  Just a number indicates
836
         # it's in bytes.
837
         request-body-limit: 4096
838
         response-body-limit: 4096
839

    
840
# Profiling settings. Only effective if Suricata has been built with the
841
# the --enable-profiling configure flag.
842
#
843
profiling:
844

    
845
  # rule profiling
846
  rules:
847

    
848
    # Profiling can be disabled here, but it will still have a
849
    # performance impact if compiled in.
850
    enabled: yes
851
    filename: rule_perf.log
852
    append: yes
853

    
854
    # Sort options: ticks, avgticks, checks, matches, maxticks
855
    sort: avgticks
856

    
857
    # Limit the number of items printed at exit.
858
    limit: 100
859

    
860
  # packet profiling
861
  packets:
862

    
863
    # Profiling can be disabled here, but it will still have a
864
    # performance impact if compiled in.
865
    enabled: yes
866
    filename: packet_stats.log
867
    append: yes
868

    
869
    # per packet csv output
870
    csv:
871

    
872
      # Output can be disabled here, but it will still have a
873
      # performance impact if compiled in.
874
      enabled: no
875
      filename: packet_stats.csv
876

    
877
# Suricata core dump configuration. Limits the size of the core dump file to
878
# approximately max-dump. The actual core dump size will be a multiple of the
879
# page size. Core dumps that would be larger than max-dump are truncated. On
880
# Linux, the actual core dump size may be a few pages larger than max-dump.
881
# Setting max-dump to 0 disables core dumping.
882
# Setting max-dump to 'unlimited' will give the full core dump file.
883
# On 32-bit Linux, a max-dump value >= ULONG_MAX may cause the core dump size
884
# to be 'unlimited'.
885

    
886
coredump:
887
  max-dump: unlimited