Skip to content

Commit b362198

Browse files
[PR #3737] added rule: Reconnaissance: Large unknown recipient list
1 parent cb58a9c commit b362198

File tree

1 file changed

+95
-0
lines changed

1 file changed

+95
-0
lines changed
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: "Reconnaissance: Large unknown recipient list"
2+
description: |
3+
Recon messages, a form of deliverability testing, are used to validate whether a recipient address is valid or not, potentially preceding an attack.
4+
5+
There's a large number of recipients that are unknown to the organization, no links or attachments, and a short body and subject from an unknown sender.
6+
type: "rule"
7+
severity: "low"
8+
source: |
9+
type.inbound
10+
and (
11+
length(recipients.to) > 10
12+
and length(filter(recipients.to,
13+
.email.domain.domain not in $org_domains
14+
and .email.email not in $recipient_emails
15+
and (
16+
.email.domain.valid
17+
or strings.icontains(.display_name, "undisclosed")
18+
)
19+
)
20+
) >= 10
21+
)
22+
and (
23+
length(subject.subject) <= 10
24+
or subject.subject == body.current_thread.text
25+
or (subject.is_reply and length(body.previous_threads) == 0)
26+
)
27+
or not (
28+
length(subject.subject) <= 10
29+
or subject.subject == body.current_thread.text
30+
or (subject.is_reply and length(body.previous_threads) == 0)
31+
)
32+
and (
33+
length(body.links) == 0
34+
or length(filter(body.links,
35+
(
36+
.display_text is null
37+
and .display_url.url == sender.email.domain.root_domain
38+
)
39+
or .href_url.domain.domain == "aka.ms"
40+
or network.whois(.display_url.domain).days_old < 30
41+
)
42+
) == length(body.links)
43+
)
44+
and (
45+
length(attachments) == 0
46+
or (
47+
length(attachments) == 1
48+
and any(attachments,
49+
.file_type in ("pdf", "png", "jpg", "tif", "heif", "doc", "docx")
50+
and any(file.explode(.),
51+
length(.scan.ocr.raw) < 20
52+
or length(.scan.strings.strings) == 1
53+
)
54+
)
55+
)
56+
)
57+
and (
58+
body.current_thread.text is null
59+
or length(body.current_thread.text) < 50
60+
// body length without disclaimer is shorter than 50 characters
61+
or (
62+
any(map(filter(ml.nlu_classifier(body.current_thread.text).entities,
63+
.name == "disclaimer"
64+
),
65+
.text
66+
),
67+
(length(body.current_thread.text) - length(.)) < 50
68+
)
69+
)
70+
)
71+
and profile.by_sender().prevalence != "common"
72+
and not profile.by_sender().solicited
73+
and not profile.by_sender().any_messages_benign
74+
75+
// negate highly trusted sender domains unless they fail DMARC authentication
76+
and (
77+
(
78+
sender.email.domain.root_domain in $high_trust_sender_root_domains
79+
and not headers.auth_summary.dmarc.pass
80+
)
81+
or sender.email.domain.root_domain not in $high_trust_sender_root_domains
82+
)
83+
tags:
84+
- "Attack surface reduction"
85+
- "Deliverability testing"
86+
attack_types:
87+
- "Reconnaissance"
88+
detection_methods:
89+
- "Content analysis"
90+
- "Header analysis"
91+
- "Sender analysis"
92+
id: "436c0821-b70c-53ba-aa73-e177a69309bb"
93+
og_id: "24783a28-b6e2-5cca-9f6d-19c2cdfa6a9a"
94+
testing_pr: 3737
95+
testing_sha: 62dfb5c7d8b69d7a7017482d24b027a86d0e774c

0 commit comments

Comments
 (0)