Brand impersonation: USPS
Impersonation of the United States Postal Service.
Sublime rule (View on GitHub)
1name: "Brand impersonation: USPS"
2description: "Impersonation of the United States Postal Service."
3type: "rule"
4severity: "high"
5source: |
6 type.inbound
7 and (
8 any(ml.logo_detect(file.message_screenshot()).brands, .name == "USPS")
9 or strings.icontains(sender.display_name, "USPS")
10 or regex.contains(body.html.display_text, 'USPS\s*\.\s*COM')
11 )
12 and length(body.links) > 0
13 and 3 of (
14 any(body.links,
15 strings.ilike(.display_text,
16 "*check now*",
17 "*track*",
18 "*package*",
19 '*view your order*'
20 )
21 ),
22 strings.ilike(body.current_thread.text,
23 "*returned*to*sender*",
24 "*redelivery*",
25 '*USPS promotions*',
26 '*review your package*',
27 '*receiver address*',
28 '*sorry tolet*',
29 '*Due to an incorrect*'
30 ),
31 // impersonal greeting
32 any(ml.nlu_classifier(body.current_thread.text).entities,
33 .name == "recipient" and .text =~ "Customer"
34 ),
35 // free email sender
36 sender.email.domain.root_domain in $free_email_providers,
37 // contains link to recently registered domain
38 any(body.links, network.whois(.href_url.domain).days_old < 15),
39 (
40 regex.icontains(strings.replace_confusables(body.html.display_text),
41 '\b(?:u.?s.?p.?s|shipping|delivery)\b'
42 )
43 and not regex.icontains(body.html.display_text,
44 '\b(?:usps|shipping|delivery)\b'
45 )
46 )
47 )
48 and (
49 sender.email.domain.root_domain not in (
50 "usps.com",
51 "opinions-inmoment.com", // https://faq.usps.com/s/article/USPS-Customer-Experience-Surveys
52 "shipup.co", // third party shipping company
53 "withings.com" // third party shipping company
54 )
55 or (
56 sender.email.domain.root_domain in (
57 "usps.com",
58 "opinions-inmoment.com" // https://faq.usps.com/s/article/USPS-Customer-Experience-Surveys
59 )
60 and not headers.auth_summary.dmarc.pass
61 )
62 )
63 // negate newsletters
64 and not (
65 length(body.links) > 20
66 or any(ml.nlu_classifier(body.html.display_text).topics,
67 .name == "Newsletters and Digests"
68 )
69 )
70 // not all links to usps.com
71 and not all(body.links, .href_url.domain.root_domain == "usps.com")
72 // negate legit forwards and replies
73 and not (
74 (subject.is_reply or subject.is_forward)
75 and length(body.previous_threads) > 0
76 and (length(headers.references) > 0 or headers.in_reply_to is not null)
77 )
78 // negate highly trusted sender domains unless they fail DMARC authentication
79 and (
80 (
81 sender.email.domain.root_domain in $high_trust_sender_root_domains
82 and not headers.auth_summary.dmarc.pass
83 )
84 or sender.email.domain.root_domain not in $high_trust_sender_root_domains
85 )
86 and not any(body.links,
87 regex.icontains(.display_text, 'Track (?:Your Order|Shipment)')
88 and .href_url.domain.domain == 'tools.usps.com'
89 )
90 and not sender.email.domain.root_domain in ('shopifyemail.com')
91attack_types:
92 - "Credential Phishing"
93tactics_and_techniques:
94 - "Image as content"
95 - "Impersonation: Brand"
96 - "Social engineering"
97detection_methods:
98 - "Computer Vision"
99 - "Content analysis"
100 - "Natural Language Understanding"
101 - "Sender analysis"
102id: "28b9130a-d8e0-50af-97c9-c1b8f4c46d68"