Guest User

Untitled

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