forked from cisagov/Malcolm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-standalone.yml
271 lines (262 loc) · 8.02 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
# Copyright (c) 2019 Battelle Energy Alliance, LLC. All rights reserved.
version: '3.7'
################################################################################
# Commonly tweaked configuration options
#-------------------------------------------------------------------------------
x-moloch-variables: &moloch-variables
# INITIALIZEDB should be 'true' on Moloch's first execution, and 'false' every other time
INITIALIZEDB : 'true'
MANAGE_PCAP_FILES : 'false'
ZEEK_AUTO_ANALYZE_PCAP_FILES : 'false'
MOLOCH_ANALYZE_PCAP_THREADS : 1
ZEEK_AUTO_ANALYZE_PCAP_THREADS : 1
x-logstash-variables: &logstash-variables
LOGSTASH_OUI_LOOKUP : 'true'
LOGSTASH_REVERSE_DNS : 'false'
# ES_EXTERNAL_HOSTS : '10.0.0.123:9200'
# ES_EXTERNAL_SSL : 'true'
# ES_EXTERNAL_SSL_CERTIFICATE_VERIFICATION : 'false'
# For security, ES_EXTERNAL_USER and ES_EXTERNAL_PASSWORD should be stored in Logstash keystore using ./scripts/auth_setup.sh
# See also volume mount for logstash.keystore below.
# ES_EXTERNAL_USER : 'janedoe'
# ES_EXTERNAL_PASSWORD : 'secret'
x-kibana-variables: &kibana-variables
KIBANA_OFFLINE_REGION_MAPS : 'true'
x-common-upload-variables: &common-upload-variables
AUTO_TAG : 'true'
x-common-beats-variables: &common-beats-variables
BEATS_SSL : 'false'
x-zeek-file-extraction-variables: &zeek-file-extraction-variables
ZEEK_EXTRACTOR_MODE : 'none'
EXTRACTED_FILE_IGNORE_EXISTING : 'false'
EXTRACTED_FILE_PRESERVATION : 'quarantined'
EXTRACTED_FILE_START_SLEEP : 30
EXTRACTED_FILE_MIN_BYTES : 64
EXTRACTED_FILE_MAX_BYTES : 134217728
VTOT_API2_KEY : '0'
VTOT_REQUESTS_PER_MINUTE : 4
EXTRACTED_FILE_ENABLE_CLAMAV : 'false'
EXTRACTED_FILE_ENABLE_FRESHCLAM : 'false'
x-pcap-capture-variables: &pcap-capture-variables
PCAP_ENABLE_NETSNIFF : 'false'
PCAP_ENABLE_TCPDUMP : 'false'
PCAP_IFACE : 'eth0'
PCAP_ROTATE_MEGABYTES : 500
PCAP_ROTATE_MINUTES : 30
PCAP_FILTER : ''
################################################################################
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.0
hostname: elasticsearch
environment:
bootstrap.memory_lock : 'true'
ES_JAVA_OPTS : '-Xms4g -Xmx4g -Xss256k -Djava.security.egd=file:/dev/./urandom'
VIRTUAL_HOST : 'es.malcolm.local'
cluster.routing.allocation.disk.threshold_enabled : 'false'
cluster.routing.allocation.node_initial_primaries_recoveries : 8
cluster.max_shards_per_node : 2500
expose:
- 9200
ulimits:
memlock:
soft: -1
hard: -1
cap_add:
- IPC_LOCK
healthcheck:
test: ["CMD", "curl", "-f", "https://localhost:9200"]
interval: 30s
timeout: 15s
retries: 3
start_period: 180s
volumes:
- ./elasticsearch:/usr/share/elasticsearch/data:delegated
kibana:
image: malcolmnetsec/kibana-oss:1.2.0
hostname: kibana
environment:
<< : *kibana-variables
ELASTICSEARCH_URL : 'https://elasticsearch:9200'
VIRTUAL_HOST : 'kibana.malcolm.local'
CREATE_ES_MOLOCH_SESSION_INDEX : 'true'
MOLOCH_INDEX_PATTERN : 'sessions2-*'
MOLOCH_INDEX_PATTERN_ID : 'sessions2-*'
MOLOCH_INDEX_TIME_FIELD : 'firstPacket'
depends_on:
- elasticsearch
expose:
- 5601
- 28991
healthcheck:
test: ["CMD", "curl", "-f", "https://localhost:5601/api/status"]
interval: 30s
timeout: 15s
retries: 3
start_period: 200s
elastalert:
image: malcolmnetsec/elastalert:1.2.0
hostname: elastalert
environment:
ELASTICSEARCH_URL : 'https://elasticsearch:9200'
ES_HOST : 'elasticsearch'
ES_PORT : 9200
VIRTUAL_HOST : 'elastalert.malcolm.local'
depends_on:
- elasticsearch
expose:
- 3030
healthcheck:
test: ["CMD", "curl", "-f", "https://localhost:3030"]
interval: 30s
timeout: 15s
retries: 3
start_period: 200s
volumes:
- ./elastalert/config/elastalert.yaml:/opt/elastalert/config.yaml
- ./elastalert/config/config.json:/opt/elastalert-server/config/config.json
- ./elastalert/rules/:/opt/elastalert/rules/
logstash:
image: malcolmnetsec/logstash-oss:1.2.0
hostname: logstash
environment:
<< : *logstash-variables
<< : *common-beats-variables
ES_HOSTS : 'elasticsearch:9200'
LS_JAVA_OPTS : '-Xms2g -Xmx2g -Djava.security.egd=file:/dev/./urandom'
depends_on:
- elasticsearch
expose:
- 5000
- 5044
- 9600
healthcheck:
test: ["CMD", "curl", "-f", "https://localhost:9600"]
interval: 30s
timeout: 15s
retries: 3
start_period: 600s
volumes:
# - ./logstash/certs/logstash.keystore:/usr/share/logstash/config/logstash.keystore: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
filebeat:
image: malcolmnetsec/filebeat-oss:1.2.0
hostname: filebeat
environment:
<< : *common-upload-variables
<< : *common-beats-variables
FILEBEAT_LOG_PATH : '/data/zeek/current'
FILEBEAT_LOG_CLEANUP_MINUTES : 0
FILEBEAT_ZIP_CLEANUP_MINUTES : 0
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:
- ./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
moloch:
image: malcolmnetsec/moloch:1.2.0
hostname: moloch
env_file:
- ./auth.env
environment:
<< : *common-upload-variables
<< : *moloch-variables
<< : *zeek-file-extraction-variables
MOLOCH_VERSION : '1.8.0'
VIRTUAL_HOST : 'moloch.malcolm.local'
ES_HOST : 'elasticsearch'
ES_PORT : 9200
VIEWER : 'on'
WISE : 'on'
WIPEDB : 'false'
ulimits:
memlock:
soft: -1
hard: -1
depends_on:
- elasticsearch
expose:
- 8000
- 8005
- 8081
volumes:
- ./pcap:/data/pcap
- ./zeek-logs/upload:/data/zeek/upload
- ./zeek-logs/extract_files:/data/zeek/extract_files
- ./moloch-logs:/data/moloch/logs
- ./moloch-raw:/data/moloch/raw
file-monitor:
image: malcolmnetsec/file-monitor:1.2.0
hostname: filemon
environment:
<< : *zeek-file-extraction-variables
expose:
- 3310
volumes:
- ./zeek-logs/extract_files:/data/zeek/extract_files
- ./zeek-logs/current:/data/zeek/logs
pcap-capture:
image: malcolmnetsec/pcap-capture:1.2.0
network_mode: host
ulimits:
memlock:
soft: -1
hard: -1
cap_add:
- IPC_LOCK
- NET_ADMIN
- NET_RAW
- SYS_ADMIN
environment:
<< : *pcap-capture-variables
volumes:
- ./pcap/upload:/pcap
upload:
image: malcolmnetsec/file-upload:1.2.0
hostname: upload
env_file:
- ./auth.env
environment:
SITE_NAME : 'Capture File and Log Archive Upload'
VIRTUAL_HOST : 'upload.malcolm.local'
depends_on:
- moloch
expose:
- 80
ports:
- 127.0.0.1:8022:22
volumes:
- ./pcap/upload:/var/www/upload/server/php/chroot/files
nginx-proxy:
image: malcolmnetsec/nginx-proxy:1.2.0
hostname: nginx-proxy
depends_on:
- moloch
- kibana
- upload
ports:
- "443:443"
- "3030:3030"
- "5601:5601"
- "8443:8443"
- "9200:9200"
- "9600:9600"
- "28991:28991"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./nginx/htpasswd:/etc/nginx/.htpasswd:ro
- ./nginx/certs:/etc/nginx/certs:ro