Project

General

Profile

Bug #9934 ยป suricata.yaml

XG-1537 ix1 suricata.yaml - Viktor Gurov, 02/07/2020 04:48 AM

 
1
%YAML 1.1
2
---
3

    
4
max-pending-packets: 1024
5

    
6
# Runmode the engine should use.
7
runmode: autofp
8

    
9
# If set to auto, the variable is internally switched to 'router' in IPS 
10
# mode and 'sniffer-only' in IDS mode.
11
host-mode: auto
12

    
13
# Specifies the kind of flow load balancer used by the flow pinned autofp mode.
14
autofp-scheduler: active-packets
15

    
16
# Daemon working directory
17
daemon-directory: /usr/local/etc/suricata/suricata_39900_ix1
18

    
19
default-packet-size: 1514
20

    
21
# The default logging directory.
22
default-log-dir: /var/log/suricata/suricata_ix139900
23

    
24
# global stats configuration
25
stats:
26
  enabled: no
27
  interval: 10
28
  #decoder-events: true
29
  decoder-events-prefix: "decoder.event"
30
  #stream-events: false
31

    
32
# Configure the type of alert (and other) logging.
33
outputs:
34

    
35
  # alert-pf blocking plugin
36
  - alert-pf:
37
      enabled: no
38
      kill-state: yes
39
      block-drops-only: no
40
      pass-list: /usr/local/etc/suricata/suricata_39900_ix1/passlist
41
      block-ip: BOTH
42
      pf-table: snort2c
43

    
44
  # a line based alerts log similar to Snort's fast.log
45
  - fast:
46
      enabled: yes
47
      filename: alerts.log
48
      append: yes
49
      filetype: regular
50

    
51
  # alert output for use with Barnyard2
52
  - unified2-alert:
53
      enabled: no
54
      filename: unified2.alert
55
      limit: 32mb
56
      sensor-id: 0
57
      xff:
58
        enabled: no
59

    
60
  - http-log:
61
      enabled: yes
62
      filename: http.log
63
      append: yes
64
      extended: yes
65
      filetype: regular
66

    
67
  - pcap-log:
68
      enabled: no
69
      filename: log.pcap
70
      limit: 32mb
71
      max-files: 1000
72
      mode: normal
73

    
74
  - tls-log:
75
      enabled: no
76
      filename: tls.log
77
      extended: yes
78

    
79
  - tls-store:
80
      enabled: no
81
      certs-log-dir: certs
82

    
83
  - stats:
84
      enabled: yes
85
      filename: stats.log
86
      append: no
87
      totals: yes
88
      threads: no
89
      #null-values: yes
90

    
91
  - syslog:
92
      enabled: yes
93
      identity: suricata
94
      facility: local7
95
      level: alert
96

    
97
  - drop:
98
      enabled: no
99
      filename: drop.log
100
      append: yes
101
      filetype: regular
102

    
103
  - file-store:
104
      version: 2
105
      enabled: no
106
      dir: filestore
107
      force-magic: no
108
      #force-hash: [md5]
109
      #waldo: file.waldo
110

    
111
  - file-log:
112
      enabled: no
113
      filename: files-json.log
114
      append: yes
115
      filetype: regular
116
      force-magic: no
117
      #force-hash: [md5]
118

    
119
  - eve-log:
120
      enabled: no
121
      filetype: regular
122
      filename: eve.json
123
      redis: 
124
        server: 127.0.0.1
125
        port: 6379
126
        mode: list
127
        key: "suricata"
128
      identity: "suricata"
129
      facility: local1
130
      level: notice
131
      xff:
132
        enabled: no
133
        mode: extra-data
134
        deployment: reverse
135
        header: X-Forwarded-For
136
      types: 
137
        - alert:
138
            payload: yes              # enable dumping payload in Base64
139
            payload-buffer-size: 4kb  # max size of payload buffer to output in eve-log
140
            payload-printable: yes    # enable dumping payload in printable (lossy) format
141
            packet: yes               # enable dumping of packet (without stream segments)
142
            http-body: yes            # enable dumping of http body in Base64
