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