SHARE
TWEET

Untitled

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