143
            http-body-printable: yes  # enable dumping of http body in printable format
144
            metadata: yes             # enable inclusion of app layer metadata with alert
145
            tagged-packets: yes       # enable logging of tagged packets for rules using the 'tag' keyword
146
        - http:
147
            extended: yes
148
            custom: [accept, accept-charset, accept-datetime, accept-encoding, accept-language, accept-range, age, allow, authorization, cache-control, connection, content-encoding, content-language, content-length, content-location, content-md5, content-range, content-type, cookie, date, dnt, etags, from, last-modified, link, location, max-forwards, origin, pragma, proxy-authenticate, proxy-authorization, range, referrer, refresh, retry-after, server, set-cookie, te, trailer, transfer-encoding, upgrade, vary, via, warning, www-authenticate, x-authenticated-user, x-flash-version, x-forwarded-proto, x-requested-with]
149
        - dns:
150
            version: 2
151
            query: yes
152
            answer: yes
153
        - tls:
154
            extended: yes
155
        - dhcp:
156
            extended: no
157
        - files:
158
            force-magic: no
159
        - ssh
160
        - nfs
161
        - smb
162
        - krb5
163
        - ikev2
164
        - tftp
165
        - smtp:
166
            extended: yes
167
            custom: [bcc, received, reply-to, x-mailer, x-originating-ip]
168
            md5: [subject]
169

    
170
# Magic file. The extension .mgc is added to the value here.
171
magic-file: /usr/share/misc/magic
172

    
173
# GeoLite2 IP geo-location database file path and filename.
174
geoip-database: /usr/local/share/suricata/GeoLite2/GeoLite2-Country.mmdb
175

    
176
# Specify a threshold config file
177
threshold-file: /usr/local/etc/suricata/suricata_39900_ix1/threshold.config
178

    
179
detect-engine:
180
  - profile: medium
181
  - sgh-mpm-context: auto
182
  - inspection-recursion-limit: 3000
183
  - delayed-detect: no
184

    
185
# Suricata is multi-threaded. Here the threading can be influenced.
186
threading:
187
  set-cpu-affinity: no
188
  detect-thread-ratio: 1.0
189

    
190
# Luajit has a strange memory requirement, it's 'states' need to be in the
191
# first 2G of the process' memory.
192
#
193
# 'luajit.states' is used to control how many states are preallocated.
194
# State use: per detect script: 1 per detect thread. Per output script: 1 per
195
# script.
196
luajit:
197
  states: 128
198

    
199
# Multi pattern algorithm
200
# The default mpm-algo value of "auto" will use "hs" if Hyperscan is
201
# available, "ac" otherwise.
202
mpm-algo: auto
203

    
204
# Single pattern algorithm
205
# The default of "auto" will use "hs" if available, otherwise "bm".
206
spm-algo: auto
207

    
208
# Defrag settings:
209
defrag:
210
  memcap: 33554432
211
  hash-size: 65536
212
  trackers: 65535
213
  max-frags: 65535
214
  prealloc: yes
215
  timeout: 60
216

    
217
# Flow settings:
218
flow:
219
  memcap: 33554432
220
  hash-size: 65536
221
  prealloc: 10000
222
  emergency-recovery: 30
223
  prune-flows: 5
224

    
225
# This option controls the use of vlan ids in the flow (and defrag)
226
# hashing.
227
vlan:
228
  use-for-tracking: true
229

    
230
# Specific timeouts for flows.
231
flow-timeouts:
232
  default:
233
    new: 30
234
    established: 300
235
    closed: 0
236
    emergency-new: 10
237
    emergency-established: 100
238
    emergency-closed: 0
239
  tcp:
240
    new: 60
241
    established: 3600
242
    closed: 120
243
    emergency-new: 10
244
    emergency-established: 300
245
    emergency-closed: 20
246
  udp:
247
    new: 30
248
    established: 300
249
    emergency-new: 10
250
    emergency-established: 100
251
  icmp:
252
    new: 30
253
    established: 300
254
    emergency-new: 10
255
    emergency-established: 100
