Skip to content

Commit 4e95bdd

Browse files
[Test Rules] [PR #4586] modified rule: BEC: Tax document request
1 parent 9042868 commit 4e95bdd

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

detection-rules/4586_tax_w2_impersonation.yml

Lines changed: 12 additions & 6 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"
@@ -77,4 +83,4 @@ detection_methods:
7783
id: "63c3bc52-a276-5c6b-8f63-98e01313df92"
7884
og_id: "4834a45e-6d70-5ad9-9043-024eea995e95"
7985
testing_pr: 4586
80-
testing_sha: 9cba097822000f3e32017946d07980630b2e5bba
86+
testing_sha: 5e27ee8e6d3285b614045f6644ce7a5018f5858f

0 commit comments

Comments
 (0)