Skip to content

Commit 1a802dd

Browse files
[Shared Samples] [PR #4586] modified rule: PR# 4586 - BEC: Tax document request
1 parent 2052ebf commit 1a802dd

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

detection-rules/4586_tax_w2_impersonation.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ type: "rule"
44
severity: "medium"
55
source: |
66
type.inbound
7-
and length(body.current_thread.text) < 500
87
and sender.email.local_part in~ (
98
"contact",
109
"no-reply",
@@ -35,10 +34,17 @@ source: |
3534
)
3635
// body text containing variations of "W2"
3736
and (
38-
strings.icontains(body.current_thread.text, "w2")
39-
or strings.icontains(body.current_thread.text, "W-2")
40-
or strings.icontains(body.current_thread.text, "Ẇ-2's")
41-
or strings.icontains(body.current_thread.text, "wage")
37+
(
38+
strings.icontains(body.current_thread.text, "w2")
39+
or strings.icontains(body.current_thread.text, "W-2")
40+
or strings.icontains(body.current_thread.text, "Ẇ-2")
41+
or strings.icontains(body.current_thread.text, "wage statements")
42+
)
43+
or (
44+
length(headers.reply_to) > 0
45+
and all(headers.reply_to, network.whois(.email.domain).days_old <= 60)
46+
and strings.icontains(body.current_thread.text, "W-2")
47+
)
4248
)
4349
and any(ml.nlu_classifier(body.current_thread.text).entities,
4450
.name == "request"

0 commit comments

Comments
 (0)