-
Notifications
You must be signed in to change notification settings - Fork 19
/
dmarc_vulnerabilities.go
459 lines (456 loc) · 21.2 KB
/
dmarc_vulnerabilities.go
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
/*
Copyright 2019 Adevinta
*/
package main
import (
"github.com/adevinta/vulcan-check-sdk/helpers"
report "github.com/adevinta/vulcan-report"
)
var vulns = map[string]report.Vulnerability{
"dmarc-not-found": report.Vulnerability{
CWEID: 358,
Summary: "DMARC DNS Record Not Found",
Description: "No DMARC policy has been found for this domain.\nA DMARC " +
"(Domain-based Message Authentication, Reporting and Conformance) policy allows you " +
"to indicate that email messages from this domain are protected by SPF and DKIM, " +
"and tells recipients what to do if neither of those authentication methods passes, " +
"such as junk or reject the message. DMARC limits or eliminates your user's exposure to " +
"potentially fraudulent and harmful messages, such as phishing. DMARC also provides a way " +
"for recipients to automatically report back to you about messages that fail DMARC " +
"evaluation, so that you will be able to know if your email address is being used in " +
"phishing attacks or if some of your legitimate emails are being marked as spam.",
Score: report.SeverityThresholdLow,
ImpactDetails: "An attacker may be able to send email messages that appear to originate " +
"from this domain without your knowledge, which can be used to perform very convincing " +
"phishing attacks against your users.",
Recommendations: []string{
"Create a DMARC DNS TXT record beginning with 'v=DMARC1'",
"For easy DMARC deployment in AWS Route53, check our CloudFormation template in References",
},
References: []string{
"https://dmarc.org/",
"https://en.wikipedia.org/wiki/DMARC",
"https://tools.ietf.org/html/rfc7489#section-6.3",
},
Labels: []string{"issue", "dns"},
Fingerprint: helpers.ComputeFingerprint(),
},
"multiple-dmarc-found": report.Vulnerability{
CWEID: 358,
Summary: "DMARC Multiple Records Found",
Description: "Multiple DMARC policy records have been found for this domain.\nIf a domain" +
"contains multiple DMARC records, DMARC will not be processed at all.",
Score: report.SeverityThresholdLow,
ImpactDetails: "An attacker may be able to send email messages that appear to originate " +
"from this domain without your knowledge, which can be used to perform very convincing " +
"phishing attacks against your users.",
Recommendations: []string{
"Create a single DMARC record",
},
References: []string{
"https://dmarc.org/",
"https://en.wikipedia.org/wiki/DMARC",
"https://tools.ietf.org/html/rfc7489",
},
Labels: []string{"issue", "dns"},
Fingerprint: helpers.ComputeFingerprint(),
},
"unable-to-parse-tags": report.Vulnerability{
CWEID: 358,
Summary: "DMARC Unable To Parse Tags",
Description: "Some tags present in the DMARC policy record for this domain are invalid.\nIf a domain" +
"contains invalid DMARC tags or tag values, DMARC will not be processed at all.",
Score: report.SeverityThresholdLow,
ImpactDetails: "An attacker may be able to send email messages that appear to originate " +
"from this domain without your knowledge, which can be used to perform very convincing " +
"phishing attacks against your users.",
Recommendations: []string{
"Review the DMARC record and fix/remove any invalid tags/values",
},
References: []string{
"https://dmarc.org/",
"https://en.wikipedia.org/wiki/DMARC",
"https://tools.ietf.org/html/rfc7489#section-6.3",
},
Labels: []string{"issue", "dns"},
Fingerprint: helpers.ComputeFingerprint(),
},
"v-and-p-invalid-or-missing": report.Vulnerability{
CWEID: 358,
Summary: "DMARC 'v' And 'p' Are Invalid",
Description: "Tags 'v' and 'p' are missing or are invalid. A DMARC policy record MUST comply with the formal specification " +
"in that the 'v' and 'p' tags MUST be present and MUST appear in that order.",
Score: report.SeverityThresholdLow,
ImpactDetails: "An attacker may be able to send email messages that appear to originate " +
"from this domain without your knowledge, which can be used to perform very convincing " +
"phishing attacks against your users.",
References: []string{
"https://dmarc.org/",
"https://en.wikipedia.org/wiki/DMARC",
"https://tools.ietf.org/html/rfc7489#section-6.3",
},
Recommendations: []string{
"Review the record sintax and ensure: That 'v' and 'p' are present, have valid values and that they appear in that exact order.",
},
Labels: []string{"issue", "dns"},
Fingerprint: helpers.ComputeFingerprint(),
},
"tag-v-wrong-value": report.Vulnerability{
CWEID: 358,
Summary: "DMARC Tag 'v' Has Wrong Value",
Description: "Version (plain-text; REQUIRED). Identifies the record retrieved " +
"as a DMARC record. It MUST have the value of 'DMARC1'. The value " +
"of this tag MUST match precisely; if it does not or it is absent, " +
"the entire retrieved record MUST be ignored. It MUST be the first" +
"tag in the list.",
Score: report.SeverityThresholdLow,
ImpactDetails: "An attacker may be able to send email messages that appear to originate " +
"from this domain without your knowledge, which can be used to perform very convincing " +
"phishing attacks against your users.",
References: []string{
"https://dmarc.org/",
"https://en.wikipedia.org/wiki/DMARC",
"https://tools.ietf.org/html/rfc7489#section-6.3",
},
Recommendations: []string{
"Review the record syntax and ensure that tag 'v' is set to 'DMARC1'",
},
Labels: []string{"issue", "dns"},
Fingerprint: helpers.ComputeFingerprint(),
},
"tag-p-wrong-value": report.Vulnerability{
CWEID: 358,
Summary: "DMARC Tag 'p' Has Wrong Value",
Description: "The value of tag 'p' is not a valid one. Requested Mail Receiver policy (plain-text; REQUIRED for policy " +
"records). Indicates the policy to be enacted by the Receiver at " +
"the request of the Domain Owner. Policy applies to the domain " +
"queried and to subdomains, unless subdomain policy is explicitly " +
"described using the 'sp' tag. This tag is mandatory for policy " +
"records only, but not for third-party reporting records. Possible values are as follows: " +
"none: The Domain Owner requests no specific action be taken regarding delivery of messages. " +
"quarantine: The Domain Owner wishes to have email that fails the " +
"DMARC mechanism check be treated by Mail Receivers as " +
"suspicious. Depending on the capabilities of the Mail " +
"Receiver, this can mean 'place into spam folder', 'scrutinize " +
"with additional intensity', and/or 'flag as suspicious'. " +
"reject: The Domain Owner wishes for Mail Receivers to reject " +
"email that fails the DMARC mechanism check.",
Score: report.SeverityThresholdLow,
ImpactDetails: "An attacker may be able to send email messages that appear to originate " +
"from this domain without your knowledge, which can be used to perform very convincing " +
"phishing attacks against your users.",
References: []string{
"https://dmarc.org/",
"https://en.wikipedia.org/wiki/DMARC",
"https://tools.ietf.org/html/rfc7489#section-6.3",
},
Recommendations: []string{
"Review the record syntax and ensure that tag 'p' is set to one of the following values : 'none', 'quarantine' or 'reject'",
},
Labels: []string{"issue", "dns"},
Fingerprint: helpers.ComputeFingerprint(),
},
"tag-p-is-none": report.Vulnerability{
CWEID: 358,
Summary: "DMARC Tag 'p' Set To 'none'",
Description: "The value of tag 'p' is configured as 'none'. It should be set to 'reject'. " +
"none: The Domain Owner requests no specific action be taken regarding delivery of messages. " +
"reject: The Domain Owner wishes for Mail Receivers to reject " +
"email that fails the DMARC mechanism check.",
Score: report.SeverityThresholdLow,
ImpactDetails: "An attacker may be able to send email messages that appear to originate " +
"from this domain without your knowledge, which can be used to perform very convincing " +
"phishing attacks against your users.",
References: []string{
"https://dmarc.org/",
"https://en.wikipedia.org/wiki/DMARC",
"https://tools.ietf.org/html/rfc7489",
},
Recommendations: []string{
"Set tag 'p' to be 'reject'",
},
Labels: []string{"issue", "dns"},
Fingerprint: helpers.ComputeFingerprint(),
},
"tag-p-is-quarantine": report.Vulnerability{
CWEID: 358,
Summary: "DMARC Tag 'p' Set To 'quarantine'",
Description: "The value of tag 'p' is configured as 'quarantine'. It should be set to 'reject'. " +
"none: The Domain Owner requests no specific action be taken regarding delivery of messages. " +
"quarantine: The Domain Owner wishes to have email that fails the " +
"DMARC mechanism check be treated by Mail Receivers as " +
"suspicious. Depending on the capabilities of the Mail " +
"Receiver, this can mean 'place into spam folder', 'scrutinize " +
"with additional intensity', and/or 'flag as suspicious'. ",
Score: report.SeverityThresholdLow,
ImpactDetails: "An attacker may be able to send email messages that appear to originate " +
"from this domain without your knowledge, which can be used to perform very convincing " +
"phishing attacks against your users.",
References: []string{
"https://dmarc.org/",
"https://en.wikipedia.org/wiki/DMARC",
"https://tools.ietf.org/html/rfc7489",
},
Recommendations: []string{
"Set tag 'p' to be 'reject'",
},
Labels: []string{"issue", "dns"},
Fingerprint: helpers.ComputeFingerprint(),
},
"tag-rua-not-configured": report.Vulnerability{
CWEID: 358,
Summary: "DMARC Tag 'rua' Missing",
Description: "The tag 'rua' is not explicitly configured. " +
"rua: Addresses to which aggregate feedback is to be sent (comma-" +
"separated plain-text list of DMARC URIs; OPTIONAL).",
Score: report.SeverityThresholdNone,
References: []string{
"https://dmarc.org/",
"https://en.wikipedia.org/wiki/DMARC",
"https://tools.ietf.org/html/rfc7489",
},
Recommendations: []string{
"Explicitly define the value of tag 'rua'",
},
Labels: []string{"issue", "dns"},
Fingerprint: helpers.ComputeFingerprint(),
},
"tag-ruf-not-configured": report.Vulnerability{
CWEID: 358,
Summary: "DMARC Tag 'ruf' Missing",
Description: "The tag 'ruf' is not explicitly configured. " +
"ruf: Addresses to which message-specific failure information is to " +
"be reported (comma-separated plain-text list of DMARC URIs; " +
"OPTIONAL). If present, the Domain Owner is requesting Mail " +
"Receivers to send detailed failure reports about messages that " +
"fail the DMARC evaluation in specific ways (see the 'fo' tag " +
"above). The format of the message to be generated MUST follow the " +
"format specified for the 'rf' tag. ",
Score: report.SeverityThresholdNone,
References: []string{
"https://dmarc.org/",
"https://en.wikipedia.org/wiki/DMARC",
"https://tools.ietf.org/html/rfc7489",
},
Recommendations: []string{
"Explicitly define the value of tag 'ruf'",
},
Labels: []string{"issue", "dns"},
Fingerprint: helpers.ComputeFingerprint(),
},
"tag-pct-not-100": report.Vulnerability{
CWEID: 358,
Summary: "DMARC Tag 'pct' Is Not Set To '100'",
Description: "Selective DMARC policy 'pct' is not set to '100'. " +
"pct: (plain-text integer between 0 and 100, inclusive; OPTIONAL; " +
"default is 100). Percentage of messages from the Domain Owner's " +
"mail stream to which the DMARC policy is to be applied. ",
Score: report.SeverityThresholdNone,
References: []string{
"https://dmarc.org/",
"https://en.wikipedia.org/wiki/DMARC",
"https://tools.ietf.org/html/rfc7489",
},
Recommendations: []string{
"Set tag 'pct' to be '100'",
},
Labels: []string{"issue", "dns"},
Fingerprint: helpers.ComputeFingerprint(),
},
"tag-rua-not-valid-mailto": report.Vulnerability{
CWEID: 358,
Summary: "DMARC Tag 'rua' Is Invalid",
Description: "The 'rua' tag has an invalid value. It should be a comma-separated plain-text list of DMARC URIs. " +
"rua: Addresses to which aggregate feedback is to be sent (comma-" +
"separated plain-text list of DMARC URIs; OPTIONAL).",
Score: report.SeverityThresholdLow,
ImpactDetails: "An attacker may be able to send email messages that appear to originate " +
"from this domain without your knowledge, which can be used to perform very convincing " +
"phishing attacks against your users.",
References: []string{
"https://dmarc.org/",
"https://en.wikipedia.org/wiki/DMARC",
"https://tools.ietf.org/html/rfc7489",
},
Recommendations: []string{
"Review the record syntax and ensure that tag 'rua' is a valid list of mail addresses",
},
Labels: []string{"issue", "dns"},
Fingerprint: helpers.ComputeFingerprint(),
},
"tag-ruf-not-valid-mailto": report.Vulnerability{
CWEID: 358,
Summary: "DMARC Tag 'ruf' Is Invalid",
Description: "The 'ruf' tag has an invalid value. It should be a comma-separated plain-text list of DMARC URIs." +
"ruf: Addresses to which message-specific failure information is to " +
"be reported (comma-separated plain-text list of DMARC URIs; " +
"OPTIONAL).",
Score: report.SeverityThresholdLow,
ImpactDetails: "An attacker may be able to send email messages that appear to originate " +
"from this domain without your knowledge, which can be used to perform very convincing " +
"phishing attacks against your users.",
References: []string{
"https://dmarc.org/",
"https://en.wikipedia.org/wiki/DMARC",
"https://tools.ietf.org/html/rfc7489",
},
Recommendations: []string{
"Review the record syntax and ensure that tag 'ruf' is a valid list of mail addresses",
},
Labels: []string{"issue", "dns"},
Fingerprint: helpers.ComputeFingerprint(),
},
"tag-adkim-not-valid": report.Vulnerability{
CWEID: 358,
Summary: "DMARC Tag 'adkim' Is Invalid",
Description: "The 'adkim' tag has an invalid value. " +
"adkim: (plain-text; OPTIONAL; default is 'r'.) Indicates whether " +
"strict or relaxed DKIM Identifier Alignment mode is required by " +
"the Domain Owner. Valid values are as follows: [r: relaxed mode, s: strict mode]",
Score: report.SeverityThresholdLow,
ImpactDetails: "An attacker may be able to send email messages that appear to originate " +
"from this domain without your knowledge, which can be used to perform very convincing " +
"phishing attacks against your users.",
References: []string{
"https://dmarc.org/",
"https://en.wikipedia.org/wiki/DMARC",
"https://tools.ietf.org/html/rfc7489",
},
Recommendations: []string{
"Review the record syntax and ensure that tag 'adkim' is set to one of the following values : 'r' or 's'",
},
Labels: []string{"issue", "dns"},
Fingerprint: helpers.ComputeFingerprint(),
},
"tag-aspf-not-valid": report.Vulnerability{
CWEID: 358,
Summary: "DMARC Tag 'aspf' Is Invalid",
Description: "The 'aspf' tag has an invalid value. " +
"aspf: (plain-text; OPTIONAL; default is 'r'.) Indicates whether " +
"strict or relaxed SPF Identifier Alignment mode is required by the " +
"Domain Owner. Valid values are as follows: [r: relaxed mode, s: strict mode] ",
Score: report.SeverityThresholdLow,
ImpactDetails: "An attacker may be able to send email messages that appear to originate " +
"from this domain without your knowledge, which can be used to perform very convincing " +
"phishing attacks against your users.",
References: []string{
"https://dmarc.org/",
"https://en.wikipedia.org/wiki/DMARC",
"https://tools.ietf.org/html/rfc7489",
},
Recommendations: []string{
"Review the record syntax and ensure that tag 'aspf' is set to one of the following values : 'r' or 's'",
},
Labels: []string{"issue", "dns"},
Fingerprint: helpers.ComputeFingerprint(),
},
"tag-sp-not-valid": report.Vulnerability{
CWEID: 358,
Summary: "DMARC Tag 'sp' Is Invalid",
Description: "The 'sp' tag has an invalid value. " +
"sp: Requested Mail Receiver policy for all subdomains (plain-text; " +
"OPTIONAL). Indicates the policy to be enacted by the Receiver at " +
"the request of the Domain Owner. It applies only to subdomains of " +
"the domain queried and not to the domain itself. Possible values are as follows: " +
"none: The Domain Owner requests no specific action be taken regarding delivery of messages. " +
"quarantine: The Domain Owner wishes to have email that fails the " +
"DMARC mechanism check be treated by Mail Receivers as " +
"suspicious. Depending on the capabilities of the Mail " +
"Receiver, this can mean 'place into spam folder', 'scrutinize " +
"with additional intensity', and/or 'flag as suspicious'. " +
"reject: The Domain Owner wishes for Mail Receivers to reject " +
"email that fails the DMARC mechanism check.",
Score: report.SeverityThresholdLow,
ImpactDetails: "An attacker may be able to send email messages that appear to originate " +
"from this domain without your knowledge, which can be used to perform very convincing " +
"phishing attacks against your users.",
References: []string{
"https://dmarc.org/",
"https://en.wikipedia.org/wiki/DMARC",
"https://tools.ietf.org/html/rfc7489",
},
Recommendations: []string{
"Review the record syntax and ensure that tag 'sp' is set to one of the following values: 'none', 'quarantine' or 'reject'",
},
Labels: []string{"issue", "dns"},
Fingerprint: helpers.ComputeFingerprint(),
},
"tag-fo-not-valid": report.Vulnerability{
CWEID: 358,
Summary: "DMARC Tag 'fo' Is Invalid",
Description: "The 'fo' tag has an invalid value. " +
"fo: Failure reporting options (plain-text; OPTIONAL; default is '0')" +
"Provides requested options for generation of failure reports. " +
"Report generators MAY choose to adhere to the requested options. " +
"This tag's content MUST be ignored if a 'ruf' tag is not " +
"also specified. The value of this tag is a colon-separated list " +
"of characters that indicate failure reporting options as follows: " +
"0: Generate a DMARC failure report if all underlying authentication mechanisms fail to produce an aligned 'pass' result. " +
"1: Generate a DMARC failure report if any underlying authentication mechanism produced something other than an aligned 'pass' result. " +
"d: Generate a DKIM failure report if the message had a signature that failed evaluation, regardless of its alignment. " +
"s: Generate an SPF failure report if the message failed SPF evaluation, regardless of its alignment. ",
Score: report.SeverityThresholdLow,
ImpactDetails: "An attacker may be able to send email messages that appear to originate " +
"from this domain without your knowledge, which can be used to perform very convincing " +
"phishing attacks against your users.",
References: []string{
"https://dmarc.org/",
"https://en.wikipedia.org/wiki/DMARC",
"https://tools.ietf.org/html/rfc7489",
},
Recommendations: []string{
"Review the record syntax and ensure that tag 'fo' is set to one of the following values: '0', '1', 'd' or 's'",
},
Labels: []string{"issue", "dns"},
Fingerprint: helpers.ComputeFingerprint(),
},
"tag-rf-not-valid": report.Vulnerability{
CWEID: 358,
Summary: "DMARC Tag 'rf' Is Invalid",
Description: "The 'rf' tag has an invalid value. " +
"rf: Format to be used for message-specific failure reports (colon- " +
"separated plain-text list of values; OPTIONAL; default is 'afrf'). " +
"The value of this tag is a list of one or more report formats as " +
"requested by the Domain Owner to be used when a message fails both " +
"[SPF] and [DKIM] tests to report details of the individual " +
"failure. For this version, only 'afrf' (the auth-failure report " +
"type) is presently supported. ",
Score: report.SeverityThresholdLow,
ImpactDetails: "An attacker may be able to send email messages that appear to originate " +
"from this domain without your knowledge, which can be used to perform very convincing " +
"phishing attacks against your users.",
References: []string{
"https://dmarc.org/",
"https://en.wikipedia.org/wiki/DMARC",
"https://tools.ietf.org/html/rfc7489",
},
Recommendations: []string{
"Review the record syntax and ensure that tag 'rf' is set to 'afrf'",
},
Labels: []string{"issue", "dns"},
Fingerprint: helpers.ComputeFingerprint(),
},
"tag-ri-not-valid": report.Vulnerability{
CWEID: 358,
Summary: "DMARC Tag 'ri' Is Invalid",
Description: "The 'ri' tag has an invalid value. " +
"ri: Interval requested between aggregate reports (plain-text 32-bit " +
"unsigned integer; OPTIONAL; default is 86400). Indicates a " +
"request to Receivers to generate aggregate reports separated by no " +
"more than the requested number of seconds. ",
Score: report.SeverityThresholdLow,
ImpactDetails: "An attacker may be able to send email messages that appear to originate " +
"from this domain without your knowledge, which can be used to perform very convincing " +
"phishing attacks against your users.",
References: []string{
"https://dmarc.org/",
"https://en.wikipedia.org/wiki/DMARC",
"https://tools.ietf.org/html/rfc7489",
},
Recommendations: []string{
"Review the record syntax and ensure that tag 'ri' is set to an integer",
},
Labels: []string{"issue", "dns"},
Fingerprint: helpers.ComputeFingerprint(),
},
}