Skip to content

Commit df53814

Browse files
[PR sublime-security#3661] added rule: PR# 3661 - Attachment: PDF with banking and payment references from freemail sender
1 parent 6758011 commit df53814

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: "PR# 3661 - Attachment: PDF with banking and payment references from freemail sender"
2+
description: "Detects PDF attachments containing banking terminology such as SWIFT codes, account numbers, and payment references from free email providers. These attachments often contain fraudulent payment instructions or fake banking documents used in business email compromise attacks."
3+
type: "rule"
4+
severity: "medium"
5+
source: |
6+
type.inbound
7+
// Has attachment
8+
and 0 < length(attachments) < 3
9+
// Short message (BEC pattern)
10+
and length(body.current_thread.text) < 200
11+
// pdf with these keywords
12+
and any(filter(attachments, .file_extension == "pdf"),
13+
any(file.explode(.),
14+
.depth == 1
15+
and (
16+
regex.icontains(.scan.ocr.raw,
17+
'swift(?: copy)?',
18+
"bank code:",
19+
"account number:",
20+
"payment"
21+
)
22+
)
23+
)
24+
)
25+
// Display name or local_part suggests executive/authority
26+
and (
27+
// Common executive titles
28+
regex.icontains(sender.display_name,
29+
// CEO, CFO, COO, President, Chairman, Director, VP, EVP, SVP
30+
'\b((?:C(?:hairman|[EFO]O)|President|Director|[ES]?VP))\b'
31+
)
32+
// Or looks like: firstname.lastname.company@freemail
33+
or (
34+
regex.count(sender.email.local_part, '\.') == 2
35+
and regex.contains(sender.email.local_part, '\.([a-z]{2,})\.')
36+
)
37+
// or any defined org brands like: first.last.sublime@freemail
38+
or any($org_slds, strings.icontains(sender.email.local_part, .))
39+
or any($org_brand_names, strings.icontains(sender.email.local_part, .))
40+
// Or contains common company abbreviations
41+
or regex.icontains(sender.email.local_part, '\.(?:inc|corp|ltd|llc|co)$')
42+
)
43+
44+
// Financial/transaction language
45+
and (
46+
regex.icontains(body.current_thread.text,
47+
'(?:transaction|lawyer|wire|transfer|bank.{0,20}account)'
48+
)
49+
or any(ml.nlu_classifier(body.current_thread.text).topics,
50+
.name == "Legal and Compliance" and .confidence == "high"
51+
)
52+
)
53+
54+
// Urgency indicators
55+
and (
56+
any(ml.nlu_classifier(body.current_thread.text).entities, .name == "urgency")
57+
or regex.icontains(body.current_thread.text,
58+
'(?:urgent|asap|immediately|today|by.*(?:friday|weekend|eod|end of day))'
59+
)
60+
)
61+
62+
// Free email provider
63+
and sender.email.domain.root_domain in $free_email_providers
64+
attack_types:
65+
- "BEC/Fraud"
66+
tactics_and_techniques:
67+
- "Free email provider"
68+
- "PDF"
69+
- "Social engineering"
70+
detection_methods:
71+
- "File analysis"
72+
- "Optical Character Recognition"
73+
- "Sender analysis"
74+
id: "054acfa2-ba42-54d0-ba6e-ce562db7fd56"
75+
tags:
76+
- created_from_open_prs
77+
- rule_status_added
78+
- pr_author_MSAdministrator
79+
references:
80+
- https://github.com/sublime-security/sublime-rules/pull/3661

0 commit comments

Comments
 (0)