Skip to content

Commit 2b2bf66

Browse files
[Test Rules] [PR #4376] added rule: Employee impersonation with urgent request (untrusted sender)
1 parent ac16686 commit 2b2bf66

1 file changed

Lines changed: 105 additions & 0 deletions

File tree

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: "Employee impersonation with urgent request (untrusted sender)"
2+
description: |
3+
Sender is using a display name that matches the display name of someone in your organization.
4+
5+
Detects potential Business Email Compromise (BEC) attacks by analyzing text within email body from untrusted senders.
6+
type: "rule"
7+
severity: "medium"
8+
source: |
9+
type.inbound
10+
11+
// ensure the display name contains a space to avoid single named process accounts eg. 'billing, payment'
12+
and strings.contains(sender.display_name, " ")
13+
and sender.display_name in~ $org_display_names
14+
and (
15+
any(ml.nlu_classifier(body.current_thread.text).intents,
16+
.name == "bec" and .confidence == "high"
17+
)
18+
or (
19+
(
20+
any(ml.nlu_classifier(body.current_thread.text).entities,
21+
.name == "urgency"
22+
)
23+
and any(ml.nlu_classifier(body.current_thread.text).entities,
24+
.name == "request"
25+
)
26+
)
27+
and not any(ml.nlu_classifier(body.current_thread.text).intents,
28+
.name == "benign" and .confidence == "high"
29+
)
30+
and (
31+
(
32+
// there are intents returned
33+
any(ml.nlu_classifier(body.current_thread.text).intents, true)
34+
// short body that also contains an org display name
35+
or (
36+
length(body.current_thread.text) > 200
37+
and any(ml.nlu_classifier(body.current_thread.text).entities,
38+
.name == "sender" and .text in~ $org_display_names
39+
)
40+
)
41+
)
42+
and not strings.istarts_with(subject.subject, "fwd:")
43+
)
44+
)
45+
or (
46+
any(ml.nlu_classifier(body.current_thread.text).entities,
47+
.name == "request"
48+
)
49+
and sender.email.domain.root_domain in $free_email_providers
50+
and any(headers.hops,
51+
any(.fields,
52+
.name == "X-Forefront-Antispam-Report"
53+
and (
54+
strings.icontains(.value, "CAT:PHISH")
55+
or strings.icontains(.value, "CAT:SPOOF")
56+
or strings.icontains(.value, "CAT:HSPM")
57+
)
58+
)
59+
)
60+
)
61+
)
62+
and (
63+
(
64+
profile.by_sender().prevalence in ("new", "outlier")
65+
and not profile.by_sender().solicited
66+
)
67+
or (
68+
profile.by_sender().any_messages_malicious_or_spam
69+
and not profile.by_sender().any_messages_benign
70+
)
71+
or not headers.auth_summary.dmarc.pass
72+
)
73+
74+
// negate org domains unless they fail DMARC authentication
75+
and (
76+
(
77+
sender.email.domain.root_domain in $org_domains
78+
and not headers.auth_summary.dmarc.pass
79+
)
80+
or sender.email.domain.root_domain not in $org_domains
81+
)
82+
83+
// negate highly trusted sender domains unless they fail DMARC authentication
84+
and (
85+
(
86+
sender.email.domain.root_domain in $high_trust_sender_root_domains
87+
and not headers.auth_summary.dmarc.pass
88+
)
89+
or sender.email.domain.root_domain not in $high_trust_sender_root_domains
90+
)
91+
and not profile.by_sender().any_messages_benign
92+
attack_types:
93+
- "BEC/Fraud"
94+
tactics_and_techniques:
95+
- "Impersonation: Employee"
96+
- "Social engineering"
97+
detection_methods:
98+
- "Content analysis"
99+
- "Header analysis"
100+
- "Natural Language Understanding"
101+
- "Sender analysis"
102+
id: "dfda762d-32eb-5101-ab91-544288c41a21"
103+
og_id: "1ce9a146-1293-531e-bb02-0af7ad1b018e"
104+
testing_pr: 4376
105+
testing_sha: 428d67034f48490a6127eeda449dca1145aae686

0 commit comments

Comments
 (0)