256

    
257
stream:
258
  memcap: 268435456
259
  checksum-validation: no
260
  inline: auto
261
  prealloc-sessions: 32768
262
  midstream: false
263
  async-oneside: false
264
  max-synack-queued: 5
265
  reassembly:
266
    memcap: 67108864
267
    depth: 1048576
268
    toserver-chunk-size: 2560
269
    toclient-chunk-size: 2560
270

    
271
# Host table is used by tagging and per host thresholding subsystems.
272
host:
273
  hash-size: 4096
274
  prealloc: 1000
275
  memcap: 33554432
276

    
277
# Host specific policies for defragmentation and TCP stream reassembly.
278
host-os-policy:
279
  bsd: [0.0.0.0/0]
280

    
281
# Logging configuration.  This is not about logging IDS alerts, but
282
# IDS output about what its doing, errors, etc.
283
logging:
284

    
285
  # This value is overriden by the SC_LOG_LEVEL env var.
286
  default-log-level: info
287
  default-log-format: "%t - <%d> -- "
288

    
289
  # Define your logging outputs.
290
  outputs:
291
  - console:
292
      enabled: yes
293
  - file:
294
      enabled: yes
295
      filename: /var/log/suricata/suricata_ix139900/suricata.log
296
  - syslog:
297
      enabled: no
298
      facility: off
299
      format: "[%i] <%d> -- "
300

    
301
# IPS Mode Configuration
302
# PCAP
303
pcap:
304
  - interface: ix1
305
    checksum-checks: auto
306
    promisc: yes
307
    snaplen: 1518
308

    
309
legacy:
310
  uricontent: enabled
311

    
312
default-rule-path: /usr/local/etc/suricata/suricata_39900_ix1/rules
313
rule-files:
314
 - suricata.rules
315
 - flowbit-required.rules
316

    
317
classification-file: /usr/local/etc/suricata/suricata_39900_ix1/classification.config
318
reference-config-file: /usr/local/etc/suricata/suricata_39900_ix1/reference.config
319

    
320
# Holds variables that would be used by the engine.
321
vars:
322

    
323
  # Holds the address group vars that would be passed in a Signature.
324
  address-groups:
325
    HOME_NET: "[10.40.1.1/16, 10.40.208.0/24, 38.142.20.8/29, 38.142.20.11/29, 66.28.0.45/32, 66.28.0.61/32, 68.105.28.16/32, 68.105.29.16/32, 127.0.0.1/32, 184.186.253.161/32, 184.186.253.162/27, 184.186.253.163/32, 192.168.2.0/24, ::1/128, fe80::ae1f:6bff:fea0:2e86/128, fe80::ae1f:6bff:fea0:2e87/128, fe80::ae1f:6bff:fea0:f1f0/128, fe80::ae1f:6bff:fea0:f1f1/128]"
326
    EXTERNAL_NET: "[!10.40.1.1/16, !10.40.208.0/24, !38.142.20.8/29, !38.142.20.11/29, !66.28.0.45/32, !66.28.0.61/32, !68.105.28.16/32, !68.105.29.16/32, !127.0.0.1/32, !184.186.253.161/32, !184.186.253.162/27, !184.186.253.163/32, !192.168.2.0/24, !::1/128, !fe80::ae1f:6bff:fea0:2e86/128, !fe80::ae1f:6bff:fea0:2e87/128, !fe80::ae1f:6bff:fea0:f1f0/128, !fe80::ae1f:6bff:fea0:f1f1/128]"
327
    DNS_SERVERS: "$HOME_NET"
328
    SMTP_SERVERS: "$HOME_NET"
329
    HTTP_SERVERS: "$HOME_NET"
330
    SQL_SERVERS: "$HOME_NET"
331
    TELNET_SERVERS: "$HOME_NET"
332
    DNP3_SERVER: "$HOME_NET"
333
    DNP3_CLIENT: "$HOME_NET"
334
    MODBUS_SERVER: "$HOME_NET"
335
    MODBUS_CLIENT: "$HOME_NET"
336
    ENIP_SERVER: "$HOME_NET"
