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