Detection rules › Sublime MQL
Brand impersonation: USPS
Impersonation of the United States Postal Service.
Threat classification
Sublime's own taxonomy (not MITRE ATT&CK).
| Category | Values |
|---|---|
| Attack types | Credential Phishing |
| Tactics and techniques | Image as content, Impersonation: Brand, Social engineering |
Event coverage
Rule body MQL
type.inbound
and (
any(ml.logo_detect(file.message_screenshot()).brands, .name == "USPS")
or strings.icontains(sender.display_name, "USPS")
or strings.icontains(sender.display_name, "United States Postal Service")
or regex.contains(body.html.display_text, 'USPS\s*\.\s*COM')
or strings.icontains(body.current_thread.text, 'USPS Delivery Team')
)
and length(body.links) > 0
and 3 of (
any(body.links,
strings.ilike(.display_text,
"*check now*",
"*track*",
"*package*",
'*view your order*',
"*update*",
'*delivery address*',
"*parcel allocation*",
"*claim your parcel*"
)
),
strings.ilike(body.current_thread.text,
"*returned*to*sender*",
"*redelivery*",
'*USPS promotions*',
'*review your package*',
'*receiver address*',
'*package details*',
'*sorry tolet*',
'*Due to an incorrect*',
'*remain undeliverable*'
),
// impersonal greeting
any(ml.nlu_classifier(body.current_thread.text).entities,
.name == "recipient" and .text =~ "Customer"
),
any(ml.nlu_classifier(body.current_thread.text).intents,
.name == "cred_theft" and .confidence != "low"
),
// free email sender
sender.email.domain.root_domain in $free_email_providers,
network.whois(sender.email.domain).days_old < 30,
not network.whois(sender.email.domain).found,
// contains link to recently registered domain
any(body.links, network.whois(.href_url.domain).days_old < 15),
(
regex.icontains(strings.replace_confusables(body.html.display_text),
'\b(?:u.?s.?p.?s|shipping|delivery)\b'
)
and not regex.icontains(body.html.display_text,
'\b(?:usps|shipping|delivery)\b'
)
),
any(body.links, regex.icontains(.href_url.url, 'https?://[0-9]{7,12}/.+')),
)
and (
sender.email.domain.root_domain not in (
"usps.com",
"opinions-inmoment.com", // https://faq.usps.com/s/article/USPS-Customer-Experience-Surveys
"shipup.co", // third party shipping company
"withings.com" // third party shipping company
)
or (
sender.email.domain.root_domain in (
"usps.com",
"opinions-inmoment.com" // https://faq.usps.com/s/article/USPS-Customer-Experience-Surveys
)
and not headers.auth_summary.dmarc.pass
)
)
// negate newsletters
and not (
length(body.links) > 20
or any(ml.nlu_classifier(body.html.display_text).topics,
.name == "Newsletters and Digests"
)
)
// not all links to usps.com
and not all(body.links, .href_url.domain.root_domain == "usps.com")
// negate legit forwards and replies
and not (
(subject.is_reply or subject.is_forward)
and length(body.previous_threads) > 0
and (length(headers.references) > 0 or headers.in_reply_to is not null)
)
// negate highly trusted sender domains unless they fail DMARC authentication
and (
(
sender.email.domain.root_domain in $high_trust_sender_root_domains
and not headers.auth_summary.dmarc.pass
)
or sender.email.domain.root_domain not in $high_trust_sender_root_domains
)
and not any(body.links,
regex.icontains(.display_text, 'Track (?:Your Order|Shipment)')
and .href_url.domain.domain == 'tools.usps.com'
)
and not sender.email.domain.root_domain in ('shopifyemail.com')
Detection logic
Scope: inbound message.
Impersonation of the United States Postal Service.
- inbound message
any of:
any of
ml.logo_detect(file.message_screenshot()).brandswhere:- .name is 'USPS'
- sender.display_name contains 'USPS'
- sender.display_name contains 'United States Postal Service'
- body.html.display_text matches 'USPS\\s*\\.\\s*COM'
- body.current_thread.text contains 'USPS Delivery Team'
- length(body.links) > 0
at least 3 of:
any of
body.linkswhere:.display_text matches any of 8 patterns
*check now**track**package**view your order**update**delivery address**parcel allocation**claim your parcel*
body.current_thread.text matches any of 9 patterns
*returned*to*sender**redelivery**USPS promotions**review your package**receiver address**package details**sorry tolet**Due to an incorrect**remain undeliverable*
any of
ml.nlu_classifier(body.current_thread.text).entitieswhere all hold:- .name is 'recipient'
- .text is 'Customer'
any of
ml.nlu_classifier(body.current_thread.text).intentswhere all hold:- .name is 'cred_theft'
- .confidence is not 'low'
- sender.email.domain.root_domain in $free_email_providers
- network.whois(sender.email.domain).days_old < 30
not:
- network.whois(sender.email.domain).found
any of
body.linkswhere:- network.whois(.href_url.domain).days_old < 15
all of:
- strings.replace_confusables(body.html.display_text) matches '\\b(?:u.?s.?p.?s|shipping|delivery)\\b'
not:
- body.html.display_text matches '\\b(?:usps|shipping|delivery)\\b'
any of
body.linkswhere:- .href_url.url matches 'https?://[0-9]{7,12}/.+'
any of:
- sender.email.domain.root_domain not in ('usps.com', 'opinions-inmoment.com', 'shipup.co', 'withings.com')
all of:
- sender.email.domain.root_domain in ('usps.com', 'opinions-inmoment.com')
not:
- headers.auth_summary.dmarc.pass
none of:
- length(body.links) > 20
any of
ml.nlu_classifier(body.html.display_text).topicswhere:- .name is 'Newsletters and Digests'
not:
all of
body.linkswhere:- .href_url.domain.root_domain is 'usps.com'
not:
all of:
any of:
- subject.is_reply
- subject.is_forward
- length(body.previous_threads) > 0
any of:
- length(headers.references) > 0
- headers.in_reply_to is set
any of:
all of:
- sender.email.domain.root_domain in $high_trust_sender_root_domains
not:
- headers.auth_summary.dmarc.pass
- sender.email.domain.root_domain not in $high_trust_sender_root_domains
not:
any of
body.linkswhere all hold:- .display_text matches 'Track (?:Your Order|Shipment)'
- .href_url.domain.domain is 'tools.usps.com'
not:
- sender.email.domain.root_domain in ('shopifyemail.com')
Inspects: body.current_thread.text, body.html.display_text, body.links, body.links[].display_text, body.links[].href_url.domain, body.links[].href_url.domain.domain, body.links[].href_url.domain.root_domain, body.links[].href_url.url, body.previous_threads, headers.auth_summary.dmarc.pass, headers.in_reply_to, headers.references, sender.display_name, sender.email.domain, sender.email.domain.root_domain, subject.is_forward, subject.is_reply, type.inbound. Sensors: file.message_screenshot, ml.logo_detect, ml.nlu_classifier, network.whois, regex.contains, regex.icontains, strings.icontains, strings.ilike, strings.replace_confusables. Reference lists: $free_email_providers, $high_trust_sender_root_domains.
Indicators matched (37)
| Field | Match | Value |
|---|---|---|
ml.logo_detect(file.message_screenshot()).brands[].name | equals | USPS |
strings.icontains | substring | USPS |
strings.icontains | substring | United States Postal Service |
regex.contains | regex | USPS\s*\.\s*COM |
strings.icontains | substring | USPS Delivery Team |
strings.ilike | substring | *check now* |
strings.ilike | substring | *track* |
strings.ilike | substring | *package* |
strings.ilike | substring | *view your order* |
strings.ilike | substring | *update* |
strings.ilike | substring | *delivery address* |
strings.ilike | substring | *parcel allocation* |
25 more
strings.ilike | substring | *claim your parcel* |
strings.ilike | substring | *returned*to*sender* |
strings.ilike | substring | *redelivery* |
strings.ilike | substring | *USPS promotions* |
strings.ilike | substring | *review your package* |
strings.ilike | substring | *receiver address* |
strings.ilike | substring | *package details* |
strings.ilike | substring | *sorry tolet* |
strings.ilike | substring | *Due to an incorrect* |
strings.ilike | substring | *remain undeliverable* |
ml.nlu_classifier(body.current_thread.text).entities[].name | equals | recipient |
ml.nlu_classifier(body.current_thread.text).entities[].text | equals | Customer |
ml.nlu_classifier(body.current_thread.text).intents[].name | equals | cred_theft |
regex.icontains | regex | \b(?:u.?s.?p.?s|shipping|delivery)\b |
regex.icontains | regex | \b(?:usps|shipping|delivery)\b |
regex.icontains | regex | https?://[0-9]{7,12}/.+ |
sender.email.domain.root_domain | member | usps.com |
sender.email.domain.root_domain | member | opinions-inmoment.com |
sender.email.domain.root_domain | member | shipup.co |
sender.email.domain.root_domain | member | withings.com |
ml.nlu_classifier(body.html.display_text).topics[].name | equals | Newsletters and Digests |
body.links[].href_url.domain.root_domain | equals | usps.com |
regex.icontains | regex | Track (?:Your Order|Shipment) |
body.links[].href_url.domain.domain | equals | tools.usps.com |
sender.email.domain.root_domain | member | shopifyemail.com |