-
-
Notifications
You must be signed in to change notification settings - Fork 59
/
spamscope.example.yml
368 lines (287 loc) · 10 KB
/
spamscope.example.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
---
# Spouts configurations
# Spout file on file system
files-mails:
# Reload new mails after reload.mails analyzed
reload.mails: 1000
# The mails in processing older that fail.after.seconds will be failed
fail.after.seconds: 60
# Post processing
post_processing:
# move or remove mails analyzed, default remove
what: remove
# Where you want move the analyzed mails, default /tmp/moved
where: /tmp/moved
# Where you want move the failed mails, default /tmp/failed
where.failed: /tmp/failed
# Mailboxes
mailboxes:
test:
mail_server: hostname
# Trust string is used to get sender IP address from mail server.
# More details:
# https://github.com/SpamScope/mail-parser/blob/v0.4.6/mailparser/__init__.py#L221
trust_string: "test_trust_string"
files_pattern: "*untroubled*"
priority: 1
path_mails: /path/mails1
# This flag enables Outlook msg parsing for every mails in mailbox
# Default value is false
outlook: false
# List of others headers to get
headers:
- custom_one
- custom_two
test1:
mail_server: hostname
trust_string: "test1_trust_string"
files_pattern: "*"
priority: 2
path_mails: /path/mails2
# Spout file on file system
# Use an iterator. Safe for RAM
iter-files-mails:
# The mails in processing older that fail.after.seconds will be failed
fail.after.seconds: 60
# Post processing
post_processing:
# move or remove mails analyzed, default remove
what: remove
# Where you want move the analyzed mails, default /tmp/moved
where: /tmp/moved
# Where you want move the failed mails, default /tmp/failed
where.failed: /tmp/failed
# Mailboxes
mailboxes:
test:
mail_server: hostname
# Trust string is used to get sender IP address from mail server.
# More details:
# https://github.com/SpamScope/mail-parser/blob/v0.4.6/mailparser/__init__.py#L221
trust_string: "test_trust_string"
files_pattern: "*untroubled*"
path_mails: /path/mails1
# This flag enables Outlook msg parsing for every mails in mailbox
# Default value is false
outlook: false
# List of others headers to get
headers:
- custom_one
- custom_two
test1:
mail_server: hostname
trust_string: "test1_trust_string"
files_pattern: "*"
path_mails: /path/mails2
# Bolts configurations
# Phishing bolt configuration
phishing:
lists:
subjects:
# Suspect subjects
# Example in conf/keywords/subjects.example.yml
generic: /path/to/generic_subjects
custom: /path/to/custom_subjects
targets:
# Keyword for every targets
# Example in conf/keywords/targets.example.yml
generic: /path/to/generic_targets
custom: /path/to/custom_targets
tokenizer:
# Persistent where store dumps of hashes.
persistent_path: /tmp
# If true mails with same hash are filtered and not analyzed.
# Only the body will not saved
filter_mails: true
# Max number of hashes saved for filter function
maxlen_mails: 1000000
# If true attachments with same hash are filtered and not analyzed.
# Only hashes will be saved
filter_attachments: true
# Max number of hashes saved for filter function
maxlen_attachments: 1000000
# If true the same ip address is filtered and not analyzed.
filter_network: true
# Max number of hashes saved for filter function
maxlen_network: 1000000
# Network bolt configuration
network:
# Shodan analysis https://www.shodan.io/
shodan:
enabled: false
api_key: xxxxxxxxxxxxxxxxxxxxxxxxxx
# VirusTotal analysis https://www.virustotal.com/
virustotal:
enabled: false
api_key: xxxxxxxxxxxxxxxxxxxxxxxxxx
# RawMail bolt configuration
raw_mail:
# SpamAssassin analysis: https://spamassassin.apache.org/
spamassassin:
enabled: false
# Dialect analysis: https://sissden.eu/blog/analysis-of-smtp-dialects
dialect:
enabled: false
# elasticsearch instance where are postfix logs
elasticsearch:
hosts:
- "node1:9200"
- "node2"
# Prefix with dash '-' of Postfix index in Elasticsearch
# The format of indices should be postfix-2018.12.30
index.prefix.postfix: postfix-
# Attachments bolt configuration
attachments:
commons:
# enable or disable filter on size
size.filter.enabled: false
# max size to analyze in bytes
max.size: 3145728
# The lists of all components must be under lists keyword to load them
# automatically
lists:
blacklist_content_types:
# All content types to remove from results
# Example in content_types/blacklist/generic.example.yml
generic: /path/to/generic_content_types
custom: /path/to/custom_content_types
not_extract_content_types:
# All content types that you don't want extract from archive
# Example: application/java-archive (jar), you can save the jar
# but do not extract the class inside.
generic: /path/to/generic_content_types
custom: /path/to/custom_content_types
# Apache Tika analysis: https://tika.apache.org/
tika:
# Enable Tika but it's very slow:
enabled: false
path_jar: /path/to/tika_jar
# Like parameter -Xmx of java application
memory_allocation:
# All content types to extract details
# Example in content_types/tika/generic.example.yml
lists:
whitelist_content_types:
generic: /path/to/generic_content_types
custom: /path/to/custom_content_types
# VirusTotal analysis: https://www.virustotal.com/
virustotal:
enabled: false
api_key: xxxxxxxxxxxxxxxxxxxxxxxxxx
# All content types to analyze with virustotal
# Example in content_types/virustotal/generic.example.yml
# Now is not active
lists:
whitelist_content_types:
generic: /path/to/generic_content_types
custom: /path/to/custom_content_types
# Thug analysis: https://github.com/buffer/thug
thug:
enabled: false
# File extensions to submit to thug
extensions:
- .html
- .js
- .jse
# More details:
# http://buffer.github.io/thug/doc/usage.html#basic-usage
#
# list of user agents to use for analysis
# SpamScope gets start an analysis for user agent
user_agents:
- win7ie90
referer: http://www.google.com/
# Set the singe analysis timeout in seconds
# This value MUST be lower than supervisor.worker.timeout.secs
# of SpamScope:
# nr. user agents * timeout < supervisor.worker.timeout.secs
timeout: 10
# Set the connect timeout in seconds
connect_timeout: 1
disable_cert_logging: true
disable_code_logging: true
# Maximum pages to fetch
# For SpamScope a good value is 1 to have short analysis
threshold: 1
# Zemana Antimalware analysis: https://www.zemana.com/
# only premium users
zemana:
enabled: false
PartnerId: xxxxx
UserId: xxxxx
ApiKey: xxxxx
useragent: SpamScope
# This plugin store the samples on file system
# in date format subfolders (YYYY-MM-DD)
store_samples:
enabled: false
base_path: /tmp
# Urls
urls:
whitelists:
# Only second level domains to whitelisting
# Example in conf/whitelists/generic.example.yml
alexa:
path: /path/to/alexa
expiry: 2016-06-28T12:33:00.000Z # date ISO 8601 only UTC
test1:
path: /path/to/test1
expiry:
test2:
path: /path/to/test2
# Output debug bolt configuration
output-debug:
json.indent: 4
output.path: /path/to/output
# Output Redis
# hosts:
# The hostname(s) of your Redis server(s). Ports may be specified on any
# hostname, which will override the global port config.
# If the hosts list is an array, it will pick one random host to connect to,
# if that host is disconnected it will then pick another.
# For example:
# "127.0.0.1"
# ["127.0.0.1", "127.0.0.2"]
# ["127.0.0.1:6380", "127.0.0.1"]
# shuffle_hosts:
# Shuffle the host list during connection.
# port:
# The default port to connect on. Can be overridden on any host.
# db:
# The Redis database number.
# password:
# Password to authenticate with. There is no authentication by default.
# reconnect_interval:
# Interval for reconnecting to failed Redis connections.
# max_retry:
# number of connect retries
# flush_size:
# max number of json to send in a bulk
# queue_name:
# name of Redis server list
output-redis:
servers:
hosts:
- "localhost:6379"
- "localhost:6380"
shuffle_hosts: true
port: 6379
db: 0
password:
reconnect_interval: 1
max_retry: 60
flush_size: 50
queue_mails: spamscope_mails
queue_attachments: spamscope_attachments
output-elasticsearch:
servers:
hosts:
- "node1:9200"
- "node2"
# Prefix with dash '-'. SpamScope use a index for day
index.prefix.mails: spamscope_mails-
doc.type.mails: analysis
index.prefix.attachments: spamscope_attachments-
doc.type.attachments: analysis
# max number of json to send in a bulk
flush_size: 50