forked from cisagov/Malcolm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-standalone.yml
577 lines (563 loc) · 17.1 KB
/
docker-compose-standalone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
# Copyright (c) 2022 Battelle Energy Alliance, LLC. All rights reserved.
version: '3.7'
################################################################################
# Commonly tweaked configuration options
#-------------------------------------------------------------------------------
x-process-variables: &process-variables
# docker containers will run processes as unprivileged user with UID:GID
PUID : 1000
PGID : 1000
x-auth-variables: &auth-variables
# authentication method: encrypted HTTP basic authentication ('true') vs LDAP ('false')
NGINX_BASIC_AUTH : 'true'
# NGINX LDAP (NGINX_BASIC_AUTH=false) can support LDAP, LDAPS, or LDAP+StartTLS.
# For StartTLS, set NGINX_LDAP_TLS_STUNNEL=true to issue the StartTLS command
# and use stunnel to tunnel the connection.
NGINX_LDAP_TLS_STUNNEL : 'false'
# stunnel will require and verify certificates for StartTLS when one or more
# trusted CA certificate files are placed in the ./nginx/ca-trust directory.
# For additional security, hostname or IP address checking of the associated
# CA certificate(s) can be enabled by providing these values.
NGINX_LDAP_TLS_STUNNEL_CHECK_HOST : ''
NGINX_LDAP_TLS_STUNNEL_CHECK_IP : ''
NGINX_LDAP_TLS_STUNNEL_VERIFY_LEVEL : 2
x-nginx-variables: &nginx-variables
# Whether or not to write nginx's access.log and error.log to OpenSearch
NGINX_LOG_ACCESS_AND_ERRORS : 'false'
x-arkime-variables: &arkime-variables
MANAGE_PCAP_FILES : 'false'
ARKIME_ANALYZE_PCAP_THREADS : 1
MAXMIND_GEOIP_DB_LICENSE_KEY : '0'
x-zeek-variables: &zeek-variables
ZEEK_AUTO_ANALYZE_PCAP_FILES : 'true'
ZEEK_AUTO_ANALYZE_PCAP_THREADS : 1
ZEEK_INTEL_ITEM_EXPIRATION : '-1min'
ZEEK_INTEL_FEED_SINCE : ''
ZEEK_INTEL_REFRESH_CRON_EXPRESSION : ''
ZEEK_EXTRACTOR_MODE : 'none'
EXTRACTED_FILE_IGNORE_EXISTING : 'false'
EXTRACTED_FILE_PRESERVATION : 'quarantined'
EXTRACTED_FILE_MIN_BYTES : 64
EXTRACTED_FILE_MAX_BYTES : 134217728
VTOT_API2_KEY : '0'
VTOT_REQUESTS_PER_MINUTE : 4
CLAMD_MAX_REQUESTS : 8
YARA_MAX_REQUESTS : 8
CAPA_MAX_REQUESTS : 4
EXTRACTED_FILE_ENABLE_YARA : 'false'
EXTRACTED_FILE_YARA_CUSTOM_ONLY : 'false'
EXTRACTED_FILE_ENABLE_CAPA : 'false'
EXTRACTED_FILE_CAPA_VERBOSE : 'false'
EXTRACTED_FILE_ENABLE_CLAMAV : 'false'
EXTRACTED_FILE_UPDATE_RULES : 'false'
EXTRACTED_FILE_PIPELINE_DEBUG : 'false'
EXTRACTED_FILE_PIPELINE_DEBUG_EXTRA : 'false'
EXTRACTED_FILE_HTTP_SERVER_ENABLE : 'false'
EXTRACTED_FILE_HTTP_SERVER_ENCRYPT : 'true'
EXTRACTED_FILE_HTTP_SERVER_KEY : 'quarantined'
# environment variables for tweaking Zeek at runtime (see local.zeek)
# set to a non-blank value to disable the corresponding feature
ZEEK_DISABLE_HASH_ALL_FILES : ''
ZEEK_DISABLE_LOG_PASSWORDS : ''
ZEEK_DISABLE_SSL_VALIDATE_CERTS : ''
ZEEK_DISABLE_TRACK_ALL_ASSETS : ''
ZEEK_DISABLE_BEST_GUESS_ICS : 'true'
ZEEK_DISABLE_SPICY_DHCP : 'true'
ZEEK_DISABLE_SPICY_DNS : 'true'
ZEEK_DISABLE_SPICY_HTTP : 'true'
ZEEK_DISABLE_SPICY_IPSEC : ''
ZEEK_DISABLE_SPICY_LDAP : ''
ZEEK_DISABLE_SPICY_OPENVPN : ''
ZEEK_DISABLE_SPICY_STUN : ''
ZEEK_DISABLE_SPICY_TAILSCALE : ''
ZEEK_DISABLE_SPICY_TFTP : ''
ZEEK_DISABLE_SPICY_WIREGUARD : ''
x-dashboards-helper-variables: &dashboards-helper-variables
OPENSEARCH_INDEX_SIZE_PRUNE_LIMIT : '0'
OPENSEARCH_INDEX_SIZE_PRUNE_NAME_SORT : 'false'
ISM_CLOSE_AGE : '60d'
ISM_COLD_AGE : '30d'
ISM_DELETE_AGE : '365d'
ISM_POLICY_NAME : 'session_index_policy'
ISM_SNAPSHOT_AGE : '1d'
ISM_SNAPSHOT_COMPRESSED : 'false'
ISM_SNAPSHOT_REPO : 'logs'
x-logstash-variables: &logstash-variables
pipeline.workers : 4
pipeline.batch.size : 100
pipeline.batch.delay : 50
LOGSTASH_OUI_LOOKUP : 'true'
LOGSTASH_SEVERITY_SCORING : 'true'
LOGSTASH_REVERSE_DNS : 'false'
# OS_EXTERNAL_HOSTS : '10.0.0.123:9200'
# OS_EXTERNAL_SSL : 'true'
# OS_EXTERNAL_SSL_CERTIFICATE_VERIFICATION : 'false'
# For security, OS_EXTERNAL_USER and OS_EXTERNAL_PASSWORD should be stored in Logstash keystore using ./scripts/auth_setup
# See also volume mount for logstash.keystore below.
# OS_EXTERNAL_USER : 'janedoe'
# OS_EXTERNAL_PASSWORD : 'secret'
x-common-upload-variables: &common-upload-variables
AUTO_TAG : 'true'
PCAP_PIPELINE_DEBUG : 'false'
PCAP_PIPELINE_DEBUG_EXTRA : 'false'
PCAP_PIPELINE_IGNORE_PREEXISTING : 'false'
PCAP_MONITOR_HOST : 'pcap-monitor'
x-common-lookup-variables: &common-lookup-variables
FREQ_LOOKUP : 'false'
FREQ_SEVERITY_THRESHOLD : '2.0'
TOTAL_MEGABYTES_SEVERITY_THRESHOLD : 1000
CONNECTION_SECONDS_SEVERITY_THRESHOLD : 3600
QUESTIONABLE_COUNTRY_CODES : 'CN,IR,KP,RU,UA'
x-common-beats-variables: &common-beats-variables
BEATS_SSL : 'false'
x-pcap-capture-variables: &pcap-capture-variables
PCAP_ENABLE_NETSNIFF : 'false'
PCAP_ENABLE_TCPDUMP : 'false'
PCAP_IFACE : 'eth0'
PCAP_ROTATE_MEGABYTES : 1024
PCAP_ROTATE_MINUTES : 10
PCAP_FILTER : ''
################################################################################
services:
opensearch:
image: malcolmnetsec/opensearch:5.2.6
restart: "no"
stdin_open: false
tty: true
hostname: opensearch
environment:
<< : *process-variables
logger.level : 'WARN'
bootstrap.memory_lock : 'true'
MAX_LOCKED_MEMORY : 'unlimited'
OPENSEARCH_JAVA_OPTS : '-Xms4g -Xmx4g -Xss256k -XX:-HeapDumpOnOutOfMemoryError -Djava.security.egd=file:/dev/./urandom -Dlog4j.formatMsgNoLookups=true'
VIRTUAL_HOST : 'os.malcolm.local'
discovery.type : 'single-node'
discovery.zen.minimum_master_nodes : 1
cluster.routing.allocation.disk.threshold_enabled : 'false'
cluster.routing.allocation.node_initial_primaries_recoveries : 8
indices.query.bool.max_clause_count : 2048
path.repo : '/opt/opensearch/backup'
expose:
- 9200
ulimits:
memlock:
soft: -1
hard: -1
cap_add:
- IPC_LOCK
volumes:
- ./opensearch/opensearch.keystore:/usr/share/opensearch/config/opensearch.keystore:rw
- ./nginx/ca-trust:/usr/share/opensearch/ca-trust:ro
- ./opensearch:/usr/share/opensearch/data:delegated
- ./opensearch-backup:/opt/opensearch/backup:delegated
healthcheck:
test: ["CMD", "curl", "--silent", "--fail", "http://localhost:9200"]
interval: 30s
timeout: 15s
retries: 3
start_period: 180s
dashboards-helper:
image: malcolmnetsec/dashboards-helper:5.2.6
restart: "no"
stdin_open: false
tty: true
hostname: dashboards-helper
environment:
<< : *process-variables
<< : *dashboards-helper-variables
OPENSEARCH_URL : 'http://opensearch:9200'
DASHBOARDS_URL : 'http://dashboards:5601/dashboards'
VIRTUAL_HOST : 'dashboards-helper.malcolm.local'
ARKIME_INDEX_PATTERN : 'arkime_sessions3-*'
ARKIME_INDEX_PATTERN_ID : 'arkime_sessions3-*'
ARKIME_INDEX_TIME_FIELD : 'firstPacket'
CREATE_OS_ARKIME_SESSION_INDEX : 'true'
depends_on:
- opensearch
expose:
- 28991
volumes:
- ./index-management-policy.json:/data/index-management-policy.json:ro
healthcheck:
test: ["CMD", "supervisorctl", "status", "cron", "maps"]
interval: 60s
timeout: 15s
retries: 3
start_period: 30s
dashboards:
image: malcolmnetsec/dashboards:5.2.6
restart: "no"
stdin_open: false
tty: true
hostname: dashboards
environment:
<< : *process-variables
OPENSEARCH_URL : 'http://opensearch:9200'
VIRTUAL_HOST : 'dashboards.malcolm.local'
depends_on:
- opensearch
- dashboards-helper
expose:
- 5601
healthcheck:
test: ["CMD", "curl", "--silent", "--fail", "http://localhost:5601/dashboards/api/status"]
interval: 30s
timeout: 15s
retries: 3
start_period: 210s
logstash:
image: malcolmnetsec/logstash-oss:5.2.6
restart: "no"
stdin_open: false
tty: true
hostname: logstash
ulimits:
memlock:
soft: -1
hard: -1
cap_add:
- IPC_LOCK
environment:
<< : *process-variables
<< : *logstash-variables
<< : *common-beats-variables
<< : *common-lookup-variables
OS_HOSTS : 'opensearch:9200'
LS_JAVA_OPTS : '-Xms2g -Xmx2g -Xss1536k -XX:-HeapDumpOnOutOfMemoryError -Djava.security.egd=file:/dev/./urandom -Dlog4j.formatMsgNoLookups=true'
depends_on:
- opensearch
expose:
- 5044
- 9001
- 9600
volumes:
- ./logstash/certs/logstash.keystore:/usr/share/logstash/config/logstash.keystore:rw
- ./logstash/maps/malcolm_severity.yaml:/etc/malcolm_severity.yaml:ro
- ./nginx/ca-trust:/usr/share/logstash/ca-trust:ro
- ./logstash/certs/ca.crt:/certs/ca.crt:ro
- ./logstash/certs/server.crt:/certs/server.crt:ro
- ./logstash/certs/server.key:/certs/server.key:ro
- ./cidr-map.txt:/usr/share/logstash/config/cidr-map.txt:ro
- ./host-map.txt:/usr/share/logstash/config/host-map.txt:ro
- ./net-map.json:/usr/share/logstash/config/net-map.json:ro
healthcheck:
test: ["CMD", "curl", "--silent", "--fail", "http://localhost:9600"]
interval: 30s
timeout: 15s
retries: 3
start_period: 600s
filebeat:
image: malcolmnetsec/filebeat-oss:5.2.6
restart: "no"
stdin_open: false
tty: true
hostname: filebeat
environment:
<< : *process-variables
<< : *nginx-variables
<< : *common-upload-variables
<< : *common-beats-variables
FILEBEAT_ZEEK_LOG_PATH : '/data/zeek/current'
FILEBEAT_NGINX_LOG_PATH : '/data/nginx'
FILEBEAT_LOG_CLEANUP_MINUTES : 180
FILEBEAT_ZIP_CLEANUP_MINUTES : 360
FILEBEAT_SCAN_FREQUENCY : '10s'
FILEBEAT_CLEAN_INACTIVE : '45m'
FILEBEAT_IGNORE_OLDER : '30m'
FILEBEAT_CLOSE_INACTIVE : '30s'
FILEBEAT_CLOSE_RENAMED : 'true'
FILEBEAT_CLOSE_REMOVED : 'true'
FILEBEAT_CLOSE_EOF : 'true'
FILEBEAT_CLEAN_REMOVED : 'true'
depends_on:
- logstash
volumes:
- nginx-log-path:/data/nginx:ro
- ./zeek-logs:/data/zeek
- ./filebeat/certs/ca.crt:/certs/ca.crt:ro
- ./filebeat/certs/client.crt:/certs/client.crt:ro
- ./filebeat/certs/client.key:/certs/client.key:ro
healthcheck:
test: ["CMD", "supervisorctl", "status", "filebeat"]
interval: 30s
timeout: 15s
retries: 3
start_period: 60s
arkime:
image: malcolmnetsec/arkime:5.2.6
restart: "no"
stdin_open: false
tty: true
hostname: arkime
env_file:
- ./auth.env
environment:
<< : *process-variables
<< : *common-upload-variables
<< : *arkime-variables
VIRTUAL_HOST : 'arkime.malcolm.local'
OS_HOST : 'opensearch'
OS_PORT : 9200
OS_MAX_SHARDS_PER_NODE : 2500
VIEWER : 'on'
WISE : 'on'
ulimits:
memlock:
soft: -1
hard: -1
depends_on:
- opensearch
expose:
- 8000
- 8005
- 8081
volumes:
- ./pcap:/data/pcap
- ./arkime-logs:/opt/arkime/logs
- ./arkime-raw:/opt/arkime/raw
healthcheck:
test: ["CMD", "curl", "--silent", "--fail", "http://localhost:8005/_ns_/nstest.html"]
interval: 90s
timeout: 30s
retries: 3
start_period: 210s
zeek:
image: malcolmnetsec/zeek:5.2.6
restart: "no"
stdin_open: false
tty: true
hostname: zeek
environment:
<< : *process-variables
<< : *common-upload-variables
<< : *zeek-variables
ulimits:
memlock:
soft: -1
hard: -1
cap_add:
- IPC_LOCK
depends_on:
- opensearch
volumes:
- ./pcap:/pcap
- ./zeek-logs/upload:/zeek/upload
- ./zeek-logs/extract_files:/zeek/extract_files
- ./zeek/intel:/opt/zeek/share/zeek/site/intel
healthcheck:
test: ["CMD", "supervisorctl", "status", "pcap-zeek"]
interval: 30s
timeout: 15s
retries: 3
start_period: 60s
file-monitor:
image: malcolmnetsec/file-monitor:5.2.6
restart: "no"
stdin_open: false
tty: true
hostname: file-monitor
environment:
<< : *process-variables
<< : *zeek-variables
VIRTUAL_HOST : 'file-monitor.malcolm.local'
expose:
- 3310
- 8440
volumes:
- ./zeek-logs/extract_files:/data/zeek/extract_files
- ./zeek-logs/current:/data/zeek/logs
- ./yara/rules:/yara-rules/custom:ro
healthcheck:
test: ["CMD", "supervisorctl", "status", "watcher", "logger"]
interval: 30s
timeout: 15s
retries: 3
start_period: 60s
pcap-capture:
image: malcolmnetsec/pcap-capture:5.2.6
restart: "no"
stdin_open: false
tty: true
network_mode: host
ulimits:
memlock:
soft: -1
hard: -1
cap_add:
- IPC_LOCK
- NET_ADMIN
- NET_RAW
- SYS_ADMIN
environment:
<< : *process-variables
<< : *pcap-capture-variables
volumes:
- ./pcap/upload:/pcap
pcap-monitor:
image: malcolmnetsec/pcap-monitor:5.2.6
restart: "no"
stdin_open: false
tty: true
hostname: pcapmon
environment:
<< : *process-variables
<< : *common-upload-variables
OPENSEARCH_URL : 'http://opensearch:9200'
depends_on:
- opensearch
expose:
- 30441
volumes:
- ./zeek-logs:/zeek
- ./pcap:/pcap
healthcheck:
test: ["CMD", "supervisorctl", "status", "watch-upload", "pcap-publisher"]
interval: 30s
timeout: 15s
retries: 3
start_period: 90s
upload:
image: malcolmnetsec/file-upload:5.2.6
restart: "no"
stdin_open: false
tty: true
hostname: upload
env_file:
- ./auth.env
environment:
<< : *process-variables
SITE_NAME : 'Capture File and Log Archive Upload'
VIRTUAL_HOST : 'upload.malcolm.local'
depends_on:
- arkime
expose:
- 80
ports:
- "127.0.0.1:8022:22"
volumes:
- ./pcap/upload:/var/www/upload/server/php/chroot/files
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost"]
interval: 30s
timeout: 15s
retries: 3
start_period: 60s
htadmin:
image: malcolmnetsec/htadmin:5.2.6
restart: "no"
stdin_open: false
tty: true
hostname: htadmin
environment:
<< : *process-variables
<< : *auth-variables
VIRTUAL_HOST : 'htadmin.malcolm.local'
expose:
- 80
volumes:
- ./htadmin/config.ini:/var/www/htadmin/config/config.ini:rw
- ./htadmin/metadata:/var/www/htadmin/config/metadata:rw
- ./nginx/htpasswd:/var/www/htadmin/config/htpasswd:rw
healthcheck:
test: ["CMD", "curl", "--silent", "--fail", "http://localhost"]
interval: 60s
timeout: 15s
retries: 3
start_period: 60s
freq:
image: malcolmnetsec/freq:5.2.6
restart: "no"
stdin_open: false
tty: true
hostname: freq
environment:
<< : *process-variables
<< : *common-lookup-variables
VIRTUAL_HOST : 'freq.malcolm.local'
expose:
- 10004
healthcheck:
test: ["CMD", "curl", "--silent", "--fail", "http://localhost:10004"]
interval: 30s
timeout: 15s
retries: 3
start_period: 60s
name-map-ui:
image: malcolmnetsec/name-map-ui:5.2.6
restart: "no"
stdin_open: false
tty: true
hostname: name-map-ui
environment:
<< : *process-variables
VIRTUAL_HOST : 'name-map-ui.malcolm.local'
expose:
- 8080
volumes:
- ./cidr-map.txt:/var/www/html/maps/cidr-map.txt:ro
- ./host-map.txt:/var/www/html/maps/host-map.txt:ro
- ./net-map.json:/var/www/html/maps/net-map.json:rw
healthcheck:
test: ["CMD", "curl", "--silent", "--fail", "http://localhost:8080/fpm-ping"]
interval: 30s
timeout: 15s
retries: 3
start_period: 60s
api:
image: malcolmnetsec/api:5.2.6
command: gunicorn --bind 0:5000 manage:app
restart: "no"
stdin_open: false
tty: true
hostname: api
environment:
<< : *process-variables
VIRTUAL_HOST : 'api.malcolm.local'
expose:
- 5000
healthcheck:
test: ["CMD", "curl", "--silent", "--fail", "http://localhost:5000/ping"]
interval: 30s
timeout: 15s
retries: 3
start_period: 60s
nginx-proxy:
image: malcolmnetsec/nginx-proxy:5.2.6
restart: "no"
stdin_open: false
tty: true
hostname: nginx-proxy
environment:
<< : *process-variables
<< : *auth-variables
<< : *nginx-variables
depends_on:
- api
- arkime
- dashboards
- upload
- htadmin
- name-map-ui
- file-monitor
ports:
- "0.0.0.0:443:443"
- "0.0.0.0:488:488"
- "0.0.0.0:5601:5601"
# - "0.0.0.0:9200:9200"
volumes:
- nginx-log-path:/var/log/nginx:rw
- ./nginx/nginx_ldap.conf:/etc/nginx/nginx_ldap.conf:ro
- ./nginx/htpasswd:/etc/nginx/.htpasswd:ro
- ./nginx/ca-trust:/etc/nginx/ca-trust:ro
- ./nginx/certs:/etc/nginx/certs:ro
- ./nginx/certs/dhparam.pem:/etc/nginx/dhparam/dhparam.pem:ro
healthcheck:
test: ["CMD", "curl", "--insecure", "--silent", "https://localhost:443"]
interval: 30s
timeout: 15s
retries: 3
start_period: 120s
# shared named volume so filebeat can access nginx access logs
volumes:
nginx-log-path: