· 9 years ago · Apr 03, 2017, 11:00 AM
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## Step 1: inform Suricata about your network
10##
11
12vars:
13 # more specifc is better for alert accuracy and performance
14 address-groups:
15 HOME_NET: "[192.168.93.100/27]"
16 #HOME_NET: "[192.168.0.0/16]"
17 #HOME_NET: "[10.0.0.0/8]"
18 #HOME_NET: "[172.16.0.0/12]"
19 #HOME_NET: "any"
20
21 EXTERNAL_NET: "!$HOME_NET"
22 #EXTERNAL_NET: "any"
23
24 HTTP_SERVERS: "$HOME_NET"
25 SMTP_SERVERS: "$HOME_NET"
26 SQL_SERVERS: "$HOME_NET"
27 DNS_SERVERS: "$HOME_NET"
28 TELNET_SERVERS: "$HOME_NET"
29 AIM_SERVERS: "$EXTERNAL_NET"
30 DNP3_SERVER: "$HOME_NET"
31 DNP3_CLIENT: "$HOME_NET"
32 MODBUS_CLIENT: "$HOME_NET"
33 MODBUS_SERVER: "$HOME_NET"
34 ENIP_CLIENT: "$HOME_NET"
35 ENIP_SERVER: "$HOME_NET"
36
37 port-groups:
38 HTTP_PORTS: "80"
39 SHELLCODE_PORTS: "!80"
40 ORACLE_PORTS: 1521
41 SSH_PORTS: 22
42 DNP3_PORTS: 20000
43 MODBUS_PORTS: 502
44
45
46##
47## Step 2: select the rules to enable or disable
48##
49
50default-rule-path: /etc/nsm/rules/
51rule-files:
52# - local.rules
53 - downloaded.rules
54
55classification-file: /etc/nsm/securityonion-virtualbox-eth1/classification.config
56reference-config-file: /etc/nsm/securityonion-virtualbox-eth1/reference.config
57threshold-file: /etc/nsm/securityonion-virtualbox-eth1/threshold.conf
58
59
60##
61## Step 3: select outputs to enable
62##
63
64# The default logging directory. Any log or output file will be
65# placed here if its not specified with a full path name. This can be
66# overridden with the -l command line parameter.
67default-log-dir: /var/log/nsm/
68
69# global stats configuration
70stats:
71 enabled: yes
72 # The interval field (in seconds) controls at what interval
73 # the loggers are invoked.
74 interval: 8
75
76# Configure the type of alert (and other) logging you would like.
77outputs:
78 # a line based alerts log similar to Snort's fast.log
79 - fast:
80 enabled: no
81 filename: fast.log
82 append: yes
83 #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
84
85 # Extensible Event Format (nicknamed EVE) event log in JSON format
86 - eve-log:
87 enabled: no
88 filetype: regular #regular|syslog|unix_dgram|unix_stream|redis
89 filename: eve.json
90 #prefix: "@cee: " # prefix to prepend to each log entry
91 # the following are valid when type: syslog above
92 #identity: "suricata"
93 #facility: local5
94 #level: Info ## possible levels: Emergency, Alert, Critical,
95 ## Error, Warning, Notice, Info, Debug
96 #redis:
97 # server: 127.0.0.1
98 # port: 6379
99 # mode: list ## possible values: list (default), channel
100 # key: suricata ## key or channel to use (default to suricata)
101 # Redis pipelining set up. This will enable to only do a query every
102 # 'batch-size' events. This should lower the latency induced by network
103 # connection at the cost of some memory. There is no flushing implemented
104 # so this setting as to be reserved to high traffic suricata.
105 # pipelining:
106 # enabled: yes ## set enable to yes to enable query pipelining
107 # batch-size: 10 ## number of entry to keep in buffer
108 types:
109 - alert:
110 # payload: yes # enable dumping payload in Base64
111 # payload-buffer-size: 4kb # max size of payload buffer to output in eve-log
112 # payload-printable: yes # enable dumping payload in printable (lossy) format
113 # packet: yes # enable dumping of packet (without stream segments)
114 http: yes # enable dumping of http fields
115 tls: yes # enable dumping of tls fields
116 ssh: yes # enable dumping of ssh fields
117 smtp: yes # enable dumping of smtp fields
118 dnp3: yes # enable dumping of DNP3 fields
119
120 # Enable the logging of tagged packets for rules using the
121 # "tag" keyword.
122 tagged-packets: yes
123
124 # HTTP X-Forwarded-For support by adding an extra field or overwriting
125 # the source or destination IP address (depending on flow direction)
126 # with the one reported in the X-Forwarded-For HTTP header. This is
127 # helpful when reviewing alerts for traffic that is being reverse
128 # or forward proxied.
129 xff:
130 enabled: no
131 # Two operation modes are available, "extra-data" and "overwrite".
132 mode: extra-data
133 # Two proxy deployments are supported, "reverse" and "forward". In
134 # a "reverse" deployment the IP address used is the last one, in a
135 # "forward" deployment the first IP address is used.
136 deployment: reverse
137 # Header name where the actual IP address will be reported, if more
138 # than one IP address is present, the last IP address will be the
139 # one taken into consideration.
140 header: X-Forwarded-For
141 - http:
142 extended: yes # enable this for extended logging information
143 # custom allows additional http fields to be included in eve-log
144 # the example below adds three additional fields when uncommented
145 #custom: [Accept-Encoding, Accept-Language, Authorization]
146 - dns:
147 # control logging of queries and answers
148 # default yes, no to disable
149 query: yes # enable logging of DNS queries
150 answer: yes # enable logging of DNS answers
151 # control which RR types are logged
152 # all enabled if custom not specified
153 #custom: [a, aaaa, cname, mx, ns, ptr, txt]
154 - tls:
155 extended: yes # enable this for extended logging information
156 - files:
157 force-magic: no # force logging magic on all logged files
158 # force logging of checksums, available hash functions are md5,
159 # sha1 and sha256
160 #force-hash: [md5]
161 #- drop:
162 # alerts: yes # log alerts that caused drops
163 # flows: all # start or all: 'start' logs only a single drop
164 # # per flow direction. All logs each dropped pkt.
165 - smtp:
166 #extended: yes # enable this for extended logging information
167 # this includes: bcc, message-id, subject, x_mailer, user-agent
168 # custom fields logging from the list:
169 # reply-to, bcc, message-id, subject, x-mailer, user-agent, received,
170 # x-originating-ip, in-reply-to, references, importance, priority,
171 # sensitivity, organization, content-md5, date
172 #custom: [received, x-mailer, x-originating-ip, relays, reply-to, bcc]
173 # output md5 of fields: body, subject
174 # for the body you need to set app-layer.protocols.smtp.mime.body-md5
175 # to yes
176 #md5: [body, subject]
177
178 - ssh
179 - stats:
180 totals: yes # stats for all threads merged together
181 threads: 1
182 deltas: no # include delta values
183 # bi-directional flows
184 - flow
185 # uni-directional flows
186 #- netflow
187 #- dnp3
188
189 # alert output for use with Barnyard2
190 - unified2-alert:
191 enabled: yes
192 filename: snort.unified2
193
194 # File size limit. Can be specified in kb, mb, gb. Just a number
195 # is parsed as bytes.
196 #limit: 32mb
197
198 # Sensor ID field of unified2 alerts.
199 #sensor-id: 0
200
201 # Include payload of packets related to alerts. Defaults to true, set to
202 # false if payload is not required.
203 #payload: yes
204
205 # HTTP X-Forwarded-For support by adding the unified2 extra header or
206 # overwriting the source or destination IP address (depending on flow
207 # direction) with the one reported in the X-Forwarded-For HTTP header.
208 # This is helpful when reviewing alerts for traffic that is being reverse
209 # or forward proxied.
210 xff:
211 enabled: no
212 # Two operation modes are available, "extra-data" and "overwrite". Note
213 # that in the "overwrite" mode, if the reported IP address in the HTTP
214 # X-Forwarded-For header is of a different version of the packet
215 # received, it will fall-back to "extra-data" mode.
216 mode: extra-data
217 # Two proxy deployments are supported, "reverse" and "forward". In
218 # a "reverse" deployment the IP address used is the last one, in a
219 # "forward" deployment the first IP address is used.
220 deployment: reverse
221 # Header name where the actual IP address will be reported, if more
222 # than one IP address is present, the last IP address will be the
223 # one taken into consideration.
224 header: X-Forwarded-For
225
226 # a line based log of HTTP requests (no alerts)
227 - http-log:
228 enabled: no
229 filename: http.log
230 append: yes
231 #extended: yes # enable this for extended logging information
232 #custom: yes # enabled the custom logging format (defined by customformat)
233 #customformat: "%{%D-%H:%M:%S}t.%z %{X-Forwarded-For}i %H %m %h %u %s %B %a:%p -> %A:%P"
234 #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
235
236 # a line based log of TLS handshake parameters (no alerts)
237 - tls-log:
238 enabled: no # Log TLS connections.
239 filename: tls.log # File to store TLS logs.
240 append: yes
241 #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
242 #extended: yes # Log extended information like fingerprint
243
244 # output module to store certificates chain to disk
245 - tls-store:
246 enabled: no
247 #certs-log-dir: certs # directory to store the certificates files
248
249 # a line based log of DNS requests and/or replies (no alerts)
250 - dns-log:
251 enabled: no
252 filename: dns.log
253 append: yes
254 #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
255
256 # Packet log... log packets in pcap format. 3 modes of operation: "normal"
257 # "multi" and "sguil".
258 #
259 # In normal mode a pcap file "filename" is created in the default-log-dir,
260 # or are as specified by "dir".
261 # In multi mode, a file is created per thread. This will perform much
262 # better, but will create multiple files where 'normal' would create one.
263 # In multi mode the filename takes a few special variables:
264 # - %n -- thread number
265 # - %i -- thread id
266 # - %t -- timestamp (secs or secs.usecs based on 'ts-format'
267 # E.g. filename: pcap.%n.%t
268 #
269 # Note that it's possible to use directories, but the directories are not
270 # created by Suricata. E.g. filename: pcaps/%n/log.%s will log into the
271 # per thread directory.
272 #
273 # Also note that the limit and max-files settings are enforced per thread.
274 # So the size limit when using 8 threads with 1000mb files and 2000 files
275 # is: 8*1000*2000 ~ 16TiB.
276 #
277 # In Sguil mode "dir" indicates the base directory. In this base dir the
278 # pcaps are created in th directory structure Sguil expects:
279 #
280 # $sguil-base-dir/YYYY-MM-DD/$filename.<timestamp>
281 #
282 # By default all packets are logged except:
283 # - TCP streams beyond stream.reassembly.depth
284 # - encrypted streams after the key exchange
285 #
286 - pcap-log:
287 enabled: no
288 filename: log.pcap
289
290 # File size limit. Can be specified in kb, mb, gb. Just a number
291 # is parsed as bytes.
292 limit: 1000mb
293
294 # If set to a value will enable ring buffer mode. Will keep Maximum of "max-files" of size "limit"
295 max-files: 2000
296
297 mode: normal # normal, multi or sguil.
298
299 # Directory to place pcap files. If not provided the default log
300 # directory will be used. Required for "sguil" mode.
301 #dir: /nsm_data/
302
303 #ts-format: usec # sec or usec second format (default) is filename.sec usec is filename.sec.usec
304 use-stream-depth: no #If set to "yes" packets seen after reaching stream inspection depth are ignored. "no" logs all packets
305 honor-pass-rules: no # If set to "yes", flows in which a pass rule matched will stopped being logged.
306
307 # a full alerts log containing much information for signature writers
308 # or for investigating suspected false positives.
309 - alert-debug:
310 enabled: no
311 filename: alert-debug.log
312 append: yes
313 #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
314
315 # alert output to prelude (http://www.prelude-technologies.com/) only
316 # available if Suricata has been compiled with --enable-prelude
317 - alert-prelude:
318 enabled: no
319 profile: suricata
320 log-packet-content: no
321 log-packet-header: yes
322
323 # Stats.log contains data from various counters of the suricata engine.
324 - stats:
325 enabled: yes
326 filename: stats.log
327 totals: yes # stats for all threads merged together
328 threads: 1
329 #null-values: yes # print counters that have value 0
330
331 # a line based alerts log similar to fast.log into syslog
332 - syslog:
333 enabled: no
334 # reported identity to syslog. If ommited the program name (usually
335 # suricata) will be used.
336 #identity: "suricata"
337 facility: local5
338 #level: Info ## possible levels: Emergency, Alert, Critical,
339 ## Error, Warning, Notice, Info, Debug
340
341 # a line based information for dropped packets in IPS mode
342 - drop:
343 enabled: no
344 filename: drop.log
345 append: yes
346 #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
347
348 # output module to store extracted files to disk
349 #
350 # The files are stored to the log-dir in a format "file.<id>" where <id> is
351 # an incrementing number starting at 1. For each file "file.<id>" a meta
352 # file "file.<id>.meta" is created.
353 #
354 # File extraction depends on a lot of things to be fully done:
355 # - file-store stream-depth. For optimal results, set this to 0 (unlimited)
356 # - http request / response body sizes. Again set to 0 for optimal results.
357 # - rules that contain the "filestore" keyword.
358 - file-store:
359 enabled: no # set to yes to enable
360 log-dir: files # directory to store the files
361 force-magic: no # force logging magic on all stored files
362 # force logging of checksums, available hash functions are md5,
363 # sha1 and sha256
364 #force-hash: [md5]
365 force-filestore: no # force storing of all files
366 # override global stream-depth for sessions in which we want to
367 # perform file extraction. Set to 0 for unlimited.
368 #stream-depth: 0
369 #waldo: file.waldo # waldo file to store the file_id across runs
370
371 # output module to log files tracked in a easily parsable json format
372 - file-log:
373 enabled: no
374 filename: files-json.log
375 append: yes
376 #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
377
378 force-magic: no # force logging magic on all logged files
379 # force logging of checksums, available hash functions are md5,
380 # sha1 and sha256
381 #force-hash: [md5]
382
383 # Log TCP data after stream normalization
384 # 2 types: file or dir. File logs into a single logfile. Dir creates
385 # 2 files per TCP session and stores the raw TCP data into them.
386 # Using 'both' will enable both file and dir modes.
387 #
388 # Note: limited by stream.depth
389 - tcp-data:
390 enabled: no
391 type: file
392 filename: tcp-data.log
393
394 # Log HTTP body data after normalization, dechunking and unzipping.
395 # 2 types: file or dir. File logs into a single logfile. Dir creates
396 # 2 files per HTTP session and stores the normalized data into them.
397 # Using 'both' will enable both file and dir modes.
398 #
399 # Note: limited by the body limit settings
400 - http-body-data:
401 enabled: no
402 type: file
403 filename: http-data.log
404
405 # Lua Output Support - execute lua script to generate alert and event
406 # output.
407 # Documented at:
408 # https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Lua_Output
409 - lua:
410 enabled: no
411 #scripts-dir: /etc/suricata/lua-output/
412 scripts:
413 # - script1.lua
414
415# Logging configuration. This is not about logging IDS alerts/events, but
416# output about what Suricata is doing, like startup messages, errors, etc.
417logging:
418 # The default log level, can be overridden in an output section.
419 # Note that debug level logging will only be emitted if Suricata was
420 # compiled with the --enable-debug configure option.
421 #
422 # This value is overriden by the SC_LOG_LEVEL env var.
423 default-log-level: notice
424
425 # The default output format. Optional parameter, should default to
426 # something reasonable if not provided. Can be overriden in an
427 # output section. You can leave this out to get the default.
428 #
429 # This value is overriden by the SC_LOG_FORMAT env var.
430 #default-log-format: "[%i] %t - (%f:%l) <%d> (%n) -- "
431
432 # A regex to filter output. Can be overridden in an output section.
433 # Defaults to empty (no filter).
434 #
435 # This value is overriden by the SC_LOG_OP_FILTER env var.
436 default-output-filter:
437
438 # Define your logging outputs. If none are defined, or they are all
439 # disabled you will get the default - console output.
440 outputs:
441 - console:
442 enabled: yes
443 # type: json
444 - file:
445 enabled: no
446 level: info
447 filename: /var/log/nsm/suricata.log
448 # type: json
449 - syslog:
450 enabled: no
451 facility: local5
452 format: "[%i] <%d> -- "
453 # type: json
454
455
456##
457## Step 4: configure common capture settings
458##
459## See "Advanced Capture Options" below for more options, including NETMAP
460## and PF_RING.
461##
462
463# Linux high speed capture support
464af-packet:
465 - interface: eth1
466 # Number of receive threads. "auto" uses the number of cores
467 #threads: auto
468 # Default clusterid. AF_PACKET will load balance packets based on flow.
469 cluster-id: 52
470 # Default AF_PACKET cluster type. AF_PACKET can load balance per flow or per hash.
471 # This is only supported for Linux kernel > 3.1
472 # possible value are:
473 # * cluster_round_robin: round robin load balancing
474 # * cluster_flow: all packets of a given flow are send to the same socket
475 # * cluster_cpu: all packets treated in kernel by a CPU are send to the same socket
476 # * cluster_qm: all packets linked by network card to a RSS queue are sent to the same
477 # socket. Requires at least Linux 3.14.
478 # * cluster_random: packets are sent randomly to sockets but with an equipartition.
479 # Requires at least Linux 3.14.
480 # * cluster_rollover: kernel rotates between sockets filling each socket before moving
481 # to the next. Requires at least Linux 3.10.
482 # Recommended modes are cluster_flow on most boxes and cluster_cpu or cluster_qm on system
483 # with capture card using RSS (require cpu affinity tuning and system irq tuning)
484 cluster-type: cluster_flow
485 # In some fragmentation case, the hash can not be computed. If "defrag" is set
486 # to yes, the kernel will do the needed defragmentation before sending the packets.
487 defrag: yes
488 # After Linux kernel 3.10 it is possible to activate the rollover option: if a socket is
489 # full then kernel will send the packet on the next socket with room available. This option
490 # can minimize packet drop and increase the treated bandwidth on single intensive flow.
491 #rollover: yes
492 # To use the ring feature of AF_PACKET, set 'use-mmap' to yes
493 #use-mmap: yes
494 # Lock memory map to avoid it goes to swap. Be careful that over suscribing could lock
495 # your system
496 #mmap-locked: yes
497 # Use experimental tpacket_v3 capture mode, only active if use-mmap is true
498 #tpacket-v3: yes
499 # Ring size will be computed with respect to max_pending_packets and number
500 # of threads. You can set manually the ring size in number of packets by setting
501 # the following value. If you are using flow cluster-type and have really network
502 # intensive single-flow you could want to set the ring-size independently of the number
503 # of threads:
504 #ring-size: 2048
505 # Block size is used by tpacket_v3 only. It should set to a value high enough to contain
506 # a decent number of packets. Size is in bytes so please consider your MTU. It should be
507 # a power of 2 and it must be multiple of page size (usually 4096).
508 #block-size: 32768
509 # tpacket_v3 block timeout: an open block is passed to userspace if it is not
510 # filled after block-timeout milliseconds.
511 #block-timeout: 10
512 # On busy system, this could help to set it to yes to recover from a packet drop
513 # phase. This will result in some packets (at max a ring flush) being non treated.
514 #use-emergency-flush: yes
515 # recv buffer size, increase value could improve performance
516 # buffer-size: 32768
517 # Set to yes to disable promiscuous mode
518 # disable-promisc: no
519 # Choose checksum verification mode for the interface. At the moment
520 # of the capture, some packets may be with an invalid checksum due to
521 # offloading to the network card of the checksum computation.
522 # Possible values are:
523 # - kernel: use indication sent by kernel for each packet (default)
524 # - yes: checksum validation is forced
525 # - no: checksum validation is disabled
526 # - auto: suricata uses a statistical approach to detect when
527 # checksum off-loading is used.
528 # Warning: 'checksum-validation' must be set to yes to have any validation
529 #checksum-checks: kernel
530 # BPF filter to apply to this interface. The pcap filter syntax apply here.
531 #bpf-filter: port 80 or udp
532 # You can use the following variables to activate AF_PACKET tap or IPS mode.
533 # If copy-mode is set to ips or tap, the traffic coming to the current
534 # interface will be copied to the copy-iface interface. If 'tap' is set, the
535 # copy is complete. If 'ips' is set, the packet matching a 'drop' action
536 # will not be copied.
537 #copy-mode: ips
538 #copy-iface: eth1
539
540 # Put default values here. These will be used for an interface that is not
541 # in the list above.
542 - interface: default
543 #threads: auto
544 #use-mmap: no
545 #rollover: yes
546 #tpacket-v3: yes
547
548# Cross platform libpcap capture support
549pcap:
550 - interface: eth1
551 # On Linux, pcap will try to use mmaped capture and will use buffer-size
552 # as total of memory used by the ring. So set this to something bigger
553 # than 1% of your bandwidth.
554 #buffer-size: 16777216
555 #bpf-filter: "tcp and port 25"
556 # Choose checksum verification mode for the interface. At the moment
557 # of the capture, some packets may be with an invalid checksum due to
558 # offloading to the network card of the checksum computation.
559 # Possible values are:
560 # - yes: checksum validation is forced
561 # - no: checksum validation is disabled
562 # - auto: suricata uses a statistical approach to detect when
563 # checksum off-loading is used. (default)
564 # Warning: 'checksum-validation' must be set to yes to have any validation
565 #checksum-checks: auto
566 # With some accelerator cards using a modified libpcap (like myricom), you
567 # may want to have the same number of capture threads as the number of capture
568 # rings. In this case, set up the threads variable to N to start N threads
569 # listening on the same interface.
570 #threads: 16
571 # set to no to disable promiscuous mode:
572 #promisc: no
573 # set snaplen, if not set it defaults to MTU if MTU can be known
574 # via ioctl call and to full capture if not.
575 #snaplen: 1518
576 # Put default values here
577 - interface: default
578 #checksum-checks: auto
579
580# Settings for reading pcap files
581pcap-file:
582 # Possible values are:
583 # - yes: checksum validation is forced
584 # - no: checksum validation is disabled
585 # - auto: suricata uses a statistical approach to detect when
586 # checksum off-loading is used. (default)
587 # Warning: 'checksum-validation' must be set to yes to have checksum tested
588 checksum-checks: auto
589
590# See "Advanced Capture Options" below for more options, including NETMAP
591# and PF_RING.
592
593
594##
595## Step 5: App Layer Protocol Configuration
596##
597
598# Configure the app-layer parsers. The protocols section details each
599# protocol.
600#
601# The option "enabled" takes 3 values - "yes", "no", "detection-only".
602# "yes" enables both detection and the parser, "no" disables both, and
603# "detection-only" enables protocol detection only (parser disabled).
604app-layer:
605 protocols:
606 tls:
607 enabled: yes
608 detection-ports:
609 dp: 443
610
611 # Completely stop processing TLS/SSL session after the handshake
612 # completed. If bypass is enabled this will also trigger flow
613 # bypass. If disabled (the default), TLS/SSL session is still
614 # tracked for Heartbleed and other anomalies.
615 #no-reassemble: yes
616 dcerpc:
617 enabled: yes
618 ftp:
619 enabled: yes
620 ssh:
621 enabled: yes
622 smtp:
623 enabled: yes
624 # Configure SMTP-MIME Decoder
625 mime:
626 # Decode MIME messages from SMTP transactions
627 # (may be resource intensive)
628 # This field supercedes all others because it turns the entire
629 # process on or off
630 decode-mime: yes
631
632 # Decode MIME entity bodies (ie. base64, quoted-printable, etc.)
633 decode-base64: yes
634 decode-quoted-printable: yes
635
636 # Maximum bytes per header data value stored in the data structure
637 # (default is 2000)
638 header-value-depth: 2000
639
640 # Extract URLs and save in state data structure
641 extract-urls: yes
642 # Set to yes to compute the md5 of the mail body. You will then
643 # be able to journalize it.
644 body-md5: no
645 # Configure inspected-tracker for file_data keyword
646 inspected-tracker:
647 content-limit: 100000
648 content-inspect-min-size: 32768
649 content-inspect-window: 4096
650 imap:
651 enabled: detection-only
652 msn:
653 enabled: detection-only
654 smb:
655 enabled: yes
656 detection-ports:
657 dp: 139, 445
658 # smb2 detection is disabled internally inside the engine.
659 #smb2:
660 # enabled: yes
661 dns:
662 # memcaps. Globally and per flow/state.
663 #global-memcap: 16mb
664 #state-memcap: 512kb
665
666 # How many unreplied DNS requests are considered a flood.
667 # If the limit is reached, app-layer-event:dns.flooded; will match.
668 #request-flood: 500
669
670 tcp:
671 enabled: yes
672 detection-ports:
673 dp: 53
674 udp:
675 enabled: yes
676 detection-ports:
677 dp: 53
678 http:
679 enabled: yes
680 # memcap: 64mb
681
682 # default-config: Used when no server-config matches
683 # personality: List of personalities used by default
684 # request-body-limit: Limit reassembly of request body for inspection
685 # by http_client_body & pcre /P option.
686 # response-body-limit: Limit reassembly of response body for inspection
687 # by file_data, http_server_body & pcre /Q option.
688 # double-decode-path: Double decode path section of the URI
689 # double-decode-query: Double decode query section of the URI
690 # response-body-decompress-layer-limit:
691 # Limit to how many layers of compression will be
692 # decompressed. Defaults to 2.
693 #
694 # server-config: List of server configurations to use if address matches
695 # address: List of ip addresses or networks for this block
696 # personalitiy: List of personalities used by this block
697 # request-body-limit: Limit reassembly of request body for inspection
698 # by http_client_body & pcre /P option.
699 # response-body-limit: Limit reassembly of response body for inspection
700 # by file_data, http_server_body & pcre /Q option.
701 # double-decode-path: Double decode path section of the URI
702 # double-decode-query: Double decode query section of the URI
703 #
704 # uri-include-all: Include all parts of the URI. By default the
705 # 'scheme', username/password, hostname and port
706 # are excluded. Setting this option to true adds
707 # all of them to the normalized uri as inspected
708 # by http_uri, urilen, pcre with /U and the other
709 # keywords that inspect the normalized uri.
710 # Note that this does not affect http_raw_uri.
711 # Also, note that including all was the default in
712 # 1.4 and 2.0beta1.
713 #
714 # meta-field-limit: Hard size limit for request and response size
715 # limits. Applies to request line and headers,
716 # response line and headers. Does not apply to
717 # request or response bodies. Default is 18k.
718 # If this limit is reached an event is raised.
719 #
720 # Currently Available Personalities:
721 # Minimal, Generic, IDS (default), IIS_4_0, IIS_5_0, IIS_5_1, IIS_6_0,
722 # IIS_7_0, IIS_7_5, Apache_2
723 libhtp:
724 default-config:
725 personality: IDS
726
727 # Can be specified in kb, mb, gb. Just a number indicates
728 # it's in bytes.
729 request-body-limit: 100kb
730 response-body-limit: 100kb
731
732 # inspection limits
733 request-body-minimal-inspect-size: 32kb
734 request-body-inspect-window: 4kb
735 response-body-minimal-inspect-size: 40kb
736 response-body-inspect-window: 16kb
737
738 # response body decompression (0 disables)
739 response-body-decompress-layer-limit: 2
740
741 # auto will use http-body-inline mode in IPS mode, yes or no set it statically
742 http-body-inline: auto
743
744 # Take a random value for inspection sizes around the specified value.
745 # This lower the risk of some evasion technics but could lead
746 # detection change between runs. It is set to 'yes' by default.
747 #randomize-inspection-sizes: yes
748 # If randomize-inspection-sizes is active, the value of various
749 # inspection size will be choosen in the [1 - range%, 1 + range%]
750 # range
751 # Default value of randomize-inspection-range is 10.
752 #randomize-inspection-range: 10
753
754 # decoding
755 double-decode-path: no
756 double-decode-query: no
757
758 server-config:
759
760 #- apache:
761 # address: [192.168.1.0/24, 127.0.0.0/8, "::1"]
762 # personality: Apache_2
763 # # Can be specified in kb, mb, gb. Just a number indicates
764 # # it's in bytes.
765 # request-body-limit: 4096
766 # response-body-limit: 4096
767 # double-decode-path: no
768 # double-decode-query: no
769
770 #- iis7:
771 # address:
772 # - 192.168.0.0/24
773 # - 192.168.10.0/24
774 # personality: IIS_7_0
775 # # Can be specified in kb, mb, gb. Just a number indicates
776 # # it's in bytes.
777 # request-body-limit: 4096
778 # response-body-limit: 4096
779 # double-decode-path: no
780 # double-decode-query: no
781
782 # Note: Modbus probe parser is minimalist due to the poor significant field
783 # Only Modbus message length (greater than Modbus header length)
784 # And Protocol ID (equal to 0) are checked in probing parser
785 # It is important to enable detection port and define Modbus port
786 # to avoid false positive
787 modbus:
788 # How many unreplied Modbus requests are considered a flood.
789 # If the limit is reached, app-layer-event:modbus.flooded; will match.
790 #request-flood: 500
791
792 enabled: no
793 detection-ports:
794 dp: 502
795 # According to MODBUS Messaging on TCP/IP Implementation Guide V1.0b, it
796 # is recommended to keep the TCP connection opened with a remote device
797 # and not to open and close it for each MODBUS/TCP transaction. In that
798 # case, it is important to set the depth of the stream reassembling as
799 # unlimited (stream.reassembly.depth: 0)
800
801 # Stream reassembly size for modbus. By default track it completely.
802 stream-depth: 0
803
804 # DNP3
805 dnp3:
806 enabled: no
807 detection-ports:
808 dp: 20000
809
810 # SCADA EtherNet/IP and CIP protocol support
811 enip:
812 enabled: no
813 detection-ports:
814 dp: 44818
815 sp: 44818
816
817# Limit for the maximum number of asn1 frames to decode (default 256)
818asn1-max-frames: 256
819
820
821##############################################################################
822##
823## Advanced settings below
824##
825##############################################################################
826
827##
828## Run Options
829##
830
831# Run suricata as user and group.
832#run-as:
833# user: suri
834# group: suri
835
836# Some logging module will use that name in event as identifier. The default
837# value is the hostname
838#sensor-name: suricata
839
840# Default pid file.
841# Will use this file if no --pidfile in command options.
842#pid-file: @e_rundir@suricata.pid
843
844# Daemon working directory
845# Suricata will change directory to this one if provided
846# Default: "/"
847#daemon-directory: "/"
848
849# Suricata core dump configuration. Limits the size of the core dump file to
850# approximately max-dump. The actual core dump size will be a multiple of the
851# page size. Core dumps that would be larger than max-dump are truncated. On
852# Linux, the actual core dump size may be a few pages larger than max-dump.
853# Setting max-dump to 0 disables core dumping.
854# Setting max-dump to 'unlimited' will give the full core dump file.
855# On 32-bit Linux, a max-dump value >= ULONG_MAX may cause the core dump size
856# to be 'unlimited'.
857
858coredump:
859 max-dump: unlimited
860
861# If suricata box is a router for the sniffed networks, set it to 'router'. If
862# it is a pure sniffing setup, set it to 'sniffer-only'.
863# If set to auto, the variable is internally switch to 'router' in IPS mode
864# and 'sniffer-only' in IDS mode.
865# This feature is currently only used by the reject* keywords.
866host-mode: auto
867
868# Number of packets preallocated per thread. The default is 1024. A higher number
869# will make sure each CPU will be more easily kept busy, but may negatively
870# impact caching.
871#
872# If you are using the CUDA pattern matcher (mpm-algo: ac-cuda), different rules
873# apply. In that case try something like 60000 or more. This is because the CUDA
874# pattern matcher buffers and scans as many packets as possible in parallel.
875#max-pending-packets: 1024
876max-pending-packets: 5000
877
878# Runmode the engine should use. Please check --list-runmodes to get the available
879# runmodes for each packet acquisition method. Defaults to "autofp" (auto flow pinned
880# load balancing).
881#runmode: autofp
882runmode: workers
883
884# Specifies the kind of flow load balancer used by the flow pinned autofp mode.
885#
886# Supported schedulers are:
887#
888# round-robin - Flows assigned to threads in a round robin fashion.
889# active-packets - Flows assigned to threads that have the lowest number of
890# unprocessed packets (default).
891# hash - Flow alloted usihng the address hash. More of a random
892# technique. Was the default in Suricata 1.2.1 and older.
893#
894#autofp-scheduler: active-packets
895
896# Preallocated size for packet. Default is 1514 which is the classical
897# size for pcap on ethernet. You should adjust this value to the highest
898# packet size (MTU + hardware header) on your system.
899#default-packet-size: 1514
900
901# Unix command socket can be used to pass commands to suricata.
902# An external tool can then connect to get information from suricata
903# or trigger some modifications of the engine. Set enabled to yes
904# to activate the feature. In auto mode, the feature will only be
905# activated in live capture mode. You can use the filename variable to set
906# the file name of the socket.
907unix-command:
908 enabled: no
909 #filename: custom.socket
910
911# Magic file. The extension .mgc is added to the value here.
912magic-file: /usr/share/file/magic
913
914legacy:
915 uricontent: enabled
916
917##
918## Detection settings
919##
920
921# Set the order of alerts bassed on actions
922# The default order is pass, drop, reject, alert
923# action-order:
924# - pass
925# - drop
926# - reject
927# - alert
928
929# IP Reputation
930#reputation-categories-file: @e_sysconfdir@iprep/categories.txt
931#default-reputation-path: @e_sysconfdir@iprep
932#reputation-files:
933# - reputation.list
934
935# When run with the option --engine-analysis, the engine will read each of
936# the parameters below, and print reports for each of the enabled sections
937# and exit. The reports are printed to a file in the default log dir
938# given by the parameter "default-log-dir", with engine reporting
939# subsection below printing reports in its own report file.
940engine-analysis:
941 # enables printing reports for fast-pattern for every rule.
942 rules-fast-pattern: yes
943 # enables printing reports for each rule
944 rules: yes
945
946#recursion and match limits for PCRE where supported
947pcre:
948 match-limit: 3500
949 match-limit-recursion: 1500
950
951##
952## Advanced Traffic Tracking and Reconstruction Settings
953##
954
955# Host specific policies for defragmentation and TCP stream
956# reassembly. The host OS lookup is done using a radix tree, just
957# like a routing table so the most specific entry matches.
958host-os-policy:
959 # Make the default policy windows.
960 windows: [0.0.0.0/0]
961 bsd: []
962 bsd-right: []
963 old-linux: []
964 linux: []
965 old-solaris: []
966 solaris: []
967 hpux10: []
968 hpux11: []
969 irix: []
970 macos: []
971 vista: []
972 windows2k3: []
973
974# Defrag settings:
975
976defrag:
977 memcap: 32mb
978 hash-size: 65536
979 trackers: 65535 # number of defragmented flows to follow
980 max-frags: 65535 # number of fragments to keep (higher than trackers)
981 prealloc: yes
982 timeout: 60
983
984# Enable defrag per host settings
985# host-config:
986#
987# - dmz:
988# timeout: 30
989# address: [192.168.1.0/24, 127.0.0.0/8, 1.1.1.0/24, 2.2.2.0/24, "1.1.1.1", "2.2.2.2", "::1"]
990#
991# - lan:
992# timeout: 45
993# address:
994# - 192.168.0.0/24
995# - 192.168.10.0/24
996# - 172.16.14.0/24
997
998# Flow settings:
999# By default, the reserved memory (memcap) for flows is 32MB. This is the limit
1000# for flow allocation inside the engine. You can change this value to allow
1001# more memory usage for flows.
1002# The hash-size determine the size of the hash used to identify flows inside
1003# the engine, and by default the value is 65536.
1004# At the startup, the engine can preallocate a number of flows, to get a better
1005# performance. The number of flows preallocated is 10000 by default.
1006# emergency-recovery is the percentage of flows that the engine need to
1007# prune before unsetting the emergency state. The emergency state is activated
1008# when the memcap limit is reached, allowing to create new flows, but
1009# prunning them with the emergency timeouts (they are defined below).
1010# If the memcap is reached, the engine will try to prune flows
1011# with the default timeouts. If it doens't find a flow to prune, it will set
1012# the emergency bit and it will try again with more agressive timeouts.
1013# If that doesn't work, then it will try to kill the last time seen flows
1014# not in use.
1015# The memcap can be specified in kb, mb, gb. Just a number indicates it's
1016# in bytes.
1017
1018flow:
1019 memcap: 128mb
1020 hash-size: 65536
1021 prealloc: 10000
1022 emergency-recovery: 30
1023 #managers: 1 # default to one flow manager
1024 #recyclers: 1 # default to one flow recycler thread
1025
1026# This option controls the use of vlan ids in the flow (and defrag)
1027# hashing. Normally this should be enabled, but in some (broken)
1028# setups where both sides of a flow are not tagged with the same vlan
1029# tag, we can ignore the vlan id's in the flow hashing.
1030vlan:
1031 use-for-tracking: true
1032
1033# Specific timeouts for flows. Here you can specify the timeouts that the
1034# active flows will wait to transit from the current state to another, on each
1035# protocol. The value of "new" determine the seconds to wait after a hanshake or
1036# stream startup before the engine free the data of that flow it doesn't
1037# change the state to established (usually if we don't receive more packets
1038# of that flow). The value of "established" is the amount of
1039# seconds that the engine will wait to free the flow if it spend that amount
1040# without receiving new packets or closing the connection. "closed" is the
1041# amount of time to wait after a flow is closed (usually zero). "bypassed"
1042# timeout controls locally bypassed flows. For these flows we don't do any other
1043# tracking. If no packets have been seen after this timeout, the flow is discarded.
1044#
1045# There's an emergency mode that will become active under attack circumstances,
1046# making the engine to check flow status faster. This configuration variables
1047# use the prefix "emergency-" and work similar as the normal ones.
1048# Some timeouts doesn't apply to all the protocols, like "closed", for udp and
1049# icmp.
1050
1051flow-timeouts:
1052
1053 default:
1054 new: 30
1055 established: 300
1056 closed: 0
1057 bypassed: 100
1058 emergency-new: 10
1059 emergency-established: 100
1060 emergency-closed: 0
1061 emergency-bypassed: 50
1062 tcp:
1063 new: 60
1064 established: 600
1065 closed: 60
1066 bypassed: 100
1067 emergency-new: 5
1068 emergency-established: 100
1069 emergency-closed: 10
1070 emergency-bypassed: 50
1071 udp:
1072 new: 30
1073 established: 300
1074 bypassed: 100
1075 emergency-new: 10
1076 emergency-established: 100
1077 emergency-bypassed: 50
1078 icmp:
1079 new: 30
1080 established: 300
1081 bypassed: 100
1082 emergency-new: 10
1083 emergency-established: 100
1084 emergency-bypassed: 50
1085
1086# Stream engine settings. Here the TCP stream tracking and reassembly
1087# engine is configured.
1088#
1089# stream:
1090# memcap: 32mb # Can be specified in kb, mb, gb. Just a
1091# # number indicates it's in bytes.
1092# checksum-validation: yes # To validate the checksum of received
1093# # packet. If csum validation is specified as
1094# # "yes", then packet with invalid csum will not
1095# # be processed by the engine stream/app layer.
1096# # Warning: locally generated trafic can be
1097# # generated without checksum due to hardware offload
1098# # of checksum. You can control the handling of checksum
1099# # on a per-interface basis via the 'checksum-checks'
1100# # option
1101# prealloc-sessions: 2k # 2k sessions prealloc'd per stream thread
1102# midstream: false # don't allow midstream session pickups
1103# async-oneside: false # don't enable async stream handling
1104# inline: no # stream inline mode
1105# max-synack-queued: 5 # Max different SYN/ACKs to queue
1106# bypass: no # Bypass packets when stream.depth is reached
1107#
1108# reassembly:
1109# memcap: 64mb # Can be specified in kb, mb, gb. Just a number
1110# # indicates it's in bytes.
1111# depth: 1mb # Can be specified in kb, mb, gb. Just a number
1112# # indicates it's in bytes.
1113# toserver-chunk-size: 2560 # inspect raw stream in chunks of at least
1114# # this size. Can be specified in kb, mb,
1115# # gb. Just a number indicates it's in bytes.
1116# # The max acceptable size is 4024 bytes.
1117# toclient-chunk-size: 2560 # inspect raw stream in chunks of at least
1118# # this size. Can be specified in kb, mb,
1119# # gb. Just a number indicates it's in bytes.
1120# # The max acceptable size is 4024 bytes.
1121# randomize-chunk-size: yes # Take a random value for chunk size around the specified value.
1122# # This lower the risk of some evasion technics but could lead
1123# # detection change between runs. It is set to 'yes' by default.
1124# randomize-chunk-range: 10 # If randomize-chunk-size is active, the value of chunk-size is
1125# # a random value between (1 - randomize-chunk-range/100)*toserver-chunk-size
1126# # and (1 + randomize-chunk-range/100)*toserver-chunk-size and the same
1127# # calculation for toclient-chunk-size.
1128# # Default value of randomize-chunk-range is 10.
1129#
1130# raw: yes # 'Raw' reassembly enabled or disabled.
1131# # raw is for content inspection by detection
1132# # engine.
1133#
1134# chunk-prealloc: 250 # Number of preallocated stream chunks. These
1135# # are used during stream inspection (raw).
1136# segments: # Settings for reassembly segment pool.
1137# - size: 4 # Size of the (data)segment for a pool
1138# prealloc: 256 # Number of segments to prealloc and keep
1139# # in the pool.
1140# zero-copy-size: 128 # This option sets in bytes the value at
1141# # which segment data is passed to the app
1142# # layer API directly. Data sizes equal to
1143# # and higher than the value set are passed
1144# # on directly.
1145#
1146stream:
1147 memcap: 64mb
1148 checksum-validation: yes # reject wrong csums
1149 inline: auto # auto will use inline mode in IPS mode, yes or no set it statically
1150 reassembly:
1151 memcap: 256mb
1152 depth: 1mb # reassemble 1mb into a stream
1153 toserver-chunk-size: 2560
1154 toclient-chunk-size: 2560
1155 randomize-chunk-size: yes
1156 #randomize-chunk-range: 10
1157 #raw: yes
1158 #chunk-prealloc: 250
1159 #segments:
1160 # - size: 4
1161 # prealloc: 256
1162 # - size: 16
1163 # prealloc: 512
1164 # - size: 112
1165 # prealloc: 512
1166 # - size: 248
1167 # prealloc: 512
1168 # - size: 512
1169 # prealloc: 512
1170 # - size: 768
1171 # prealloc: 1024
1172 # 'from_mtu' means that the size is mtu - 40,
1173 # or 1460 if mtu couldn't be determined.
1174 # - size: from_mtu
1175 # prealloc: 1024
1176 # - size: 65535
1177 # prealloc: 128
1178 #zero-copy-size: 128
1179
1180# Host table:
1181#
1182# Host table is used by tagging and per host thresholding subsystems.
1183#
1184host:
1185 hash-size: 4096
1186 prealloc: 1000
1187 memcap: 32mb
1188
1189# IP Pair table:
1190#
1191# Used by xbits 'ippair' tracking.
1192#
1193#ippair:
1194# hash-size: 4096
1195# prealloc: 1000
1196# memcap: 32mb
1197
1198
1199##
1200## Performance tuning and profiling
1201##
1202
1203# The detection engine builds internal groups of signatures. The engine
1204# allow us to specify the profile to use for them, to manage memory on an
1205# efficient way keeping a good performance. For the profile keyword you
1206# can use the words "low", "medium", "high" or "custom". If you use custom
1207# make sure to define the values at "- custom-values" as your convenience.
1208# Usually you would prefer medium/high/low.
1209#
1210# "sgh mpm-context", indicates how the staging should allot mpm contexts for
1211# the signature groups. "single" indicates the use of a single context for
1212# all the signature group heads. "full" indicates a mpm-context for each
1213# group head. "auto" lets the engine decide the distribution of contexts
1214# based on the information the engine gathers on the patterns from each
1215# group head.
1216#
1217# The option inspection-recursion-limit is used to limit the recursive calls
1218# in the content inspection code. For certain payload-sig combinations, we
1219# might end up taking too much time in the content inspection code.
1220# If the argument specified is 0, the engine uses an internally defined
1221# default limit. On not specifying a value, we use no limits on the recursion.
1222detect:
1223 profile: medium
1224 custom-values:
1225 toclient-groups: 3
1226 toserver-groups: 25
1227 sgh-mpm-context: auto
1228 inspection-recursion-limit: 3000
1229 # If set to yes, the loading of signatures will be made after the capture
1230 # is started. This will limit the downtime in IPS mode.
1231 #delayed-detect: yes
1232
1233 prefilter:
1234 # default prefiltering setting. "mpm" only creates MPM/fast_pattern
1235 # engines. "auto" also sets up prefilter engines for other keywords.
1236 # Use --list-keywords=all to see which keywords support prefiltering.
1237 default: mpm
1238
1239 # the grouping values above control how many groups are created per
1240 # direction. Port whitelisting forces that port to get it's own group.
1241 # Very common ports will benefit, as well as ports with many expensive
1242 # rules.
1243 grouping:
1244 #tcp-whitelist: 53, 80, 139, 443, 445, 1433, 3306, 3389, 6666, 6667, 8080
1245 #udp-whitelist: 53, 135, 5060
1246
1247 profiling:
1248 # Log the rules that made it past the prefilter stage, per packet
1249 # default is off. The threshold setting determines how many rules
1250 # must have made it past pre-filter for that rule to trigger the
1251 # logging.
1252 #inspect-logging-threshold: 200
1253 grouping:
1254 dump-to-disk: false
1255 include-rules: false # very verbose
1256 include-mpm-stats: false
1257
1258# Select the multi pattern algorithm you want to run for scan/search the
1259# in the engine.
1260#
1261# The supported algorithms are:
1262# "ac" - Aho-Corasick, default implementation
1263# "ac-bs" - Aho-Corasick, reduced memory implementation
1264# "ac-cuda" - Aho-Corasick, CUDA implementation
1265# "ac-ks" - Aho-Corasick, "Ken Steele" variant
1266# "hs" - Hyperscan, available when built with Hyperscan support
1267#
1268# The default mpm-algo value of "auto" will use "hs" if Hyperscan is
1269# available, "ac" otherwise.
1270#
1271# The mpm you choose also decides the distribution of mpm contexts for
1272# signature groups, specified by the conf - "detect.sgh-mpm-context".
1273# Selecting "ac" as the mpm would require "detect.sgh-mpm-context"
1274# to be set to "single", because of ac's memory requirements, unless the
1275# ruleset is small enough to fit in one's memory, in which case one can
1276# use "full" with "ac". Rest of the mpms can be run in "full" mode.
1277#
1278# There is also a CUDA pattern matcher (only available if Suricata was
1279# compiled with --enable-cuda: b2g_cuda. Make sure to update your
1280# max-pending-packets setting above as well if you use b2g_cuda.
1281
1282mpm-algo: auto
1283
1284# Select the matching algorithm you want to use for single-pattern searches.
1285#
1286# Supported algorithms are "bm" (Boyer-Moore) and "hs" (Hyperscan, only
1287# available if Suricata has been built with Hyperscan support).
1288#
1289# The default of "auto" will use "hs" if available, otherwise "bm".
1290
1291spm-algo: auto
1292
1293# Suricata is multi-threaded. Here the threading can be influenced.
1294threading:
1295 set-cpu-affinity: no
1296 # Tune cpu affinity of threads. Each family of threads can be bound
1297 # on specific CPUs.
1298 #
1299 # These 2 apply to the all runmodes:
1300 # management-cpu-set is used for flow timeout handling, counters
1301 # worker-cpu-set is used for 'worker' threads
1302 #
1303 # Additionally, for autofp these apply:
1304 # receive-cpu-set is used for capture threads
1305 # verdict-cpu-set is used for IPS verdict threads
1306 #
1307 cpu-affinity:
1308 - management-cpu-set:
1309 cpu: [ 0 ] # include only these cpus in affinity settings
1310 - receive-cpu-set:
1311 cpu: [ 0 ] # include only these cpus in affinity settings
1312 - worker-cpu-set:
1313 cpu: [ "all" ]
1314 mode: "exclusive"
1315 # Use explicitely 3 threads and don't compute number by using
1316 # detect-thread-ratio variable:
1317 # threads: 3
1318 prio:
1319 low: [ 0 ]
1320 medium: [ "1-2" ]
1321 high: [ 3 ]
1322 default: "medium"
1323 #- verdict-cpu-set:
1324 # cpu: [ 0 ]
1325 # prio:
1326 # default: "high"
1327 #
1328 # By default Suricata creates one "detect" thread per available CPU/CPU core.
1329 # This setting allows controlling this behaviour. A ratio setting of 2 will
1330 # create 2 detect threads for each CPU/CPU core. So for a dual core CPU this
1331 # will result in 4 detect threads. If values below 1 are used, less threads
1332 # are created. So on a dual core CPU a setting of 0.5 results in 1 detect
1333 # thread being created. Regardless of the setting at a minimum 1 detect
1334 # thread will always be created.
1335 #
1336 detect-thread-ratio: 1.0
1337
1338# Luajit has a strange memory requirement, it's 'states' need to be in the
1339# first 2G of the process' memory.
1340#
1341# 'luajit.states' is used to control how many states are preallocated.
1342# State use: per detect script: 1 per detect thread. Per output script: 1 per
1343# script.
1344luajit:
1345 states: 128
1346
1347# Profiling settings. Only effective if Suricata has been built with the
1348# the --enable-profiling configure flag.
1349#
1350profiling:
1351 # Run profiling for every xth packet. The default is 1, which means we
1352 # profile every packet. If set to 1000, one packet is profiled for every
1353 # 1000 received.
1354 #sample-rate: 1000
1355
1356 # rule profiling
1357 rules:
1358
1359 # Profiling can be disabled here, but it will still have a
1360 # performance impact if compiled in.
1361 enabled: yes
1362 filename: rule_perf.log
1363 append: yes
1364
1365 # Sort options: ticks, avgticks, checks, matches, maxticks
1366 sort: avgticks
1367
1368 # Limit the number of items printed at exit (ignored for json).
1369 limit: 100
1370
1371 # output to json
1372 json: true
1373
1374 # per keyword profiling
1375 keywords:
1376 enabled: yes
1377 filename: keyword_perf.log
1378 append: yes
1379
1380 # per rulegroup profiling
1381 rulegroups:
1382 enabled: yes
1383 filename: rule_group_perf.log
1384 append: yes
1385
1386 # packet profiling
1387 packets:
1388
1389 # Profiling can be disabled here, but it will still have a
1390 # performance impact if compiled in.
1391 enabled: yes
1392 filename: packet_stats.log
1393 append: yes
1394
1395 # per packet csv output
1396 csv:
1397
1398 # Output can be disabled here, but it will still have a
1399 # performance impact if compiled in.
1400 enabled: no
1401 filename: packet_stats.csv
1402
1403 # profiling of locking. Only available when Suricata was built with
1404 # --enable-profiling-locks.
1405 locks:
1406 enabled: no
1407 filename: lock_stats.log
1408 append: yes
1409
1410 pcap-log:
1411 enabled: no
1412 filename: pcaplog_stats.log
1413 append: yes
1414
1415##
1416## Netfilter integration
1417##
1418
1419# When running in NFQ inline mode, it is possible to use a simulated
1420# non-terminal NFQUEUE verdict.
1421# This permit to do send all needed packet to suricata via this a rule:
1422# iptables -I FORWARD -m mark ! --mark $MARK/$MASK -j NFQUEUE
1423# And below, you can have your standard filtering ruleset. To activate
1424# this mode, you need to set mode to 'repeat'
1425# If you want packet to be sent to another queue after an ACCEPT decision
1426# set mode to 'route' and set next-queue value.
1427# On linux >= 3.1, you can set batchcount to a value > 1 to improve performance
1428# by processing several packets before sending a verdict (worker runmode only).
1429# On linux >= 3.6, you can set the fail-open option to yes to have the kernel
1430# accept the packet if suricata is not able to keep pace.
1431# bypass mark and mask can be used to implement NFQ bypass. If bypass mark is
1432# set then the NFQ bypass is activated. Suricata will set the bypass mark/mask
1433# on packet of a flow that need to be bypassed. The Nefilter ruleset has to
1434# directly accept all packets of a flow once a packet has been marked.
1435nfq:
1436# mode: accept
1437# repeat-mark: 1
1438# repeat-mask: 1
1439# bypass-mark: 1
1440# bypass-mask: 1
1441# route-queue: 2
1442# batchcount: 20
1443# fail-open: yes
1444
1445#nflog support
1446nflog:
1447 # netlink multicast group
1448 # (the same as the iptables --nflog-group param)
1449 # Group 0 is used by the kernel, so you can't use it
1450 - group: 2
1451 # netlink buffer size
1452 buffer-size: 18432
1453 # put default value here
1454 - group: default
1455 # set number of packet to queue inside kernel
1456 qthreshold: 1
1457 # set the delay before flushing packet in the queue inside kernel
1458 qtimeout: 100
1459 # netlink max buffer size
1460 max-size: 20000
1461
1462##
1463## Advanced Capture Options
1464##
1465
1466# general settings affecting packet capture
1467capture:
1468 # disable NIC offloading. It's restored when Suricata exists.
1469 # Enabled by default
1470 disable-offloading: false
1471 #
1472 # disable checksum validation. Same as setting '-k none' on the
1473 # commandline
1474 #checksum-validation: none
1475
1476# Netmap support
1477#
1478# Netmap operates with NIC directly in driver, so you need FreeBSD wich have
1479# built-in netmap support or compile and install netmap module and appropriate
1480# NIC driver on your Linux system.
1481# To reach maximum throughput disable all receive-, segmentation-,
1482# checksum- offloadings on NIC.
1483# Disabling Tx checksum offloading is *required* for connecting OS endpoint
1484# with NIC endpoint.
1485# You can find more information at https://github.com/luigirizzo/netmap
1486#
1487netmap:
1488 # To specify OS endpoint add plus sign at the end (e.g. "eth0+")
1489 - interface: eth2
1490 # Number of receive threads. "auto" uses number of RSS queues on interface.
1491 #threads: auto
1492 # You can use the following variables to activate netmap tap or IPS mode.
1493 # If copy-mode is set to ips or tap, the traffic coming to the current
1494 # interface will be copied to the copy-iface interface. If 'tap' is set, the
1495 # copy is complete. If 'ips' is set, the packet matching a 'drop' action
1496 # will not be copied.
1497 # To specify the OS as the copy-iface (so the OS can route packets, or forward
1498 # to a service running on the same machine) add a plus sign at the end
1499 # (e.g. "copy-iface: eth0+"). Don't forget to set up a symmetrical eth0+ -> eth0
1500 # for return packets. Hardware checksumming must be *off* on the interface if
1501 # using an OS endpoint (e.g. 'ifconfig eth0 -rxcsum -txcsum -rxcsum6 -txcsum6' for FreeBSD
1502 # or 'ethtool -K eth0 tx off rx off' for Linux).
1503 #copy-mode: tap
1504 #copy-iface: eth3
1505 # Set to yes to disable promiscuous mode
1506 # disable-promisc: no
1507 # Choose checksum verification mode for the interface. At the moment
1508 # of the capture, some packets may be with an invalid checksum due to
1509 # offloading to the network card of the checksum computation.
1510 # Possible values are:
1511 # - yes: checksum validation is forced
1512 # - no: checksum validation is disabled
1513 # - auto: suricata uses a statistical approach to detect when
1514 # checksum off-loading is used.
1515 # Warning: 'checksum-validation' must be set to yes to have any validation
1516 #checksum-checks: auto
1517 # BPF filter to apply to this interface. The pcap filter syntax apply here.
1518 #bpf-filter: port 80 or udp
1519 #- interface: eth3
1520 #threads: auto
1521 #copy-mode: tap
1522 #copy-iface: eth2
1523 # Put default values here
1524 - interface: default
1525
1526# PF_RING configuration. for use with native PF_RING support
1527# for more info see http://www.ntop.org/products/pf_ring/
1528pfring:
1529 - interface: eth1
1530 # Number of receive threads (>1 will enable experimental flow pinned
1531 # runmode)
1532 threads: 1
1533
1534 # Default clusterid. PF_RING will load balance packets based on flow.
1535 # All threads/processes that will participate need to have the same
1536 # clusterid.
1537 cluster-id: 52
1538
1539 # Default PF_RING cluster type. PF_RING can load balance per flow.
1540 # Possible values are cluster_flow or cluster_round_robin.
1541 cluster-type: cluster_flow
1542 # bpf filter for this interface
1543 #bpf-filter: tcp
1544 # Choose checksum verification mode for the interface. At the moment
1545 # of the capture, some packets may be with an invalid checksum due to
1546 # offloading to the network card of the checksum computation.
1547 # Possible values are:
1548 # - rxonly: only compute checksum for packets received by network card.
1549 # - yes: checksum validation is forced
1550 # - no: checksum validation is disabled
1551 # - auto: suricata uses a statistical approach to detect when
1552 # checksum off-loading is used. (default)
1553 # Warning: 'checksum-validation' must be set to yes to have any validation
1554 #checksum-checks: auto
1555 # Second interface
1556 #- interface: eth1
1557 # threads: 3
1558 # cluster-id: 52
1559 # cluster-type: cluster_flow
1560 # Put default values here
1561 - interface: default
1562 #threads: 2
1563
1564# For FreeBSD ipfw(8) divert(4) support.
1565# Please make sure you have ipfw_load="YES" and ipdivert_load="YES"
1566# in /etc/loader.conf or kldload'ing the appropriate kernel modules.
1567# Additionally, you need to have an ipfw rule for the engine to see
1568# the packets from ipfw. For Example:
1569#
1570# ipfw add 100 divert 8000 ip from any to any
1571#
1572# The 8000 above should be the same number you passed on the command
1573# line, i.e. -d 8000
1574#
1575ipfw:
1576
1577 # Reinject packets at the specified ipfw rule number. This config
1578 # option is the ipfw rule number AT WHICH rule processing continues
1579 # in the ipfw processing system after the engine has finished
1580 # inspecting the packet for acceptance. If no rule number is specified,
1581 # accepted packets are reinjected at the divert rule which they entered
1582 # and IPFW rule processing continues. No check is done to verify
1583 # this will rule makes sense so care must be taken to avoid loops in ipfw.
1584 #
1585 ## The following example tells the engine to reinject packets
1586 # back into the ipfw firewall AT rule number 5500:
1587 #
1588 # ipfw-reinjection-rule-number: 5500
1589
1590
1591napatech:
1592 # The Host Buffer Allowance for all streams
1593 # (-1 = OFF, 1 - 100 = percentage of the host buffer that can be held back)
1594 hba: -1
1595
1596 # use_all_streams set to "yes" will query the Napatech service for all configured
1597 # streams and listen on all of them. When set to "no" the streams config array
1598 # will be used.
1599 use-all-streams: yes
1600
1601 # The streams to listen on
1602 streams: [1, 2, 3]
1603
1604# Tilera mpipe configuration. for use on Tilera TILE-Gx.
1605mpipe:
1606
1607 # Load balancing modes: "static", "dynamic", "sticky", or "round-robin".
1608 load-balance: dynamic
1609
1610 # Number of Packets in each ingress packet queue. Must be 128, 512, 2028 or 65536
1611 iqueue-packets: 2048
1612
1613 # List of interfaces we will listen on.
1614 inputs:
1615 - interface: xgbe2
1616 - interface: xgbe3
1617 - interface: xgbe4
1618
1619
1620 # Relative weight of memory for packets of each mPipe buffer size.
1621 stack:
1622 size128: 0
1623 size256: 9
1624 size512: 0
1625 size1024: 0
1626 size1664: 7
1627 size4096: 0
1628 size10386: 0
1629 size16384: 0
1630
1631##
1632## Hardware accelaration
1633##
1634
1635# Cuda configuration.
1636cuda:
1637 # The "mpm" profile. On not specifying any of these parameters, the engine's
1638 # internal default values are used, which are same as the ones specified in
1639 # in the default conf file.
1640 mpm:
1641 # The minimum length required to buffer data to the gpu.
1642 # Anything below this is MPM'ed on the CPU.
1643 # Can be specified in kb, mb, gb. Just a number indicates it's in bytes.
1644 # A value of 0 indicates there's no limit.
1645 data-buffer-size-min-limit: 0
1646 # The maximum length for data that we would buffer to the gpu.
1647 # Anything over this is MPM'ed on the CPU.
1648 # Can be specified in kb, mb, gb. Just a number indicates it's in bytes.
1649 data-buffer-size-max-limit: 1500
1650 # The ring buffer size used by the CudaBuffer API to buffer data.
1651 cudabuffer-buffer-size: 500mb
1652 # The max chunk size that can be sent to the gpu in a single go.
1653 gpu-transfer-size: 50mb
1654 # The timeout limit for batching of packets in microseconds.
1655 batching-timeout: 2000
1656 # The device to use for the mpm. Currently we don't support load balancing
1657 # on multiple gpus. In case you have multiple devices on your system, you
1658 # can specify the device to use, using this conf. By default we hold 0, to
1659 # specify the first device cuda sees. To find out device-id associated with
1660 # the card(s) on the system run "suricata --list-cuda-cards".
1661 device-id: 0
1662 # No of Cuda streams used for asynchronous processing. All values > 0 are valid.
1663 # For this option you need a device with Compute Capability > 1.0.
1664 cuda-streams: 2
1665
1666##
1667## Include other configs
1668##
1669
1670# Includes. Files included here will be handled as if they were
1671# inlined in this configuration file.
1672#include: include1.yaml
1673#include: include2.yaml