{"id":1491,"date":"2018-10-12T13:41:42","date_gmt":"2018-10-12T11:41:42","guid":{"rendered":"http:\/\/clark.tipistrani.it\/?p=1491"},"modified":"2018-10-17T10:09:10","modified_gmt":"2018-10-17T08:09:10","slug":"suricata-yaml","status":"publish","type":"post","link":"http:\/\/clark.tipistrani.it\/?p=1491","title":{"rendered":"suricata.yaml"},"content":{"rendered":"<p>%YAML 1.1<br \/>\n&#8212;<\/p>\n<p># Suricata configuration file. In addition to the comments describing all<br \/>\n# options in this file, full documentation can be found at:<br \/>\n# https:\/\/redmine.openinfosecfoundation.org\/projects\/suricata\/wiki\/Suricatayaml<\/p>\n<p>##<br \/>\n## Step 1: inform Suricata about your network<br \/>\n##<\/p>\n<p>vars:<br \/>\n# more specifc is better for alert accuracy and performance<br \/>\naddress-groups:<br \/>\n#HOME_NET: &#8220;[192.168.0.0\/16,10.0.0.0\/8,172.16.0.0\/12]&#8221;<br \/>\nHOME_NET: &#8220;[192.168.2.0\/24]&#8221;<br \/>\n#HOME_NET: &#8220;[10.0.0.0\/8]&#8221;<br \/>\n#HOME_NET: &#8220;[172.16.0.0\/12]&#8221;<br \/>\n#HOME_NET: &#8220;any&#8221;<\/p>\n<p>EXTERNAL_NET: &#8220;!$HOME_NET&#8221;<br \/>\n#EXTERNAL_NET: &#8220;any&#8221;<\/p>\n<p>HTTP_SERVERS: &#8220;$HOME_NET&#8221;<br \/>\nSMTP_SERVERS: &#8220;$HOME_NET&#8221;<br \/>\nSQL_SERVERS: &#8220;$HOME_NET&#8221;<br \/>\nDNS_SERVERS: &#8220;$HOME_NET&#8221;<br \/>\nTELNET_SERVERS: &#8220;$HOME_NET&#8221;<br \/>\nAIM_SERVERS: &#8220;$EXTERNAL_NET&#8221;<br \/>\nDNP3_SERVER: &#8220;$HOME_NET&#8221;<br \/>\nDNP3_CLIENT: &#8220;$HOME_NET&#8221;<br \/>\nMODBUS_CLIENT: &#8220;$HOME_NET&#8221;<br \/>\nMODBUS_SERVER: &#8220;$HOME_NET&#8221;<br \/>\nENIP_CLIENT: &#8220;$HOME_NET&#8221;<br \/>\nENIP_SERVER: &#8220;$HOME_NET&#8221;<\/p>\n<p>port-groups:<br \/>\nHTTP_PORTS: &#8220;80&#8221;<br \/>\nSHELLCODE_PORTS: &#8220;!80&#8221;<br \/>\nORACLE_PORTS: 1521<br \/>\nSSH_PORTS: 22<br \/>\nDNP3_PORTS: 20000<br \/>\nMODBUS_PORTS: 502<\/p>\n<p>##<br \/>\n## Step 2: select the rules to enable or disable<br \/>\n##<\/p>\n<p>default-rule-path: \/etc\/suricata\/rules<br \/>\nrule-files:<br \/>\n&#8211; botcc.rules<br \/>\n# &#8211; botcc.portgrouped.rules<br \/>\n&#8211; ciarmy.rules<br \/>\n&#8211; compromised.rules<br \/>\n&#8211; drop.rules<br \/>\n&#8211; dshield.rules<br \/>\n# &#8211; emerging-activex.rules<br \/>\n&#8211; emerging-attack_response.rules<br \/>\n&#8211; emerging-chat.rules<br \/>\n&#8211; emerging-current_events.rules<br \/>\n&#8211; emerging-dns.rules<br \/>\n&#8211; emerging-dos.rules<br \/>\n&#8211; emerging-exploit.rules<br \/>\n&#8211; emerging-ftp.rules<br \/>\n# &#8211; emerging-games.rules<br \/>\n# &#8211; emerging-icmp_info.rules<br \/>\n# &#8211; emerging-icmp.rules<br \/>\n&#8211; emerging-imap.rules<br \/>\n# &#8211; emerging-inappropriate.rules<br \/>\n# &#8211; emerging-info.rules<br \/>\n&#8211; emerging-malware.rules<br \/>\n&#8211; emerging-misc.rules<br \/>\n&#8211; emerging-mobile_malware.rules<br \/>\n&#8211; emerging-netbios.rules<br \/>\n&#8211; emerging-p2p.rules<br \/>\n&#8211; emerging-policy.rules<br \/>\n&#8211; emerging-pop3.rules<br \/>\n&#8211; emerging-rpc.rules<br \/>\n# &#8211; emerging-scada.rules<br \/>\n# &#8211; emerging-scada_special.rules<br \/>\n&#8211; emerging-scan.rules<br \/>\n# &#8211; emerging-shellcode.rules<br \/>\n&#8211; emerging-smtp.rules<br \/>\n&#8211; emerging-snmp.rules<br \/>\n&#8211; emerging-sql.rules<br \/>\n&#8211; emerging-telnet.rules<br \/>\n&#8211; emerging-tftp.rules<br \/>\n&#8211; emerging-trojan.rules<br \/>\n&#8211; emerging-user_agents.rules<br \/>\n&#8211; emerging-voip.rules<br \/>\n&#8211; emerging-web_client.rules<br \/>\n&#8211; emerging-web_server.rules<br \/>\n# &#8211; emerging-web_specific_apps.rules<br \/>\n&#8211; emerging-worm.rules<br \/>\n&#8211; tor.rules<br \/>\n# &#8211; decoder-events.rules # available in suricata sources under rules dir<br \/>\n# &#8211; stream-events.rules # available in suricata sources under rules dir<br \/>\n&#8211; http-events.rules # available in suricata sources under rules dir<br \/>\n&#8211; smtp-events.rules # available in suricata sources under rules dir<br \/>\n&#8211; dns-events.rules # available in suricata sources under rules dir<br \/>\n&#8211; tls-events.rules # available in suricata sources under rules dir<br \/>\n# &#8211; modbus-events.rules # available in suricata sources under rules dir<br \/>\n# &#8211; app-layer-events.rules # available in suricata sources under rules dir<br \/>\n# &#8211; dnp3-events.rules # available in suricata sources under rules dir<\/p>\n<p>classification-file: \/etc\/suricata\/classification.config<br \/>\nreference-config-file: \/etc\/suricata\/reference.config<br \/>\n# threshold-file: \/etc\/suricata\/threshold.config<\/p>\n<p>##<br \/>\n## Step 3: select outputs to enable<br \/>\n##<\/p>\n<p># The default logging directory. Any log or output file will be<br \/>\n# placed here if its not specified with a full path name. This can be<br \/>\n# overridden with the -l command line parameter.<br \/>\ndefault-log-dir: \/var\/log\/suricata\/<\/p>\n<p># global stats configuration<br \/>\nstats:<br \/>\nenabled: yes<br \/>\n# The interval field (in seconds) controls at what interval<br \/>\n# the loggers are invoked.<br \/>\ninterval: 8<\/p>\n<p># Configure the type of alert (and other) logging you would like.<br \/>\noutputs:<br \/>\n# a line based alerts log similar to Snort&#8217;s fast.log<br \/>\n&#8211; fast:<br \/>\nenabled: yes<br \/>\nfilename: fast.log<br \/>\nappend: yes<br \/>\n#filetype: regular # &#8216;regular&#8217;, &#8216;unix_stream&#8217; or &#8216;unix_dgram&#8217;<\/p>\n<p># Extensible Event Format (nicknamed EVE) event log in JSON format<br \/>\n&#8211; eve-log:<br \/>\nenabled: yes<br \/>\nfiletype: regular #regular|syslog|unix_dgram|unix_stream|redis<br \/>\nfilename: eve.json<br \/>\n#prefix: &#8220;@cee: &#8221; # prefix to prepend to each log entry<br \/>\n# the following are valid when type: syslog above<br \/>\n#identity: &#8220;suricata&#8221;<br \/>\n#facility: local5<br \/>\n#level: Info ## possible levels: Emergency, Alert, Critical,<br \/>\n## Error, Warning, Notice, Info, Debug<br \/>\n#redis:<br \/>\n# server: 127.0.0.1<br \/>\n# port: 6379<br \/>\n# mode: list ## possible values: list (default), channel<br \/>\n# key: suricata ## key or channel to use (default to suricata)<br \/>\n# Redis pipelining set up. This will enable to only do a query every<br \/>\n# &#8216;batch-size&#8217; events. This should lower the latency induced by network<br \/>\n# connection at the cost of some memory. There is no flushing implemented<br \/>\n# so this setting as to be reserved to high traffic suricata.<br \/>\n# pipelining:<br \/>\n# enabled: yes ## set enable to yes to enable query pipelining<br \/>\n# batch-size: 10 ## number of entry to keep in buffer<br \/>\ntypes:<br \/>\n&#8211; alert:<br \/>\n# payload: yes # enable dumping payload in Base64<br \/>\n# payload-buffer-size: 4kb # max size of payload buffer to output in eve-log<br \/>\n# payload-printable: yes # enable dumping payload in printable (lossy) format<br \/>\n# packet: yes # enable dumping of packet (without stream segments)<br \/>\nhttp: yes # enable dumping of http fields<br \/>\ntls: yes # enable dumping of tls fields<br \/>\nssh: yes # enable dumping of ssh fields<br \/>\nsmtp: yes # enable dumping of smtp fields<br \/>\ndnp3: yes # enable dumping of DNP3 fields<\/p>\n<p># Enable the logging of tagged packets for rules using the<br \/>\n# &#8220;tag&#8221; keyword.<br \/>\ntagged-packets: yes<\/p>\n<p># HTTP X-Forwarded-For support by adding an extra field or overwriting<br \/>\n# the source or destination IP address (depending on flow direction)<br \/>\n# with the one reported in the X-Forwarded-For HTTP header. This is<br \/>\n# helpful when reviewing alerts for traffic that is being reverse<br \/>\n# or forward proxied.<br \/>\nxff:<br \/>\nenabled: no<br \/>\n# Two operation modes are available, &#8220;extra-data&#8221; and &#8220;overwrite&#8221;.<br \/>\nmode: extra-data<br \/>\n# Two proxy deployments are supported, &#8220;reverse&#8221; and &#8220;forward&#8221;. In<br \/>\n# a &#8220;reverse&#8221; deployment the IP address used is the last one, in a<br \/>\n# &#8220;forward&#8221; deployment the first IP address is used.<br \/>\ndeployment: reverse<br \/>\n# Header name where the actual IP address will be reported, if more<br \/>\n# than one IP address is present, the last IP address will be the<br \/>\n# one taken into consideration.<br \/>\nheader: X-Forwarded-For<br \/>\n&#8211; http:<br \/>\nextended: yes # enable this for extended logging information<br \/>\n# custom allows additional http fields to be included in eve-log<br \/>\n# the example below adds three additional fields when uncommented<br \/>\n#custom: [Accept-Encoding, Accept-Language, Authorization]<br \/>\n&#8211; dns:<br \/>\n# control logging of queries and answers<br \/>\n# default yes, no to disable<br \/>\nquery: yes # enable logging of DNS queries<br \/>\nanswer: yes # enable logging of DNS answers<br \/>\n# control which RR types are logged<br \/>\n# all enabled if custom not specified<br \/>\n#custom: [a, aaaa, cname, mx, ns, ptr, txt]<br \/>\n&#8211; tls:<br \/>\nextended: yes # enable this for extended logging information<br \/>\n&#8211; files:<br \/>\nforce-magic: no # force logging magic on all logged files<br \/>\n# force logging of checksums, available hash functions are md5,<br \/>\n# sha1 and sha256<br \/>\n#force-hash: [md5]<br \/>\n#- drop:<br \/>\n# alerts: yes # log alerts that caused drops<br \/>\n# flows: all # start or all: &#8216;start&#8217; logs only a single drop<br \/>\n# # per flow direction. All logs each dropped pkt.<br \/>\n&#8211; smtp:<br \/>\n#extended: yes # enable this for extended logging information<br \/>\n# this includes: bcc, message-id, subject, x_mailer, user-agent<br \/>\n# custom fields logging from the list:<br \/>\n# reply-to, bcc, message-id, subject, x-mailer, user-agent, received,<br \/>\n# x-originating-ip, in-reply-to, references, importance, priority,<br \/>\n# sensitivity, organization, content-md5, date<br \/>\n#custom: [received, x-mailer, x-originating-ip, relays, reply-to, bcc]<br \/>\n# output md5 of fields: body, subject<br \/>\n# for the body you need to set app-layer.protocols.smtp.mime.body-md5<br \/>\n# to yes<br \/>\n#md5: [body, subject]<\/p>\n<p>&#8211; ssh<br \/>\n&#8211; stats:<br \/>\ntotals: yes # stats for all threads merged together<br \/>\nthreads: no # per thread stats<br \/>\ndeltas: no # include delta values<br \/>\n# bi-directional flows<br \/>\n&#8211; flow<br \/>\n# uni-directional flows<br \/>\n#- netflow<br \/>\n#- dnp3<\/p>\n<p># alert output for use with Barnyard2<br \/>\n&#8211; unified2-alert:<br \/>\nenabled: no<br \/>\nfilename: unified2.alert<\/p>\n<p># File size limit. Can be specified in kb, mb, gb. Just a number<br \/>\n# is parsed as bytes.<br \/>\n#limit: 32mb<\/p>\n<p># Sensor ID field of unified2 alerts.<br \/>\n#sensor-id: 0<\/p>\n<p># Include payload of packets related to alerts. Defaults to true, set to<br \/>\n# false if payload is not required.<br \/>\n#payload: yes<\/p>\n<p># HTTP X-Forwarded-For support by adding the unified2 extra header or<br \/>\n# overwriting the source or destination IP address (depending on flow<br \/>\n# direction) with the one reported in the X-Forwarded-For HTTP header.<br \/>\n# This is helpful when reviewing alerts for traffic that is being reverse<br \/>\n# or forward proxied.<br \/>\nxff:<br \/>\nenabled: no<br \/>\n# Two operation modes are available, &#8220;extra-data&#8221; and &#8220;overwrite&#8221;. Note<br \/>\n# that in the &#8220;overwrite&#8221; mode, if the reported IP address in the HTTP<br \/>\n# X-Forwarded-For header is of a different version of the packet<br \/>\n# received, it will fall-back to &#8220;extra-data&#8221; mode.<br \/>\nmode: extra-data<br \/>\n# Two proxy deployments are supported, &#8220;reverse&#8221; and &#8220;forward&#8221;. In<br \/>\n# a &#8220;reverse&#8221; deployment the IP address used is the last one, in a<br \/>\n# &#8220;forward&#8221; deployment the first IP address is used.<br \/>\ndeployment: reverse<br \/>\n# Header name where the actual IP address will be reported, if more<br \/>\n# than one IP address is present, the last IP address will be the<br \/>\n# one taken into consideration.<br \/>\nheader: X-Forwarded-For<\/p>\n<p># a line based log of HTTP requests (no alerts)<br \/>\n&#8211; http-log:<br \/>\nenabled: no<br \/>\nfilename: http.log<br \/>\nappend: yes<br \/>\n#extended: yes # enable this for extended logging information<br \/>\n#custom: yes # enabled the custom logging format (defined by customformat)<br \/>\n#customformat: &#8220;%{%D-%H:%M:%S}t.%z %{X-Forwarded-For}i %H %m %h %u %s %B %a:%p -&gt; %A:%P&#8221;<br \/>\n#filetype: regular # &#8216;regular&#8217;, &#8216;unix_stream&#8217; or &#8216;unix_dgram&#8217;<\/p>\n<p># a line based log of TLS handshake parameters (no alerts)<br \/>\n&#8211; tls-log:<br \/>\nenabled: no # Log TLS connections.<br \/>\nfilename: tls.log # File to store TLS logs.<br \/>\nappend: yes<br \/>\n#filetype: regular # &#8216;regular&#8217;, &#8216;unix_stream&#8217; or &#8216;unix_dgram&#8217;<br \/>\n#extended: yes # Log extended information like fingerprint<\/p>\n<p># output module to store certificates chain to disk<br \/>\n&#8211; tls-store:<br \/>\nenabled: no<br \/>\n#certs-log-dir: certs # directory to store the certificates files<\/p>\n<p># a line based log of DNS requests and\/or replies (no alerts)<br \/>\n&#8211; dns-log:<br \/>\nenabled: no<br \/>\nfilename: dns.log<br \/>\nappend: yes<br \/>\n#filetype: regular # &#8216;regular&#8217;, &#8216;unix_stream&#8217; or &#8216;unix_dgram&#8217;<\/p>\n<p># Packet log&#8230; log packets in pcap format. 3 modes of operation: &#8220;normal&#8221;<br \/>\n# &#8220;multi&#8221; and &#8220;sguil&#8221;.<br \/>\n#<br \/>\n# In normal mode a pcap file &#8220;filename&#8221; is created in the default-log-dir,<br \/>\n# or are as specified by &#8220;dir&#8221;.<br \/>\n# In multi mode, a file is created per thread. This will perform much<br \/>\n# better, but will create multiple files where &#8216;normal&#8217; would create one.<br \/>\n# In multi mode the filename takes a few special variables:<br \/>\n# &#8211; %n &#8212; thread number<br \/>\n# &#8211; %i &#8212; thread id<br \/>\n# &#8211; %t &#8212; timestamp (secs or secs.usecs based on &#8216;ts-format&#8217;<br \/>\n# E.g. filename: pcap.%n.%t<br \/>\n#<br \/>\n# Note that it&#8217;s possible to use directories, but the directories are not<br \/>\n# created by Suricata. E.g. filename: pcaps\/%n\/log.%s will log into the<br \/>\n# per thread directory.<br \/>\n#<br \/>\n# Also note that the limit and max-files settings are enforced per thread.<br \/>\n# So the size limit when using 8 threads with 1000mb files and 2000 files<br \/>\n# is: 8*1000*2000 ~ 16TiB.<br \/>\n#<br \/>\n# In Sguil mode &#8220;dir&#8221; indicates the base directory. In this base dir the<br \/>\n# pcaps are created in th directory structure Sguil expects:<br \/>\n#<br \/>\n# $sguil-base-dir\/YYYY-MM-DD\/$filename.&lt;timestamp&gt;<br \/>\n#<br \/>\n# By default all packets are logged except:<br \/>\n# &#8211; TCP streams beyond stream.reassembly.depth<br \/>\n# &#8211; encrypted streams after the key exchange<br \/>\n#<br \/>\n&#8211; pcap-log:<br \/>\nenabled: no<br \/>\nfilename: log.pcap<\/p>\n<p># File size limit. Can be specified in kb, mb, gb. Just a number<br \/>\n# is parsed as bytes.<br \/>\nlimit: 1000mb<\/p>\n<p># If set to a value will enable ring buffer mode. Will keep Maximum of &#8220;max-files&#8221; of size &#8220;limit&#8221;<br \/>\nmax-files: 2000<\/p>\n<p>mode: normal # normal, multi or sguil.<\/p>\n<p># Directory to place pcap files. If not provided the default log<br \/>\n# directory will be used. Required for &#8220;sguil&#8221; mode.<br \/>\n#dir: \/nsm_data\/<\/p>\n<p>#ts-format: usec # sec or usec second format (default) is filename.sec usec is filename.sec.usec<br \/>\nuse-stream-depth: no #If set to &#8220;yes&#8221; packets seen after reaching stream inspection depth are ignored. &#8220;no&#8221; logs all packets<br \/>\nhonor-pass-rules: no # If set to &#8220;yes&#8221;, flows in which a pass rule matched will stopped being logged.<\/p>\n<p># a full alerts log containing much information for signature writers<br \/>\n# or for investigating suspected false positives.<br \/>\n&#8211; alert-debug:<br \/>\nenabled: no<br \/>\nfilename: alert-debug.log<br \/>\nappend: yes<br \/>\n#filetype: regular # &#8216;regular&#8217;, &#8216;unix_stream&#8217; or &#8216;unix_dgram&#8217;<\/p>\n<p># alert output to prelude (http:\/\/www.prelude-technologies.com\/) only<br \/>\n# available if Suricata has been compiled with &#8211;enable-prelude<br \/>\n&#8211; alert-prelude:<br \/>\nenabled: no<br \/>\nprofile: suricata<br \/>\nlog-packet-content: no<br \/>\nlog-packet-header: yes<\/p>\n<p># Stats.log contains data from various counters of the suricata engine.<br \/>\n&#8211; stats:<br \/>\nenabled: yes<br \/>\nfilename: stats.log<br \/>\ntotals: yes # stats for all threads merged together<br \/>\nthreads: no # per thread stats<br \/>\n#null-values: yes # print counters that have value 0<\/p>\n<p># a line based alerts log similar to fast.log into syslog<br \/>\n&#8211; syslog:<br \/>\nenabled: yes<br \/>\n# reported identity to syslog. If ommited the program name (usually<br \/>\n# suricata) will be used.<br \/>\nidentity: &#8220;suricata&#8221;<br \/>\nfacility: local5<br \/>\n#level: Info ## possible levels: Emergency, Alert, Critical,<br \/>\n## Error, Warning, Notice, Info, Debug<\/p>\n<p># a line based information for dropped packets in IPS mode<br \/>\n&#8211; drop:<br \/>\nenabled: no<br \/>\nfilename: drop.log<br \/>\nappend: yes<br \/>\n#filetype: regular # &#8216;regular&#8217;, &#8216;unix_stream&#8217; or &#8216;unix_dgram&#8217;<\/p>\n<p># output module to store extracted files to disk<br \/>\n#<br \/>\n# The files are stored to the log-dir in a format &#8220;file.&lt;id&gt;&#8221; where &lt;id&gt; is<br \/>\n# an incrementing number starting at 1. For each file &#8220;file.&lt;id&gt;&#8221; a meta<br \/>\n# file &#8220;file.&lt;id&gt;.meta&#8221; is created.<br \/>\n#<br \/>\n# File extraction depends on a lot of things to be fully done:<br \/>\n# &#8211; file-store stream-depth. For optimal results, set this to 0 (unlimited)<br \/>\n# &#8211; http request \/ response body sizes. Again set to 0 for optimal results.<br \/>\n# &#8211; rules that contain the &#8220;filestore&#8221; keyword.<br \/>\n&#8211; file-store:<br \/>\nenabled: no # set to yes to enable<br \/>\nlog-dir: files # directory to store the files<br \/>\nforce-magic: no # force logging magic on all stored files<br \/>\n# force logging of checksums, available hash functions are md5,<br \/>\n# sha1 and sha256<br \/>\n#force-hash: [md5]<br \/>\nforce-filestore: no # force storing of all files<br \/>\n# override global stream-depth for sessions in which we want to<br \/>\n# perform file extraction. Set to 0 for unlimited.<br \/>\n#stream-depth: 0<br \/>\n#waldo: file.waldo # waldo file to store the file_id across runs<\/p>\n<p># output module to log files tracked in a easily parsable json format<br \/>\n&#8211; file-log:<br \/>\nenabled: no<br \/>\nfilename: files-json.log<br \/>\nappend: yes<br \/>\n#filetype: regular # &#8216;regular&#8217;, &#8216;unix_stream&#8217; or &#8216;unix_dgram&#8217;<\/p>\n<p>force-magic: no # force logging magic on all logged files<br \/>\n# force logging of checksums, available hash functions are md5,<br \/>\n# sha1 and sha256<br \/>\n#force-hash: [md5]<\/p>\n<p># Log TCP data after stream normalization<br \/>\n# 2 types: file or dir. File logs into a single logfile. Dir creates<br \/>\n# 2 files per TCP session and stores the raw TCP data into them.<br \/>\n# Using &#8216;both&#8217; will enable both file and dir modes.<br \/>\n#<br \/>\n# Note: limited by stream.depth<br \/>\n&#8211; tcp-data:<br \/>\nenabled: no<br \/>\ntype: file<br \/>\nfilename: tcp-data.log<\/p>\n<p># Log HTTP body data after normalization, dechunking and unzipping.<br \/>\n# 2 types: file or dir. File logs into a single logfile. Dir creates<br \/>\n# 2 files per HTTP session and stores the normalized data into them.<br \/>\n# Using &#8216;both&#8217; will enable both file and dir modes.<br \/>\n#<br \/>\n# Note: limited by the body limit settings<br \/>\n&#8211; http-body-data:<br \/>\nenabled: no<br \/>\ntype: file<br \/>\nfilename: http-data.log<\/p>\n<p># Lua Output Support &#8211; execute lua script to generate alert and event<br \/>\n# output.<br \/>\n# Documented at:<br \/>\n# https:\/\/redmine.openinfosecfoundation.org\/projects\/suricata\/wiki\/Lua_Output<br \/>\n&#8211; lua:<br \/>\nenabled: no<br \/>\n#scripts-dir: \/etc\/suricata\/lua-output\/<br \/>\nscripts:<br \/>\n# &#8211; script1.lua<\/p>\n<p># Logging configuration. This is not about logging IDS alerts\/events, but<br \/>\n# output about what Suricata is doing, like startup messages, errors, etc.<br \/>\nlogging:<br \/>\n# The default log level, can be overridden in an output section.<br \/>\n# Note that debug level logging will only be emitted if Suricata was<br \/>\n# compiled with the &#8211;enable-debug configure option.<br \/>\n#<br \/>\n# This value is overriden by the SC_LOG_LEVEL env var.<br \/>\ndefault-log-level: notice<\/p>\n<p># The default output format. Optional parameter, should default to<br \/>\n# something reasonable if not provided. Can be overriden in an<br \/>\n# output section. You can leave this out to get the default.<br \/>\n#<br \/>\n# This value is overriden by the SC_LOG_FORMAT env var.<br \/>\n#default-log-format: &#8220;[%i] %t &#8211; (%f:%l) &lt;%d&gt; (%n) &#8212; &#8221;<\/p>\n<p># A regex to filter output. Can be overridden in an output section.<br \/>\n# Defaults to empty (no filter).<br \/>\n#<br \/>\n# This value is overriden by the SC_LOG_OP_FILTER env var.<br \/>\ndefault-output-filter:<\/p>\n<p># Define your logging outputs. If none are defined, or they are all<br \/>\n# disabled you will get the default &#8211; console output.<br \/>\noutputs:<br \/>\n&#8211; console:<br \/>\nenabled: yes<br \/>\n# type: json<br \/>\n&#8211; file:<br \/>\nenabled: yes<br \/>\nlevel: info<br \/>\nfilename: \/var\/log\/suricata\/suricata.log<br \/>\n# type: json<br \/>\n&#8211; syslog:<br \/>\nenabled: no<br \/>\nfacility: local5<br \/>\nformat: &#8220;[%i] &lt;%d&gt; &#8212; &#8221;<br \/>\n# type: json<\/p>\n<p>##<br \/>\n## Step 4: configure common capture settings<br \/>\n##<br \/>\n## See &#8220;Advanced Capture Options&#8221; below for more options, including NETMAP<br \/>\n## and PF_RING.<br \/>\n##<\/p>\n<p># Linux high speed capture support<br \/>\naf-packet:<br \/>\n&#8211; interface: eth0<br \/>\n# Number of receive threads. &#8220;auto&#8221; uses the number of cores<br \/>\n#threads: auto<br \/>\n# Default clusterid. AF_PACKET will load balance packets based on flow.<br \/>\ncluster-id: 99<br \/>\n# Default AF_PACKET cluster type. AF_PACKET can load balance per flow or per hash.<br \/>\n# This is only supported for Linux kernel &gt; 3.1<br \/>\n# possible value are:<br \/>\n# * cluster_round_robin: round robin load balancing<br \/>\n# * cluster_flow: all packets of a given flow are send to the same socket<br \/>\n# * cluster_cpu: all packets treated in kernel by a CPU are send to the same socket<br \/>\n# * cluster_qm: all packets linked by network card to a RSS queue are sent to the same<br \/>\n# socket. Requires at least Linux 3.14.<br \/>\n# * cluster_random: packets are sent randomly to sockets but with an equipartition.<br \/>\n# Requires at least Linux 3.14.<br \/>\n# * cluster_rollover: kernel rotates between sockets filling each socket before moving<br \/>\n# to the next. Requires at least Linux 3.10.<br \/>\n# Recommended modes are cluster_flow on most boxes and cluster_cpu or cluster_qm on system<br \/>\n# with capture card using RSS (require cpu affinity tuning and system irq tuning)<br \/>\ncluster-type: cluster_flow<br \/>\n# In some fragmentation case, the hash can not be computed. If &#8220;defrag&#8221; is set<br \/>\n# to yes, the kernel will do the needed defragmentation before sending the packets.<br \/>\ndefrag: yes<br \/>\n# After Linux kernel 3.10 it is possible to activate the rollover option: if a socket is<br \/>\n# full then kernel will send the packet on the next socket with room available. This option<br \/>\n# can minimize packet drop and increase the treated bandwidth on single intensive flow.<br \/>\n#rollover: yes<br \/>\n# To use the ring feature of AF_PACKET, set &#8216;use-mmap&#8217; to yes<br \/>\n#use-mmap: yes<br \/>\n# Lock memory map to avoid it goes to swap. Be careful that over suscribing could lock<br \/>\n# your system<br \/>\n#mmap-locked: yes<br \/>\n# Use experimental tpacket_v3 capture mode, only active if use-mmap is true<br \/>\n#tpacket-v3: yes<br \/>\n# Ring size will be computed with respect to max_pending_packets and number<br \/>\n# of threads. You can set manually the ring size in number of packets by setting<br \/>\n# the following value. If you are using flow cluster-type and have really network<br \/>\n# intensive single-flow you could want to set the ring-size independently of the number<br \/>\n# of threads:<br \/>\n#ring-size: 2048<br \/>\n# Block size is used by tpacket_v3 only. It should set to a value high enough to contain<br \/>\n# a decent number of packets. Size is in bytes so please consider your MTU. It should be<br \/>\n# a power of 2 and it must be multiple of page size (usually 4096).<br \/>\n#block-size: 32768<br \/>\n# tpacket_v3 block timeout: an open block is passed to userspace if it is not<br \/>\n# filled after block-timeout milliseconds.<br \/>\n#block-timeout: 10<br \/>\n# On busy system, this could help to set it to yes to recover from a packet drop<br \/>\n# phase. This will result in some packets (at max a ring flush) being non treated.<br \/>\n#use-emergency-flush: yes<br \/>\n# recv buffer size, increase value could improve performance<br \/>\n# buffer-size: 32768<br \/>\n# Set to yes to disable promiscuous mode<br \/>\n# disable-promisc: no<br \/>\n# Choose checksum verification mode for the interface. At the moment<br \/>\n# of the capture, some packets may be with an invalid checksum due to<br \/>\n# offloading to the network card of the checksum computation.<br \/>\n# Possible values are:<br \/>\n# &#8211; kernel: use indication sent by kernel for each packet (default)<br \/>\n# &#8211; yes: checksum validation is forced<br \/>\n# &#8211; no: checksum validation is disabled<br \/>\n# &#8211; auto: suricata uses a statistical approach to detect when<br \/>\n# checksum off-loading is used.<br \/>\n# Warning: &#8216;checksum-validation&#8217; must be set to yes to have any validation<br \/>\n#checksum-checks: kernel<br \/>\n# BPF filter to apply to this interface. The pcap filter syntax apply here.<br \/>\n#bpf-filter: port 80 or udp<br \/>\n# You can use the following variables to activate AF_PACKET tap or IPS mode.<br \/>\n# If copy-mode is set to ips or tap, the traffic coming to the current<br \/>\n# interface will be copied to the copy-iface interface. If &#8216;tap&#8217; is set, the<br \/>\n# copy is complete. If &#8216;ips&#8217; is set, the packet matching a &#8216;drop&#8217; action<br \/>\n# will not be copied.<br \/>\n#copy-mode: ips<br \/>\n#copy-iface: eth1<\/p>\n<p># Put default values here. These will be used for an interface that is not<br \/>\n# in the list above.<br \/>\n&#8211; interface: default<br \/>\n#threads: auto<br \/>\n#use-mmap: no<br \/>\n#rollover: yes<br \/>\n#tpacket-v3: yes<\/p>\n<p># Cross platform libpcap capture support<br \/>\npcap:<br \/>\n&#8211; interface: eth0<br \/>\n# On Linux, pcap will try to use mmaped capture and will use buffer-size<br \/>\n# as total of memory used by the ring. So set this to something bigger<br \/>\n# than 1% of your bandwidth.<br \/>\n#buffer-size: 16777216<br \/>\n#bpf-filter: &#8220;tcp and port 25&#8221;<br \/>\n# Choose checksum verification mode for the interface. At the moment<br \/>\n# of the capture, some packets may be with an invalid checksum due to<br \/>\n# offloading to the network card of the checksum computation.<br \/>\n# Possible values are:<br \/>\n# &#8211; yes: checksum validation is forced<br \/>\n# &#8211; no: checksum validation is disabled<br \/>\n# &#8211; auto: suricata uses a statistical approach to detect when<br \/>\n# checksum off-loading is used. (default)<br \/>\n# Warning: &#8216;checksum-validation&#8217; must be set to yes to have any validation<br \/>\n#checksum-checks: auto<br \/>\n# With some accelerator cards using a modified libpcap (like myricom), you<br \/>\n# may want to have the same number of capture threads as the number of capture<br \/>\n# rings. In this case, set up the threads variable to N to start N threads<br \/>\n# listening on the same interface.<br \/>\n#threads: 16<br \/>\n# set to no to disable promiscuous mode:<br \/>\n#promisc: no<br \/>\n# set snaplen, if not set it defaults to MTU if MTU can be known<br \/>\n# via ioctl call and to full capture if not.<br \/>\n#snaplen: 1518<br \/>\n# Put default values here<br \/>\n&#8211; interface: default<br \/>\n#checksum-checks: auto<\/p>\n<p># Settings for reading pcap files<br \/>\npcap-file:<br \/>\n# Possible values are:<br \/>\n# &#8211; yes: checksum validation is forced<br \/>\n# &#8211; no: checksum validation is disabled<br \/>\n# &#8211; auto: suricata uses a statistical approach to detect when<br \/>\n# checksum off-loading is used. (default)<br \/>\n# Warning: &#8216;checksum-validation&#8217; must be set to yes to have checksum tested<br \/>\nchecksum-checks: auto<\/p>\n<p># See &#8220;Advanced Capture Options&#8221; below for more options, including NETMAP<br \/>\n# and PF_RING.<\/p>\n<p>##<br \/>\n## Step 5: App Layer Protocol Configuration<br \/>\n##<\/p>\n<p># Configure the app-layer parsers. The protocols section details each<br \/>\n# protocol.<br \/>\n#<br \/>\n# The option &#8220;enabled&#8221; takes 3 values &#8211; &#8220;yes&#8221;, &#8220;no&#8221;, &#8220;detection-only&#8221;.<br \/>\n# &#8220;yes&#8221; enables both detection and the parser, &#8220;no&#8221; disables both, and<br \/>\n# &#8220;detection-only&#8221; enables protocol detection only (parser disabled).<br \/>\napp-layer:<br \/>\nprotocols:<br \/>\ntls:<br \/>\nenabled: yes<br \/>\ndetection-ports:<br \/>\ndp: 443<\/p>\n<p># Completely stop processing TLS\/SSL session after the handshake<br \/>\n# completed. If bypass is enabled this will also trigger flow<br \/>\n# bypass. If disabled (the default), TLS\/SSL session is still<br \/>\n# tracked for Heartbleed and other anomalies.<br \/>\n#no-reassemble: yes<br \/>\ndcerpc:<br \/>\nenabled: yes<br \/>\nftp:<br \/>\nenabled: yes<br \/>\nssh:<br \/>\nenabled: yes<br \/>\nsmtp:<br \/>\nenabled: yes<br \/>\n# Configure SMTP-MIME Decoder<br \/>\nmime:<br \/>\n# Decode MIME messages from SMTP transactions<br \/>\n# (may be resource intensive)<br \/>\n# This field supercedes all others because it turns the entire<br \/>\n# process on or off<br \/>\ndecode-mime: yes<\/p>\n<p># Decode MIME entity bodies (ie. base64, quoted-printable, etc.)<br \/>\ndecode-base64: yes<br \/>\ndecode-quoted-printable: yes<\/p>\n<p># Maximum bytes per header data value stored in the data structure<br \/>\n# (default is 2000)<br \/>\nheader-value-depth: 2000<\/p>\n<p># Extract URLs and save in state data structure<br \/>\nextract-urls: yes<br \/>\n# Set to yes to compute the md5 of the mail body. You will then<br \/>\n# be able to journalize it.<br \/>\nbody-md5: no<br \/>\n# Configure inspected-tracker for file_data keyword<br \/>\ninspected-tracker:<br \/>\ncontent-limit: 100000<br \/>\ncontent-inspect-min-size: 32768<br \/>\ncontent-inspect-window: 4096<br \/>\nimap:<br \/>\nenabled: detection-only<br \/>\nmsn:<br \/>\nenabled: detection-only<br \/>\nsmb:<br \/>\nenabled: yes<br \/>\ndetection-ports:<br \/>\ndp: 139, 445<br \/>\n# smb2 detection is disabled internally inside the engine.<br \/>\n#smb2:<br \/>\n# enabled: yes<br \/>\ndns:<br \/>\n# memcaps. Globally and per flow\/state.<br \/>\n#global-memcap: 16mb<br \/>\n#state-memcap: 512kb<\/p>\n<p># How many unreplied DNS requests are considered a flood.<br \/>\n# If the limit is reached, app-layer-event:dns.flooded; will match.<br \/>\n#request-flood: 500<\/p>\n<p>tcp:<br \/>\nenabled: yes<br \/>\ndetection-ports:<br \/>\ndp: 53<br \/>\nudp:<br \/>\nenabled: yes<br \/>\ndetection-ports:<br \/>\ndp: 53<br \/>\nhttp:<br \/>\nenabled: yes<br \/>\n# memcap: 64mb<\/p>\n<p># default-config: Used when no server-config matches<br \/>\n# personality: List of personalities used by default<br \/>\n# request-body-limit: Limit reassembly of request body for inspection<br \/>\n# by http_client_body &amp; pcre \/P option.<br \/>\n# response-body-limit: Limit reassembly of response body for inspection<br \/>\n# by file_data, http_server_body &amp; pcre \/Q option.<br \/>\n# double-decode-path: Double decode path section of the URI<br \/>\n# double-decode-query: Double decode query section of the URI<br \/>\n# response-body-decompress-layer-limit:<br \/>\n# Limit to how many layers of compression will be<br \/>\n# decompressed. Defaults to 2.<br \/>\n#<br \/>\n# server-config: List of server configurations to use if address matches<br \/>\n# address: List of ip addresses or networks for this block<br \/>\n# personalitiy: List of personalities used by this block<br \/>\n# request-body-limit: Limit reassembly of request body for inspection<br \/>\n# by http_client_body &amp; pcre \/P option.<br \/>\n# response-body-limit: Limit reassembly of response body for inspection<br \/>\n# by file_data, http_server_body &amp; pcre \/Q option.<br \/>\n# double-decode-path: Double decode path section of the URI<br \/>\n# double-decode-query: Double decode query section of the URI<br \/>\n#<br \/>\n# uri-include-all: Include all parts of the URI. By default the<br \/>\n# &#8216;scheme&#8217;, username\/password, hostname and port<br \/>\n# are excluded. Setting this option to true adds<br \/>\n# all of them to the normalized uri as inspected<br \/>\n# by http_uri, urilen, pcre with \/U and the other<br \/>\n# keywords that inspect the normalized uri.<br \/>\n# Note that this does not affect http_raw_uri.<br \/>\n# Also, note that including all was the default in<br \/>\n# 1.4 and 2.0beta1.<br \/>\n#<br \/>\n# meta-field-limit: Hard size limit for request and response size<br \/>\n# limits. Applies to request line and headers,<br \/>\n# response line and headers. Does not apply to<br \/>\n# request or response bodies. Default is 18k.<br \/>\n# If this limit is reached an event is raised.<br \/>\n#<br \/>\n# Currently Available Personalities:<br \/>\n# Minimal, Generic, IDS (default), IIS_4_0, IIS_5_0, IIS_5_1, IIS_6_0,<br \/>\n# IIS_7_0, IIS_7_5, Apache_2<br \/>\nlibhtp:<br \/>\ndefault-config:<br \/>\npersonality: IDS<\/p>\n<p># Can be specified in kb, mb, gb. Just a number indicates<br \/>\n# it&#8217;s in bytes.<br \/>\nrequest-body-limit: 100kb<br \/>\nresponse-body-limit: 100kb<\/p>\n<p># inspection limits<br \/>\nrequest-body-minimal-inspect-size: 32kb<br \/>\nrequest-body-inspect-window: 4kb<br \/>\nresponse-body-minimal-inspect-size: 40kb<br \/>\nresponse-body-inspect-window: 16kb<\/p>\n<p># response body decompression (0 disables)<br \/>\nresponse-body-decompress-layer-limit: 2<\/p>\n<p># auto will use http-body-inline mode in IPS mode, yes or no set it statically<br \/>\nhttp-body-inline: auto<\/p>\n<p># Take a random value for inspection sizes around the specified value.<br \/>\n# This lower the risk of some evasion technics but could lead<br \/>\n# detection change between runs. It is set to &#8216;yes&#8217; by default.<br \/>\n#randomize-inspection-sizes: yes<br \/>\n# If randomize-inspection-sizes is active, the value of various<br \/>\n# inspection size will be choosen in the [1 &#8211; range%, 1 + range%]<br \/>\n# range<br \/>\n# Default value of randomize-inspection-range is 10.<br \/>\n#randomize-inspection-range: 10<\/p>\n<p># decoding<br \/>\ndouble-decode-path: no<br \/>\ndouble-decode-query: no<\/p>\n<p>server-config:<\/p>\n<p>#- apache:<br \/>\n# address: [192.168.1.0\/24, 127.0.0.0\/8, &#8220;::1&#8221;]<br \/>\n# personality: Apache_2<br \/>\n# # Can be specified in kb, mb, gb. Just a number indicates<br \/>\n# # it&#8217;s in bytes.<br \/>\n# request-body-limit: 4096<br \/>\n# response-body-limit: 4096<br \/>\n# double-decode-path: no<br \/>\n# double-decode-query: no<\/p>\n<p>#- iis7:<br \/>\n# address:<br \/>\n# &#8211; 192.168.0.0\/24<br \/>\n# &#8211; 192.168.10.0\/24<br \/>\n# personality: IIS_7_0<br \/>\n# # Can be specified in kb, mb, gb. Just a number indicates<br \/>\n# # it&#8217;s in bytes.<br \/>\n# request-body-limit: 4096<br \/>\n# response-body-limit: 4096<br \/>\n# double-decode-path: no<br \/>\n# double-decode-query: no<\/p>\n<p># Note: Modbus probe parser is minimalist due to the poor significant field<br \/>\n# Only Modbus message length (greater than Modbus header length)<br \/>\n# And Protocol ID (equal to 0) are checked in probing parser<br \/>\n# It is important to enable detection port and define Modbus port<br \/>\n# to avoid false positive<br \/>\nmodbus:<br \/>\n# How many unreplied Modbus requests are considered a flood.<br \/>\n# If the limit is reached, app-layer-event:modbus.flooded; will match.<br \/>\n#request-flood: 500<\/p>\n<p>enabled: no<br \/>\ndetection-ports:<br \/>\ndp: 502<br \/>\n# According to MODBUS Messaging on TCP\/IP Implementation Guide V1.0b, it<br \/>\n# is recommended to keep the TCP connection opened with a remote device<br \/>\n# and not to open and close it for each MODBUS\/TCP transaction. In that<br \/>\n# case, it is important to set the depth of the stream reassembling as<br \/>\n# unlimited (stream.reassembly.depth: 0)<\/p>\n<p># Stream reassembly size for modbus. By default track it completely.<br \/>\nstream-depth: 0<\/p>\n<p># DNP3<br \/>\ndnp3:<br \/>\nenabled: no<br \/>\ndetection-ports:<br \/>\ndp: 20000<\/p>\n<p># SCADA EtherNet\/IP and CIP protocol support<br \/>\nenip:<br \/>\nenabled: no<br \/>\ndetection-ports:<br \/>\ndp: 44818<br \/>\nsp: 44818<\/p>\n<p># Limit for the maximum number of asn1 frames to decode (default 256)<br \/>\nasn1-max-frames: 256<\/p>\n<p>##############################################################################<br \/>\n##<br \/>\n## Advanced settings below<br \/>\n##<br \/>\n##############################################################################<\/p>\n<p>##<br \/>\n## Run Options<br \/>\n##<\/p>\n<p># Run suricata as user and group.<br \/>\n#run-as:<br \/>\n# user: suri<br \/>\n# group: suri<\/p>\n<p># Some logging module will use that name in event as identifier. The default<br \/>\n# value is the hostname<br \/>\n#sensor-name: suricata<\/p>\n<p># Default pid file.<br \/>\n# Will use this file if no &#8211;pidfile in command options.<br \/>\n#pid-file: \/var\/run\/suricata.pid<\/p>\n<p># Daemon working directory<br \/>\n# Suricata will change directory to this one if provided<br \/>\n# Default: &#8220;\/&#8221;<br \/>\n#daemon-directory: &#8220;\/&#8221;<\/p>\n<p># Suricata core dump configuration. Limits the size of the core dump file to<br \/>\n# approximately max-dump. The actual core dump size will be a multiple of the<br \/>\n# page size. Core dumps that would be larger than max-dump are truncated. On<br \/>\n# Linux, the actual core dump size may be a few pages larger than max-dump.<br \/>\n# Setting max-dump to 0 disables core dumping.<br \/>\n# Setting max-dump to &#8216;unlimited&#8217; will give the full core dump file.<br \/>\n# On 32-bit Linux, a max-dump value &gt;= ULONG_MAX may cause the core dump size<br \/>\n# to be &#8216;unlimited&#8217;.<\/p>\n<p>coredump:<br \/>\nmax-dump: unlimited<\/p>\n<p># If suricata box is a router for the sniffed networks, set it to &#8216;router&#8217;. If<br \/>\n# it is a pure sniffing setup, set it to &#8216;sniffer-only&#8217;.<br \/>\n# If set to auto, the variable is internally switch to &#8216;router&#8217; in IPS mode<br \/>\n# and &#8216;sniffer-only&#8217; in IDS mode.<br \/>\n# This feature is currently only used by the reject* keywords.<br \/>\nhost-mode: auto<\/p>\n<p># Number of packets preallocated per thread. The default is 1024. A higher number<br \/>\n# will make sure each CPU will be more easily kept busy, but may negatively<br \/>\n# impact caching.<br \/>\n#<br \/>\n# If you are using the CUDA pattern matcher (mpm-algo: ac-cuda), different rules<br \/>\n# apply. In that case try something like 60000 or more. This is because the CUDA<br \/>\n# pattern matcher buffers and scans as many packets as possible in parallel.<br \/>\nmax-pending-packets: 1024<\/p>\n<p># Runmode the engine should use. Please check &#8211;list-runmodes to get the available<br \/>\n# runmodes for each packet acquisition method. Defaults to &#8220;autofp&#8221; (auto flow pinned<br \/>\n# load balancing).<br \/>\nrunmode: autofp<\/p>\n<p># Specifies the kind of flow load balancer used by the flow pinned autofp mode.<br \/>\n#<br \/>\n# Supported schedulers are:<br \/>\n#<br \/>\n# round-robin &#8211; Flows assigned to threads in a round robin fashion.<br \/>\n# active-packets &#8211; Flows assigned to threads that have the lowest number of<br \/>\n# unprocessed packets (default).<br \/>\n# hash &#8211; Flow alloted usihng the address hash. More of a random<br \/>\n# technique. Was the default in Suricata 1.2.1 and older.<br \/>\n#<br \/>\nautofp-scheduler: active-packets<\/p>\n<p># Preallocated size for packet. Default is 1514 which is the classical<br \/>\n# size for pcap on ethernet. You should adjust this value to the highest<br \/>\n# packet size (MTU + hardware header) on your system.<br \/>\ndefault-packet-size: 1514<\/p>\n<p># Unix command socket can be used to pass commands to suricata.<br \/>\n# An external tool can then connect to get information from suricata<br \/>\n# or trigger some modifications of the engine. Set enabled to yes<br \/>\n# to activate the feature. In auto mode, the feature will only be<br \/>\n# activated in live capture mode. You can use the filename variable to set<br \/>\n# the file name of the socket.<br \/>\nunix-command:<br \/>\nenabled: no<br \/>\n# filename: \/var\/run\/suricata-command.socket<\/p>\n<p># Magic file. The extension .mgc is added to the value here.<br \/>\n#magic-file: \/usr\/share\/file\/magic<br \/>\n#magic-file:<\/p>\n<p>legacy:<br \/>\nuricontent: enabled<\/p>\n<p>##<br \/>\n## Detection settings<br \/>\n##<\/p>\n<p># Set the order of alerts bassed on actions<br \/>\n# The default order is pass, drop, reject, alert<br \/>\n# action-order:<br \/>\n# &#8211; pass<br \/>\n# &#8211; drop<br \/>\n# &#8211; reject<br \/>\n# &#8211; alert<\/p>\n<p># IP Reputation<br \/>\n#reputation-categories-file: \/etc\/suricata\/iprep\/categories.txt<br \/>\n#default-reputation-path: \/etc\/suricata\/iprep<br \/>\n#reputation-files:<br \/>\n# &#8211; reputation.list<\/p>\n<p># When run with the option &#8211;engine-analysis, the engine will read each of<br \/>\n# the parameters below, and print reports for each of the enabled sections<br \/>\n# and exit. The reports are printed to a file in the default log dir<br \/>\n# given by the parameter &#8220;default-log-dir&#8221;, with engine reporting<br \/>\n# subsection below printing reports in its own report file.<br \/>\nengine-analysis:<br \/>\n# enables printing reports for fast-pattern for every rule.<br \/>\nrules-fast-pattern: yes<br \/>\n# enables printing reports for each rule<br \/>\nrules: yes<\/p>\n<p>#recursion and match limits for PCRE where supported<br \/>\npcre:<br \/>\nmatch-limit: 3500<br \/>\nmatch-limit-recursion: 1500<\/p>\n<p>##<br \/>\n## Advanced Traffic Tracking and Reconstruction Settings<br \/>\n##<\/p>\n<p># Host specific policies for defragmentation and TCP stream<br \/>\n# reassembly. The host OS lookup is done using a radix tree, just<br \/>\n# like a routing table so the most specific entry matches.<br \/>\nhost-os-policy:<br \/>\n# Make the default policy windows.<br \/>\nwindows: [0.0.0.0\/0]<br \/>\nbsd: []<br \/>\nbsd-right: []<br \/>\nold-linux: []<br \/>\nlinux: []<br \/>\nold-solaris: []<br \/>\nsolaris: []<br \/>\nhpux10: []<br \/>\nhpux11: []<br \/>\nirix: []<br \/>\nmacos: []<br \/>\nvista: []<br \/>\nwindows2k3: []<\/p>\n<p># Defrag settings:<\/p>\n<p>defrag:<br \/>\nmemcap: 32mb<br \/>\nhash-size: 65536<br \/>\ntrackers: 65535 # number of defragmented flows to follow<br \/>\nmax-frags: 65535 # number of fragments to keep (higher than trackers)<br \/>\nprealloc: yes<br \/>\ntimeout: 60<\/p>\n<p># Enable defrag per host settings<br \/>\n# host-config:<br \/>\n#<br \/>\n# &#8211; dmz:<br \/>\n# timeout: 30<br \/>\n# address: [192.168.1.0\/24, 127.0.0.0\/8, 1.1.1.0\/24, 2.2.2.0\/24, &#8220;1.1.1.1&#8221;, &#8220;2.2.2.2&#8221;, &#8220;::1&#8221;]<br \/>\n#<br \/>\n# &#8211; lan:<br \/>\n# timeout: 45<br \/>\n# address:<br \/>\n# &#8211; 192.168.0.0\/24<br \/>\n# &#8211; 192.168.10.0\/24<br \/>\n# &#8211; 172.16.14.0\/24<\/p>\n<p># Flow settings:<br \/>\n# By default, the reserved memory (memcap) for flows is 32MB. This is the limit<br \/>\n# for flow allocation inside the engine. You can change this value to allow<br \/>\n# more memory usage for flows.<br \/>\n# The hash-size determine the size of the hash used to identify flows inside<br \/>\n# the engine, and by default the value is 65536.<br \/>\n# At the startup, the engine can preallocate a number of flows, to get a better<br \/>\n# performance. The number of flows preallocated is 10000 by default.<br \/>\n# emergency-recovery is the percentage of flows that the engine need to<br \/>\n# prune before unsetting the emergency state. The emergency state is activated<br \/>\n# when the memcap limit is reached, allowing to create new flows, but<br \/>\n# prunning them with the emergency timeouts (they are defined below).<br \/>\n# If the memcap is reached, the engine will try to prune flows<br \/>\n# with the default timeouts. If it doens&#8217;t find a flow to prune, it will set<br \/>\n# the emergency bit and it will try again with more agressive timeouts.<br \/>\n# If that doesn&#8217;t work, then it will try to kill the last time seen flows<br \/>\n# not in use.<br \/>\n# The memcap can be specified in kb, mb, gb. Just a number indicates it&#8217;s<br \/>\n# in bytes.<\/p>\n<p>flow:<br \/>\nmemcap: 128mb<br \/>\nhash-size: 65536<br \/>\nprealloc: 10000<br \/>\nemergency-recovery: 30<br \/>\n#managers: 1 # default to one flow manager<br \/>\n#recyclers: 1 # default to one flow recycler thread<\/p>\n<p># This option controls the use of vlan ids in the flow (and defrag)<br \/>\n# hashing. Normally this should be enabled, but in some (broken)<br \/>\n# setups where both sides of a flow are not tagged with the same vlan<br \/>\n# tag, we can ignore the vlan id&#8217;s in the flow hashing.<br \/>\nvlan:<br \/>\nuse-for-tracking: true<\/p>\n<p># Specific timeouts for flows. Here you can specify the timeouts that the<br \/>\n# active flows will wait to transit from the current state to another, on each<br \/>\n# protocol. The value of &#8220;new&#8221; determine the seconds to wait after a hanshake or<br \/>\n# stream startup before the engine free the data of that flow it doesn&#8217;t<br \/>\n# change the state to established (usually if we don&#8217;t receive more packets<br \/>\n# of that flow). The value of &#8220;established&#8221; is the amount of<br \/>\n# seconds that the engine will wait to free the flow if it spend that amount<br \/>\n# without receiving new packets or closing the connection. &#8220;closed&#8221; is the<br \/>\n# amount of time to wait after a flow is closed (usually zero). &#8220;bypassed&#8221;<br \/>\n# timeout controls locally bypassed flows. For these flows we don&#8217;t do any other<br \/>\n# tracking. If no packets have been seen after this timeout, the flow is discarded.<br \/>\n#<br \/>\n# There&#8217;s an emergency mode that will become active under attack circumstances,<br \/>\n# making the engine to check flow status faster. This configuration variables<br \/>\n# use the prefix &#8220;emergency-&#8221; and work similar as the normal ones.<br \/>\n# Some timeouts doesn&#8217;t apply to all the protocols, like &#8220;closed&#8221;, for udp and<br \/>\n# icmp.<\/p>\n<p>flow-timeouts:<\/p>\n<p>default:<br \/>\nnew: 30<br \/>\nestablished: 300<br \/>\nclosed: 0<br \/>\nbypassed: 100<br \/>\nemergency-new: 10<br \/>\nemergency-established: 100<br \/>\nemergency-closed: 0<br \/>\nemergency-bypassed: 50<br \/>\ntcp:<br \/>\nnew: 60<br \/>\nestablished: 600<br \/>\nclosed: 60<br \/>\nbypassed: 100<br \/>\nemergency-new: 5<br \/>\nemergency-established: 100<br \/>\nemergency-closed: 10<br \/>\nemergency-bypassed: 50<br \/>\nudp:<br \/>\nnew: 30<br \/>\nestablished: 300<br \/>\nbypassed: 100<br \/>\nemergency-new: 10<br \/>\nemergency-established: 100<br \/>\nemergency-bypassed: 50<br \/>\nicmp:<br \/>\nnew: 30<br \/>\nestablished: 300<br \/>\nbypassed: 100<br \/>\nemergency-new: 10<br \/>\nemergency-established: 100<br \/>\nemergency-bypassed: 50<\/p>\n<p># Stream engine settings. Here the TCP stream tracking and reassembly<br \/>\n# engine is configured.<br \/>\n#<br \/>\n# stream:<br \/>\n# memcap: 32mb # Can be specified in kb, mb, gb. Just a<br \/>\n# # number indicates it&#8217;s in bytes.<br \/>\n# checksum-validation: yes # To validate the checksum of received<br \/>\n# # packet. If csum validation is specified as<br \/>\n# # &#8220;yes&#8221;, then packet with invalid csum will not<br \/>\n# # be processed by the engine stream\/app layer.<br \/>\n# # Warning: locally generated trafic can be<br \/>\n# # generated without checksum due to hardware offload<br \/>\n# # of checksum. You can control the handling of checksum<br \/>\n# # on a per-interface basis via the &#8216;checksum-checks&#8217;<br \/>\n# # option<br \/>\n# prealloc-sessions: 2k # 2k sessions prealloc&#8217;d per stream thread<br \/>\n# midstream: false # don&#8217;t allow midstream session pickups<br \/>\n# async-oneside: false # don&#8217;t enable async stream handling<br \/>\n# inline: no # stream inline mode<br \/>\n# max-synack-queued: 5 # Max different SYN\/ACKs to queue<br \/>\n# bypass: no # Bypass packets when stream.depth is reached<br \/>\n#<br \/>\n# reassembly:<br \/>\n# memcap: 64mb # Can be specified in kb, mb, gb. Just a number<br \/>\n# # indicates it&#8217;s in bytes.<br \/>\n# depth: 1mb # Can be specified in kb, mb, gb. Just a number<br \/>\n# # indicates it&#8217;s in bytes.<br \/>\n# toserver-chunk-size: 2560 # inspect raw stream in chunks of at least<br \/>\n# # this size. Can be specified in kb, mb,<br \/>\n# # gb. Just a number indicates it&#8217;s in bytes.<br \/>\n# # The max acceptable size is 4024 bytes.<br \/>\n# toclient-chunk-size: 2560 # inspect raw stream in chunks of at least<br \/>\n# # this size. Can be specified in kb, mb,<br \/>\n# # gb. Just a number indicates it&#8217;s in bytes.<br \/>\n# # The max acceptable size is 4024 bytes.<br \/>\n# randomize-chunk-size: yes # Take a random value for chunk size around the specified value.<br \/>\n# # This lower the risk of some evasion technics but could lead<br \/>\n# # detection change between runs. It is set to &#8216;yes&#8217; by default.<br \/>\n# randomize-chunk-range: 10 # If randomize-chunk-size is active, the value of chunk-size is<br \/>\n# # a random value between (1 &#8211; randomize-chunk-range\/100)*toserver-chunk-size<br \/>\n# # and (1 + randomize-chunk-range\/100)*toserver-chunk-size and the same<br \/>\n# # calculation for toclient-chunk-size.<br \/>\n# # Default value of randomize-chunk-range is 10.<br \/>\n#<br \/>\n# raw: yes # &#8216;Raw&#8217; reassembly enabled or disabled.<br \/>\n# # raw is for content inspection by detection<br \/>\n# # engine.<br \/>\n#<br \/>\n# chunk-prealloc: 250 # Number of preallocated stream chunks. These<br \/>\n# # are used during stream inspection (raw).<br \/>\n# segments: # Settings for reassembly segment pool.<br \/>\n# &#8211; size: 4 # Size of the (data)segment for a pool<br \/>\n# prealloc: 256 # Number of segments to prealloc and keep<br \/>\n# # in the pool.<br \/>\n# zero-copy-size: 128 # This option sets in bytes the value at<br \/>\n# # which segment data is passed to the app<br \/>\n# # layer API directly. Data sizes equal to<br \/>\n# # and higher than the value set are passed<br \/>\n# # on directly.<br \/>\n#<br \/>\nstream:<br \/>\nmemcap: 64mb<br \/>\nchecksum-validation: yes # reject wrong csums<br \/>\ninline: auto # auto will use inline mode in IPS mode, yes or no set it statically<br \/>\nreassembly:<br \/>\nmemcap: 256mb<br \/>\ndepth: 1mb # reassemble 1mb into a stream<br \/>\ntoserver-chunk-size: 2560<br \/>\ntoclient-chunk-size: 2560<br \/>\nrandomize-chunk-size: yes<br \/>\n#randomize-chunk-range: 10<br \/>\n#raw: yes<br \/>\n#chunk-prealloc: 250<br \/>\n#segments:<br \/>\n# &#8211; size: 4<br \/>\n# prealloc: 256<br \/>\n# &#8211; size: 16<br \/>\n# prealloc: 512<br \/>\n# &#8211; size: 112<br \/>\n# prealloc: 512<br \/>\n# &#8211; size: 248<br \/>\n# prealloc: 512<br \/>\n# &#8211; size: 512<br \/>\n# prealloc: 512<br \/>\n# &#8211; size: 768<br \/>\n# prealloc: 1024<br \/>\n# &#8216;from_mtu&#8217; means that the size is mtu &#8211; 40,<br \/>\n# or 1460 if mtu couldn&#8217;t be determined.<br \/>\n# &#8211; size: from_mtu<br \/>\n# prealloc: 1024<br \/>\n# &#8211; size: 65535<br \/>\n# prealloc: 128<br \/>\n#zero-copy-size: 128<\/p>\n<p># Host table:<br \/>\n#<br \/>\n# Host table is used by tagging and per host thresholding subsystems.<br \/>\n#<br \/>\nhost:<br \/>\nhash-size: 4096<br \/>\nprealloc: 1000<br \/>\nmemcap: 32mb<\/p>\n<p># IP Pair table:<br \/>\n#<br \/>\n# Used by xbits &#8216;ippair&#8217; tracking.<br \/>\n#<br \/>\n#ippair:<br \/>\n# hash-size: 4096<br \/>\n# prealloc: 1000<br \/>\n# memcap: 32mb<\/p>\n<p>##<br \/>\n## Performance tuning and profiling<br \/>\n##<\/p>\n<p># The detection engine builds internal groups of signatures. The engine<br \/>\n# allow us to specify the profile to use for them, to manage memory on an<br \/>\n# efficient way keeping a good performance. For the profile keyword you<br \/>\n# can use the words &#8220;low&#8221;, &#8220;medium&#8221;, &#8220;high&#8221; or &#8220;custom&#8221;. If you use custom<br \/>\n# make sure to define the values at &#8220;- custom-values&#8221; as your convenience.<br \/>\n# Usually you would prefer medium\/high\/low.<br \/>\n#<br \/>\n# &#8220;sgh mpm-context&#8221;, indicates how the staging should allot mpm contexts for<br \/>\n# the signature groups. &#8220;single&#8221; indicates the use of a single context for<br \/>\n# all the signature group heads. &#8220;full&#8221; indicates a mpm-context for each<br \/>\n# group head. &#8220;auto&#8221; lets the engine decide the distribution of contexts<br \/>\n# based on the information the engine gathers on the patterns from each<br \/>\n# group head.<br \/>\n#<br \/>\n# The option inspection-recursion-limit is used to limit the recursive calls<br \/>\n# in the content inspection code. For certain payload-sig combinations, we<br \/>\n# might end up taking too much time in the content inspection code.<br \/>\n# If the argument specified is 0, the engine uses an internally defined<br \/>\n# default limit. On not specifying a value, we use no limits on the recursion.<br \/>\ndetect:<br \/>\nprofile: medium<br \/>\ncustom-values:<br \/>\ntoclient-groups: 3<br \/>\ntoserver-groups: 25<br \/>\nsgh-mpm-context: auto<br \/>\ninspection-recursion-limit: 3000<br \/>\n# If set to yes, the loading of signatures will be made after the capture<br \/>\n# is started. This will limit the downtime in IPS mode.<br \/>\n#delayed-detect: yes<\/p>\n<p>prefilter:<br \/>\n# default prefiltering setting. &#8220;mpm&#8221; only creates MPM\/fast_pattern<br \/>\n# engines. &#8220;auto&#8221; also sets up prefilter engines for other keywords.<br \/>\n# Use &#8211;list-keywords=all to see which keywords support prefiltering.<br \/>\ndefault: mpm<\/p>\n<p># the grouping values above control how many groups are created per<br \/>\n# direction. Port whitelisting forces that port to get it&#8217;s own group.<br \/>\n# Very common ports will benefit, as well as ports with many expensive<br \/>\n# rules.<br \/>\ngrouping:<br \/>\n#tcp-whitelist: 53, 80, 139, 443, 445, 1433, 3306, 3389, 6666, 6667, 8080<br \/>\n#udp-whitelist: 53, 135, 5060<\/p>\n<p>profiling:<br \/>\n# Log the rules that made it past the prefilter stage, per packet<br \/>\n# default is off. The threshold setting determines how many rules<br \/>\n# must have made it past pre-filter for that rule to trigger the<br \/>\n# logging.<br \/>\n#inspect-logging-threshold: 200<br \/>\ngrouping:<br \/>\ndump-to-disk: false<br \/>\ninclude-rules: false # very verbose<br \/>\ninclude-mpm-stats: false<\/p>\n<p># Select the multi pattern algorithm you want to run for scan\/search the<br \/>\n# in the engine.<br \/>\n#<br \/>\n# The supported algorithms are:<br \/>\n# &#8220;ac&#8221; &#8211; Aho-Corasick, default implementation<br \/>\n# &#8220;ac-bs&#8221; &#8211; Aho-Corasick, reduced memory implementation<br \/>\n# &#8220;ac-cuda&#8221; &#8211; Aho-Corasick, CUDA implementation<br \/>\n# &#8220;ac-ks&#8221; &#8211; Aho-Corasick, &#8220;Ken Steele&#8221; variant<br \/>\n# &#8220;hs&#8221; &#8211; Hyperscan, available when built with Hyperscan support<br \/>\n#<br \/>\n# The default mpm-algo value of &#8220;auto&#8221; will use &#8220;hs&#8221; if Hyperscan is<br \/>\n# available, &#8220;ac&#8221; otherwise.<br \/>\n#<br \/>\n# The mpm you choose also decides the distribution of mpm contexts for<br \/>\n# signature groups, specified by the conf &#8211; &#8220;detect.sgh-mpm-context&#8221;.<br \/>\n# Selecting &#8220;ac&#8221; as the mpm would require &#8220;detect.sgh-mpm-context&#8221;<br \/>\n# to be set to &#8220;single&#8221;, because of ac&#8217;s memory requirements, unless the<br \/>\n# ruleset is small enough to fit in one&#8217;s memory, in which case one can<br \/>\n# use &#8220;full&#8221; with &#8220;ac&#8221;. Rest of the mpms can be run in &#8220;full&#8221; mode.<br \/>\n#<br \/>\n# There is also a CUDA pattern matcher (only available if Suricata was<br \/>\n# compiled with &#8211;enable-cuda: b2g_cuda. Make sure to update your<br \/>\n# max-pending-packets setting above as well if you use b2g_cuda.<\/p>\n<p>mpm-algo: auto<\/p>\n<p># Select the matching algorithm you want to use for single-pattern searches.<br \/>\n#<br \/>\n# Supported algorithms are &#8220;bm&#8221; (Boyer-Moore) and &#8220;hs&#8221; (Hyperscan, only<br \/>\n# available if Suricata has been built with Hyperscan support).<br \/>\n#<br \/>\n# The default of &#8220;auto&#8221; will use &#8220;hs&#8221; if available, otherwise &#8220;bm&#8221;.<\/p>\n<p>spm-algo: auto<\/p>\n<p># Suricata is multi-threaded. Here the threading can be influenced.<br \/>\nthreading:<br \/>\nset-cpu-affinity: no<br \/>\n# Tune cpu affinity of threads. Each family of threads can be bound<br \/>\n# on specific CPUs.<br \/>\n#<br \/>\n# These 2 apply to the all runmodes:<br \/>\n# management-cpu-set is used for flow timeout handling, counters<br \/>\n# worker-cpu-set is used for &#8216;worker&#8217; threads<br \/>\n#<br \/>\n# Additionally, for autofp these apply:<br \/>\n# receive-cpu-set is used for capture threads<br \/>\n# verdict-cpu-set is used for IPS verdict threads<br \/>\n#<br \/>\ncpu-affinity:<br \/>\n&#8211; management-cpu-set:<br \/>\ncpu: [ 0 ] # include only these cpus in affinity settings<br \/>\n&#8211; receive-cpu-set:<br \/>\ncpu: [ 0 ] # include only these cpus in affinity settings<br \/>\n&#8211; worker-cpu-set:<br \/>\ncpu: [ &#8220;all&#8221; ]<br \/>\nmode: &#8220;exclusive&#8221;<br \/>\n# Use explicitely 3 threads and don&#8217;t compute number by using<br \/>\n# detect-thread-ratio variable:<br \/>\n# threads: 3<br \/>\nprio:<br \/>\nlow: [ 0 ]<br \/>\nmedium: [ &#8220;1-2&#8221; ]<br \/>\nhigh: [ 3 ]<br \/>\ndefault: &#8220;medium&#8221;<br \/>\n#- verdict-cpu-set:<br \/>\n# cpu: [ 0 ]<br \/>\n# prio:<br \/>\n# default: &#8220;high&#8221;<br \/>\n#<br \/>\n# By default Suricata creates one &#8220;detect&#8221; thread per available CPU\/CPU core.<br \/>\n# This setting allows controlling this behaviour. A ratio setting of 2 will<br \/>\n# create 2 detect threads for each CPU\/CPU core. So for a dual core CPU this<br \/>\n# will result in 4 detect threads. If values below 1 are used, less threads<br \/>\n# are created. So on a dual core CPU a setting of 0.5 results in 1 detect<br \/>\n# thread being created. Regardless of the setting at a minimum 1 detect<br \/>\n# thread will always be created.<br \/>\n#<br \/>\ndetect-thread-ratio: 1.0<\/p>\n<p># Luajit has a strange memory requirement, it&#8217;s &#8216;states&#8217; need to be in the<br \/>\n# first 2G of the process&#8217; memory.<br \/>\n#<br \/>\n# &#8216;luajit.states&#8217; is used to control how many states are preallocated.<br \/>\n# State use: per detect script: 1 per detect thread. Per output script: 1 per<br \/>\n# script.<br \/>\nluajit:<br \/>\nstates: 128<\/p>\n<p># Profiling settings. Only effective if Suricata has been built with the<br \/>\n# the &#8211;enable-profiling configure flag.<br \/>\n#<br \/>\nprofiling:<br \/>\n# Run profiling for every xth packet. The default is 1, which means we<br \/>\n# profile every packet. If set to 1000, one packet is profiled for every<br \/>\n# 1000 received.<br \/>\n#sample-rate: 1000<\/p>\n<p># rule profiling<br \/>\nrules:<\/p>\n<p># Profiling can be disabled here, but it will still have a<br \/>\n# performance impact if compiled in.<br \/>\nenabled: yes<br \/>\nfilename: rule_perf.log<br \/>\nappend: yes<\/p>\n<p># Sort options: ticks, avgticks, checks, matches, maxticks<br \/>\nsort: avgticks<\/p>\n<p># Limit the number of items printed at exit (ignored for json).<br \/>\nlimit: 100<\/p>\n<p># output to json<br \/>\njson: yes<\/p>\n<p># per keyword profiling<br \/>\nkeywords:<br \/>\nenabled: yes<br \/>\nfilename: keyword_perf.log<br \/>\nappend: yes<\/p>\n<p># per rulegroup profiling<br \/>\nrulegroups:<br \/>\nenabled: yes<br \/>\nfilename: rule_group_perf.log<br \/>\nappend: yes<\/p>\n<p># packet profiling<br \/>\npackets:<\/p>\n<p># Profiling can be disabled here, but it will still have a<br \/>\n# performance impact if compiled in.<br \/>\nenabled: yes<br \/>\nfilename: packet_stats.log<br \/>\nappend: yes<\/p>\n<p># per packet csv output<br \/>\ncsv:<\/p>\n<p># Output can be disabled here, but it will still have a<br \/>\n# performance impact if compiled in.<br \/>\nenabled: no<br \/>\nfilename: packet_stats.csv<\/p>\n<p># profiling of locking. Only available when Suricata was built with<br \/>\n# &#8211;enable-profiling-locks.<br \/>\nlocks:<br \/>\nenabled: no<br \/>\nfilename: lock_stats.log<br \/>\nappend: yes<\/p>\n<p>pcap-log:<br \/>\nenabled: no<br \/>\nfilename: pcaplog_stats.log<br \/>\nappend: yes<\/p>\n<p>##<br \/>\n## Netfilter integration<br \/>\n##<\/p>\n<p># When running in NFQ inline mode, it is possible to use a simulated<br \/>\n# non-terminal NFQUEUE verdict.<br \/>\n# This permit to do send all needed packet to suricata via this a rule:<br \/>\n# iptables -I FORWARD -m mark ! &#8211;mark $MARK\/$MASK -j NFQUEUE<br \/>\n# And below, you can have your standard filtering ruleset. To activate<br \/>\n# this mode, you need to set mode to &#8216;repeat&#8217;<br \/>\n# If you want packet to be sent to another queue after an ACCEPT decision<br \/>\n# set mode to &#8216;route&#8217; and set next-queue value.<br \/>\n# On linux &gt;= 3.1, you can set batchcount to a value &gt; 1 to improve performance<br \/>\n# by processing several packets before sending a verdict (worker runmode only).<br \/>\n# On linux &gt;= 3.6, you can set the fail-open option to yes to have the kernel<br \/>\n# accept the packet if suricata is not able to keep pace.<br \/>\n# bypass mark and mask can be used to implement NFQ bypass. If bypass mark is<br \/>\n# set then the NFQ bypass is activated. Suricata will set the bypass mark\/mask<br \/>\n# on packet of a flow that need to be bypassed. The Nefilter ruleset has to<br \/>\n# directly accept all packets of a flow once a packet has been marked.<br \/>\nnfq:<br \/>\n# mode: accept<br \/>\nrepeat-mark: 1<br \/>\nrepeat-mask: 1<br \/>\n# bypass-mark: 1<br \/>\n# bypass-mask: 1<br \/>\n# route-queue: 2<br \/>\n# batchcount: 20<br \/>\nfail-open: yes<\/p>\n<p>#nflog support<br \/>\nnflog:<br \/>\n# netlink multicast group<br \/>\n# (the same as the iptables &#8211;nflog-group param)<br \/>\n# Group 0 is used by the kernel, so you can&#8217;t use it<br \/>\n&#8211; group: 2<br \/>\n# netlink buffer size<br \/>\nbuffer-size: 18432<br \/>\n# put default value here<br \/>\n&#8211; group: default<br \/>\n# set number of packet to queue inside kernel<br \/>\nqthreshold: 1<br \/>\n# set the delay before flushing packet in the queue inside kernel<br \/>\nqtimeout: 100<br \/>\n# netlink max buffer size<br \/>\nmax-size: 20000<\/p>\n<p>##<br \/>\n## Advanced Capture Options<br \/>\n##<\/p>\n<p># general settings affecting packet capture<br \/>\ncapture:<br \/>\n# disable NIC offloading. It&#8217;s restored when Suricata exists.<br \/>\n# Enabled by default<br \/>\n#disable-offloading: false<br \/>\n#<br \/>\n# disable checksum validation. Same as setting &#8216;-k none&#8217; on the<br \/>\n# commandline<br \/>\n#checksum-validation: none<\/p>\n<p># Netmap support<br \/>\n#<br \/>\n# Netmap operates with NIC directly in driver, so you need FreeBSD wich have<br \/>\n# built-in netmap support or compile and install netmap module and appropriate<br \/>\n# NIC driver on your Linux system.<br \/>\n# To reach maximum throughput disable all receive-, segmentation-,<br \/>\n# checksum- offloadings on NIC.<br \/>\n# Disabling Tx checksum offloading is *required* for connecting OS endpoint<br \/>\n# with NIC endpoint.<br \/>\n# You can find more information at https:\/\/github.com\/luigirizzo\/netmap<br \/>\n#<br \/>\nnetmap:<br \/>\n# To specify OS endpoint add plus sign at the end (e.g. &#8220;eth0+&#8221;)<br \/>\n&#8211; interface: eth2<br \/>\n# Number of receive threads. &#8220;auto&#8221; uses number of RSS queues on interface.<br \/>\n#threads: auto<br \/>\n# You can use the following variables to activate netmap tap or IPS mode.<br \/>\n# If copy-mode is set to ips or tap, the traffic coming to the current<br \/>\n# interface will be copied to the copy-iface interface. If &#8216;tap&#8217; is set, the<br \/>\n# copy is complete. If &#8216;ips&#8217; is set, the packet matching a &#8216;drop&#8217; action<br \/>\n# will not be copied.<br \/>\n# To specify the OS as the copy-iface (so the OS can route packets, or forward<br \/>\n# to a service running on the same machine) add a plus sign at the end<br \/>\n# (e.g. &#8220;copy-iface: eth0+&#8221;). Don&#8217;t forget to set up a symmetrical eth0+ -&gt; eth0<br \/>\n# for return packets. Hardware checksumming must be *off* on the interface if<br \/>\n# using an OS endpoint (e.g. &#8216;ifconfig eth0 -rxcsum -txcsum -rxcsum6 -txcsum6&#8217; for FreeBSD<br \/>\n# or &#8216;ethtool -K eth0 tx off rx off&#8217; for Linux).<br \/>\n#copy-mode: tap<br \/>\n#copy-iface: eth3<br \/>\n# Set to yes to disable promiscuous mode<br \/>\n# disable-promisc: no<br \/>\n# Choose checksum verification mode for the interface. At the moment<br \/>\n# of the capture, some packets may be with an invalid checksum due to<br \/>\n# offloading to the network card of the checksum computation.<br \/>\n# Possible values are:<br \/>\n# &#8211; yes: checksum validation is forced<br \/>\n# &#8211; no: checksum validation is disabled<br \/>\n# &#8211; auto: suricata uses a statistical approach to detect when<br \/>\n# checksum off-loading is used.<br \/>\n# Warning: &#8216;checksum-validation&#8217; must be set to yes to have any validation<br \/>\n#checksum-checks: auto<br \/>\n# BPF filter to apply to this interface. The pcap filter syntax apply here.<br \/>\n#bpf-filter: port 80 or udp<br \/>\n#- interface: eth3<br \/>\n#threads: auto<br \/>\n#copy-mode: tap<br \/>\n#copy-iface: eth2<br \/>\n# Put default values here<br \/>\n&#8211; interface: default<\/p>\n<p># PF_RING configuration. for use with native PF_RING support<br \/>\n# for more info see http:\/\/www.ntop.org\/products\/pf_ring\/<br \/>\npfring:<br \/>\n&#8211; interface: eth0<br \/>\n# Number of receive threads (&gt;1 will enable experimental flow pinned<br \/>\n# runmode)<br \/>\nthreads: 1<\/p>\n<p># Default clusterid. PF_RING will load balance packets based on flow.<br \/>\n# All threads\/processes that will participate need to have the same<br \/>\n# clusterid.<br \/>\ncluster-id: 99<\/p>\n<p># Default PF_RING cluster type. PF_RING can load balance per flow.<br \/>\n# Possible values are cluster_flow or cluster_round_robin.<br \/>\ncluster-type: cluster_flow<br \/>\n# bpf filter for this interface<br \/>\n#bpf-filter: tcp<br \/>\n# Choose checksum verification mode for the interface. At the moment<br \/>\n# of the capture, some packets may be with an invalid checksum due to<br \/>\n# offloading to the network card of the checksum computation.<br \/>\n# Possible values are:<br \/>\n# &#8211; rxonly: only compute checksum for packets received by network card.<br \/>\n# &#8211; yes: checksum validation is forced<br \/>\n# &#8211; no: checksum validation is disabled<br \/>\n# &#8211; auto: suricata uses a statistical approach to detect when<br \/>\n# checksum off-loading is used. (default)<br \/>\n# Warning: &#8216;checksum-validation&#8217; must be set to yes to have any validation<br \/>\n#checksum-checks: auto<br \/>\n# Second interface<br \/>\n#- interface: eth1<br \/>\n# threads: 3<br \/>\n# cluster-id: 93<br \/>\n# cluster-type: cluster_flow<br \/>\n# Put default values here<br \/>\n&#8211; interface: default<br \/>\n#threads: 2<\/p>\n<p># For FreeBSD ipfw(8) divert(4) support.<br \/>\n# Please make sure you have ipfw_load=&#8221;YES&#8221; and ipdivert_load=&#8221;YES&#8221;<br \/>\n# in \/etc\/loader.conf or kldload&#8217;ing the appropriate kernel modules.<br \/>\n# Additionally, you need to have an ipfw rule for the engine to see<br \/>\n# the packets from ipfw. For Example:<br \/>\n#<br \/>\n# ipfw add 100 divert 8000 ip from any to any<br \/>\n#<br \/>\n# The 8000 above should be the same number you passed on the command<br \/>\n# line, i.e. -d 8000<br \/>\n#<br \/>\nipfw:<\/p>\n<p># Reinject packets at the specified ipfw rule number. This config<br \/>\n# option is the ipfw rule number AT WHICH rule processing continues<br \/>\n# in the ipfw processing system after the engine has finished<br \/>\n# inspecting the packet for acceptance. If no rule number is specified,<br \/>\n# accepted packets are reinjected at the divert rule which they entered<br \/>\n# and IPFW rule processing continues. No check is done to verify<br \/>\n# this will rule makes sense so care must be taken to avoid loops in ipfw.<br \/>\n#<br \/>\n## The following example tells the engine to reinject packets<br \/>\n# back into the ipfw firewall AT rule number 5500:<br \/>\n#<br \/>\n# ipfw-reinjection-rule-number: 5500<\/p>\n<p>napatech:<br \/>\n# The Host Buffer Allowance for all streams<br \/>\n# (-1 = OFF, 1 &#8211; 100 = percentage of the host buffer that can be held back)<br \/>\nhba: -1<\/p>\n<p># use_all_streams set to &#8220;yes&#8221; will query the Napatech service for all configured<br \/>\n# streams and listen on all of them. When set to &#8220;no&#8221; the streams config array<br \/>\n# will be used.<br \/>\nuse-all-streams: yes<\/p>\n<p># The streams to listen on<br \/>\nstreams: [1, 2, 3]<\/p>\n<p># Tilera mpipe configuration. for use on Tilera TILE-Gx.<br \/>\nmpipe:<\/p>\n<p># Load balancing modes: &#8220;static&#8221;, &#8220;dynamic&#8221;, &#8220;sticky&#8221;, or &#8220;round-robin&#8221;.<br \/>\nload-balance: dynamic<\/p>\n<p># Number of Packets in each ingress packet queue. Must be 128, 512, 2028 or 65536<br \/>\niqueue-packets: 2048<\/p>\n<p># List of interfaces we will listen on.<br \/>\ninputs:<br \/>\n&#8211; interface: xgbe2<br \/>\n&#8211; interface: xgbe3<br \/>\n&#8211; interface: xgbe4<\/p>\n<p># Relative weight of memory for packets of each mPipe buffer size.<br \/>\nstack:<br \/>\nsize128: 0<br \/>\nsize256: 9<br \/>\nsize512: 0<br \/>\nsize1024: 0<br \/>\nsize1664: 7<br \/>\nsize4096: 0<br \/>\nsize10386: 0<br \/>\nsize16384: 0<\/p>\n<p>##<br \/>\n## Hardware accelaration<br \/>\n##<\/p>\n<p># Cuda configuration.<br \/>\ncuda:<br \/>\n# The &#8220;mpm&#8221; profile. On not specifying any of these parameters, the engine&#8217;s<br \/>\n# internal default values are used, which are same as the ones specified in<br \/>\n# in the default conf file.<br \/>\nmpm:<br \/>\n# The minimum length required to buffer data to the gpu.<br \/>\n# Anything below this is MPM&#8217;ed on the CPU.<br \/>\n# Can be specified in kb, mb, gb. Just a number indicates it&#8217;s in bytes.<br \/>\n# A value of 0 indicates there&#8217;s no limit.<br \/>\ndata-buffer-size-min-limit: 0<br \/>\n# The maximum length for data that we would buffer to the gpu.<br \/>\n# Anything over this is MPM&#8217;ed on the CPU.<br \/>\n# Can be specified in kb, mb, gb. Just a number indicates it&#8217;s in bytes.<br \/>\ndata-buffer-size-max-limit: 1500<br \/>\n# The ring buffer size used by the CudaBuffer API to buffer data.<br \/>\ncudabuffer-buffer-size: 500mb<br \/>\n# The max chunk size that can be sent to the gpu in a single go.<br \/>\ngpu-transfer-size: 50mb<br \/>\n# The timeout limit for batching of packets in microseconds.<br \/>\nbatching-timeout: 2000<br \/>\n# The device to use for the mpm. Currently we don&#8217;t support load balancing<br \/>\n# on multiple gpus. In case you have multiple devices on your system, you<br \/>\n# can specify the device to use, using this conf. By default we hold 0, to<br \/>\n# specify the first device cuda sees. To find out device-id associated with<br \/>\n# the card(s) on the system run &#8220;suricata &#8211;list-cuda-cards&#8221;.<br \/>\ndevice-id: 0<br \/>\n# No of Cuda streams used for asynchronous processing. All values &gt; 0 are valid.<br \/>\n# For this option you need a device with Compute Capability &gt; 1.0.<br \/>\ncuda-streams: 2<\/p>\n<p>##<br \/>\n## Include other configs<br \/>\n##<\/p>\n<p># Includes. Files included here will be handled as if they were<br \/>\n# inlined in this configuration file.<br \/>\n#include: include1.yaml<br \/>\n#include: include2.yaml<\/p>\n","protected":false},"excerpt":{"rendered":"<p>%YAML 1.1 &#8212; # Suricata configuration file. In addition to the comments describing all # options in this file, full documentation can be found at: # https:\/\/redmine.openinfosecfoundation.org\/projects\/suricata\/wiki\/Suricatayaml ## ## Step 1: inform Suricata about your network ## vars: # more specifc is better for alert accuracy and performance address-groups: #HOME_NET: &#8220;[192.168.0.0\/16,10.0.0.0\/8,172.16.0.0\/12]&#8221; HOME_NET: &#8220;[192.168.2.0\/24]&#8221; #HOME_NET: &#8220;[10.0.0.0\/8]&#8221; [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[110,8,14,6],"tags":[136,135,134],"class_list":["post-1491","post","type-post","status-publish","format-standard","hentry","category-ids","category-linux","category-networking","category-work","tag-devuan","tag-ips","tag-suricata"],"_links":{"self":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/1491","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1491"}],"version-history":[{"count":3,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/1491\/revisions"}],"predecessor-version":[{"id":1523,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=\/wp\/v2\/posts\/1491\/revisions\/1523"}],"wp:attachment":[{"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1491"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1491"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/clark.tipistrani.it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}