1+ name : " Brand impersonation: DHL"
2+ description : |
3+ Impersonation of the shipping provider DHL.
4+ references :
5+ - " https://www.helpnetsecurity.com/2020/08/21/q2-2020-email-security-trends/"
6+ - " https://www.dhl.com/ca-en/home/footer/fraud-awareness.html"
7+ type : " rule"
8+ severity : " low"
9+ source : |
10+ type.inbound
11+ and (
12+ regex.icontains(sender.display_name, '\bDHL\b')
13+ or (
14+ strings.ilike(sender.email.domain.domain, '*DHL*')
15+ and length(sender.email.domain.domain) < 15
16+ )
17+ or strings.ilike(subject.subject, '*DHL notification*')
18+ or strings.icontains(body.current_thread.text, 'DHL International')
19+ or regex.contains(subject.subject, '\bD.{0,2}H.{0,2}L.{0,2}\b')
20+ )
21+ and (
22+ any(ml.nlu_classifier(body.current_thread.text).entities, .name == "urgency")
23+ or any(ml.nlu_classifier(body.current_thread.text).entities,
24+ .name == "org" and .text =~ "DHL"
25+ )
26+ or any(ml.logo_detect(file.message_screenshot()).brands,
27+ .name == "DHL" and .confidence in ("medium", "high")
28+ )
29+ or regex.icontains(body.current_thread.text, '\bDHL\b')
30+ // it contains a QR code
31+ or (
32+ //
33+ // This rule makes use of a beta feature and is subject to change without notice
34+ // using the beta feature in custom rules is not suggested until it has been formally released
35+ //
36+ beta.scan_qr(file.message_screenshot()).found
37+ and any(beta.scan_qr(file.message_screenshot()).items, .type == "url")
38+ )
39+ //
40+ // This rule makes use of a beta feature and is subject to change without notice
41+ // using the beta feature in custom rules is not suggested until it has been formally released
42+ //
43+ or strings.ilike(beta.ocr(file.message_screenshot()).text,
44+ "*package*",
45+ "*parcel*",
46+ "*shipping*",
47+ "*delivery*",
48+ "*track*"
49+ )
50+ or strings.ilike(body.current_thread.text,
51+ "*package*",
52+ "*parcel*",
53+ "*shipping*",
54+ "*delivery*",
55+ "*track*"
56+ )
57+ )
58+ and (
59+ (
60+ (
61+ length(headers.references) > 0
62+ or not any(headers.hops,
63+ any(.fields, strings.ilike(.name, "In-Reply-To"))
64+ )
65+ )
66+ and not (
67+ (
68+ strings.istarts_with(subject.subject, "RE:")
69+ or strings.istarts_with(subject.subject, "RES:")
70+ or strings.istarts_with(subject.subject, "R:")
71+ or strings.istarts_with(subject.subject, "ODG:")
72+ or strings.istarts_with(subject.subject, "答复:")
73+ or strings.istarts_with(subject.subject, "AW:")
74+ or strings.istarts_with(subject.subject, "TR:")
75+ or strings.istarts_with(subject.subject, "FWD:")
76+ or regex.imatch(subject.subject, '(\[[^\]]+\]\s?){0,3}(re|fwd?)\s?:')
77+ )
78+ )
79+ )
80+ or length(headers.references) == 0
81+ )
82+ and sender.email.domain.root_domain not in~ (
83+ 'dhl.com',
84+ 'dhl-news.com',
85+ 'bdhllp.com',
86+ 'dhlecommerce.co.uk',
87+ 'dhlparcel.co.uk',
88+ 'dhlecs.com',
89+ 'dhl.co.uk',
90+ 'dhl.co.tz',
91+ 'dpdhl.com',
92+ 'dhl.de',
93+ 'dhl.fr',
94+ 'dhl.pl',
95+ 'dhlexpress.fr', // legit dhl site
96+ 'dhlending.com',
97+ 'inmotion.dhl',
98+ 'dhlparcel.nl',
99+ 'dhltariff.co.uk',
100+ 'dhlindia-kyc.com',
101+ 'dpogroup.com',
102+ '4flow-service.com', // shipping service
103+ 'leaders-in-logistics.com', // legit sight for leadership webinar events
104+ 'deutschepost.de', // German postal service
105+ 'dhlecommerce.nl',
106+ 'dhl.nl',
107+ 'adhlawfirm.com', // similar name but unrelated
108+ 'attendhlth.com', // dhl in domain but unrelated
109+ 'tdhlaw.com' // dhl in domain but unrelated
110+ )
111+ and (
112+ profile.by_sender().prevalence in ("new", "outlier")
113+ or (
114+ profile.by_sender().any_messages_malicious_or_spam
115+ and not profile.by_sender().any_messages_benign
116+ )
117+ )
118+
119+ // negate highly trusted sender domains unless they fail DMARC authentication
120+ and (
121+ (
122+ sender.email.domain.root_domain in $high_trust_sender_root_domains
123+ and not headers.auth_summary.dmarc.pass
124+ )
125+ or sender.email.domain.root_domain not in $high_trust_sender_root_domains
126+ )
127+
128+ attack_types :
129+ - " Credential Phishing"
130+ tactics_and_techniques :
131+ - " Impersonation: Brand"
132+ - " Lookalike domain"
133+ - " Social engineering"
134+ detection_methods :
135+ - " Header analysis"
136+ - " Sender analysis"
137+ id : " eb1260d6-be8b-5efc-b612-9d630f04fecb"
138+ og_id : " be4b4ae0-d393-5f8b-b984-5cf4ad7cbeb5"
139+ testing_pr : 3460
140+ testing_sha : 171a7b68b768865dda56ccbd0c0a38a76b26eb91
0 commit comments