337
    ENIP_CLIENT: "$HOME_NET"
338
    FTP_SERVERS: "$HOME_NET"
339
    SSH_SERVERS: "$HOME_NET"
340
    AIM_SERVERS: "64.12.24.0/23, 64.12.28.0/23, 64.12.161.0/24, 64.12.163.0/24, 64.12.200.0/24, 205.188.3.0/24, 205.188.5.0/24, 205.188.7.0/24, 205.188.9.0/24, 205.188.153.0/24, 205.188.179.0/24, 205.188.248.0/24"
341
    SIP_SERVERS: "$HOME_NET"
342

    
343
  # Holds the port group vars that would be passed in a Signature.
344
  port-groups:
345
    FTP_PORTS: "21"
346
    HTTP_PORTS: "80"
347
    ORACLE_PORTS: "1521"
348
    SSH_PORTS: "22"
349
    SHELLCODE_PORTS: "!80"
350
    DNP3_PORTS: "20000"
351
    FILE_DATA_PORTS: "$HTTP_PORTS, 110, 143"
352
    SIP_PORTS: "5060, 5061, 5600"
353

    
354
# Set the order of alerts based on actions
355
action-order:
356
  - pass
357
  - drop
358
  - reject
359
  - alert
360

    
361
# IP Reputation
362

    
363

    
364
# Limit for the maximum number of asn1 frames to decode (default 256)
365
asn1-max-frames: 256
366

    
367
engine-analysis:
368
  rules-fast-pattern: yes
369
  rules: yes
370

    
371
#recursion and match limits for PCRE where supported
372
pcre:
373
  match-limit: 3500
374
  match-limit-recursion: 1500
375

    
376
# Holds details on the app-layer. The protocols section details each protocol.
377
app-layer:
378
  protocols:
379
    dcerpc:
380
      enabled: yes
381
    dhcp:
382
      enabled: yes
383
    dnp3:
384
      enabled: yes
385
      detection-ports:
386
        dp: 20000
387
    dns:
388
      global-memcap: 16777216
389
      state-memcap: 524288
390
      request-flood: 500
391
      tcp:
392
        enabled: yes
393
        detection-ports:
394
          dp: 53
395
      udp:
396
        enabled: yes
397
        detection-ports:
398
          dp: 53
399
    ftp:
400
      enabled: yes
401
    http:
402
      enabled: yes
403
      memcap: 67108864
404
    ikev2:
405
      enabled: yes
406
    imap:
407
      enabled: detection-only
408
    krb5:
409
      enabled: yes
410
    modbus:
411
      enabled: yes
412
      request-flood: 500
413
      detection-ports:
414
        dp: 502
415
      stream-depth: 0
416
    msn:
417
      enabled: detection-only
418
    nfs:
419
      enabled: yes
420
    ntp:
421
      enabled: yes
422
    tls:
423
      enabled: yes
424
      detection-ports:
425
        dp: 443
426
      ja3-fingerprints: off
427
      encrypt-handling: default
428
    smb:
429
      enabled: yes
430
      detection-ports:
431
        dp: 139, 445
432
    smtp:
433
      enabled: yes
434
      mime:
435
        decode-mime: no
436
        decode-base64: yes
437
        decode-quoted-printable: yes
438
        header-value-depth: 2000
439
        extract-urls: yes
440
        body-md5: no
441
      inspected-tracker:
442
        content-limit: 100000
443
        content-inspect-min-size: 32768
444
        content-inspect-window: 4096
445
    ssh:
446
      enabled: yes
447
    tftp:
448
      enabled: yes
449

    
450
###########################################################################
451
# Configure libhtp.
452
libhtp:
453
   default-config:
454
     personality: IDS
455
     request-body-limit: 4096
456
     response-body-limit: 4096
457
     meta-field-limit: 18432
458
     double-decode-path: no
459
     double-decode-query: no
460
     uri-include-all: no
461

    
462
   
463

    
464
coredump:
465
  max-dump: unlimited
466

    
467
# Suricata user pass through configuration
468

    
    (1-1/1)