Detection rules › Sublime MQL
Brand impersonation: Internal Revenue Service
Detects messages from senders posing as the Internal Revenue Service by checking display name similarity and content indicators from body text and screenshots. Excludes legitimate IRS domains and authenticated senders.
Threat classification
Sublime's own taxonomy (not MITRE ATT&CK).
| Category | Values |
|---|---|
| Attack types | BEC/Fraud, Credential Phishing |
| Tactics and techniques | Impersonation: Brand, Social engineering |
Event coverage
Rule body MQL
type.inbound
and (
// display name contains IRS
(
strings.ilike(strings.replace_confusables(sender.display_name),
'*internal revenue service*'
)
or strings.like(strings.replace_confusables(sender.display_name), 'IRS*')
)
// levenshtein distance similar to IRS
or strings.ilevenshtein(strings.replace_confusables(sender.display_name),
'internal revenue service'
) <= 1
or (
strings.like(strings.replace_confusables(subject.base), '*IRS*')
and any(ml.nlu_classifier(body.current_thread.text).topics,
.name == "Government Services" and .confidence != "low"
)
)
)
and (
(
any(ml.nlu_classifier(body.current_thread.text).topics,
.name in ("Security and Authentication", "Financial Communications")
and .confidence == "high"
)
and not any(ml.nlu_classifier(body.current_thread.text).topics,
.name in (
"Advertising and Promotions",
"Newsletters and Digests",
"Political Mail",
"Events and Webinars"
)
and .confidence != "low"
)
)
or (
// OCR length is more than 2x the current_thread length
// indicating that the body is mostly an image
(
(length(beta.ocr(file.message_screenshot()).text) + 0.0) / (
length(body.current_thread.text) + 0.0
)
) > 2
and length(body.previous_threads) == 0
and any(ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics,
.name in ("Security and Authentication", "Financial Communications")
and .confidence == "high"
)
and not any(ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics,
.name in (
"Advertising and Promotions",
"Newsletters and Digests",
"Political Mail",
"Events and Webinars"
)
and .confidence != "low"
)
)
or any(ml.nlu_classifier(body.current_thread.text).intents,
.name == "cred_theft" and .confidence == "high"
)
or any(ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).intents,
.name == "cred_theft" and .confidence == "high"
)
)
and not (
(
length(body.current_thread.text) > 2500
or any(headers.hops,
any(.fields,
.name == 'List-Unsubscribe-Post'
and .value == 'List-Unsubscribe=One-Click'
)
)
)
and any(ml.nlu_classifier(body.current_thread.text).intents,
.name == "benign" and .confidence == "high"
)
)
// and the sender is not in org_domains or from .gov domains and passes auth
and not (
sender.email.domain.root_domain in $org_domains
or (
(
sender.email.domain.root_domain in ("govdelivery.com", "ms-cpa.org")
or sender.email.domain.tld == "gov"
)
and headers.auth_summary.dmarc.pass
)
)
// and the sender is not from high trust sender root domains
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
)
Detection logic
Scope: inbound message.
Detects messages from senders posing as the Internal Revenue Service by checking display name similarity and content indicators from body text and screenshots. Excludes legitimate IRS domains and authenticated senders.
- inbound message
any of:
any of:
- strings.replace_confusables(sender.display_name) matches '*internal revenue service*'
- strings.replace_confusables(sender.display_name) matches 'IRS*'
- strings.replace_confusables(sender.display_name) is similar to 'internal revenue service'
all of:
- strings.replace_confusables(subject.base) matches '*IRS*'
any of
ml.nlu_classifier(body.current_thread.text).topicswhere all hold:- .name is 'Government Services'
- .confidence is not 'low'
any of:
all of:
any of
ml.nlu_classifier(body.current_thread.text).topicswhere all hold:- .name in ('Security and Authentication', 'Financial Communications')
- .confidence is 'high'
not:
any of
ml.nlu_classifier(body.current_thread.text).topicswhere all hold:- .name in ('Advertising and Promotions', 'Newsletters and Digests', 'Political Mail', 'Events and Webinars')
- .confidence is not 'low'
all of:
- length(beta.ocr(file.message_screenshot()).text) + 0.0 / length(body.current_thread.text) + 0.0 > 2
- length(body.previous_threads) is 0
any of
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topicswhere all hold:- .name in ('Security and Authentication', 'Financial Communications')
- .confidence is 'high'
not:
any of
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topicswhere all hold:- .name in ('Advertising and Promotions', 'Newsletters and Digests', 'Political Mail', 'Events and Webinars')
- .confidence is not 'low'
any of
ml.nlu_classifier(body.current_thread.text).intentswhere all hold:- .name is 'cred_theft'
- .confidence is 'high'
any of
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).intentswhere all hold:- .name is 'cred_theft'
- .confidence is 'high'
not:
all of:
any of:
- length(body.current_thread.text) > 2500
any of
headers.hopswhere:any of
.fieldswhere all hold:- .name is 'List-Unsubscribe-Post'
- .value is 'List-Unsubscribe=One-Click'
any of
ml.nlu_classifier(body.current_thread.text).intentswhere all hold:- .name is 'benign'
- .confidence is 'high'
none of:
- sender.email.domain.root_domain in $org_domains
all of:
any of:
- sender.email.domain.root_domain in ('govdelivery.com', 'ms-cpa.org')
- sender.email.domain.tld is 'gov'
- headers.auth_summary.dmarc.pass
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
Inspects: body.current_thread.text, body.previous_threads, headers.auth_summary.dmarc.pass, headers.hops, headers.hops[].fields, headers.hops[].fields[].name, headers.hops[].fields[].value, sender.display_name, sender.email.domain.root_domain, sender.email.domain.tld, subject.base, type.inbound. Sensors: beta.ocr, file.message_screenshot, ml.nlu_classifier, strings.ilevenshtein, strings.ilike, strings.like, strings.replace_confusables. Reference lists: $high_trust_sender_root_domains, $org_domains.
Indicators matched (29)
| Field | Match | Value |
|---|---|---|
strings.ilike | substring | *internal revenue service* |
strings.like | substring | IRS* |
strings.ilevenshtein | fuzzy | internal revenue service |
strings.like | substring | *IRS* |
ml.nlu_classifier(body.current_thread.text).topics[].name | equals | Government Services |
ml.nlu_classifier(body.current_thread.text).topics[].name | member | Security and Authentication |
ml.nlu_classifier(body.current_thread.text).topics[].name | member | Financial Communications |
ml.nlu_classifier(body.current_thread.text).topics[].confidence | equals | high |
ml.nlu_classifier(body.current_thread.text).topics[].name | member | Advertising and Promotions |
ml.nlu_classifier(body.current_thread.text).topics[].name | member | Newsletters and Digests |
ml.nlu_classifier(body.current_thread.text).topics[].name | member | Political Mail |
ml.nlu_classifier(body.current_thread.text).topics[].name | member | Events and Webinars |
17 more
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics[].name | member | Security and Authentication |
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics[].name | member | Financial Communications |
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics[].confidence | equals | high |
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics[].name | member | Advertising and Promotions |
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics[].name | member | Newsletters and Digests |
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics[].name | member | Political Mail |
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics[].name | member | Events and Webinars |
ml.nlu_classifier(body.current_thread.text).intents[].name | equals | cred_theft |
ml.nlu_classifier(body.current_thread.text).intents[].confidence | equals | high |
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).intents[].name | equals | cred_theft |
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).intents[].confidence | equals | high |
headers.hops[].fields[].name | equals | List-Unsubscribe-Post |
headers.hops[].fields[].value | equals | List-Unsubscribe=One-Click |
ml.nlu_classifier(body.current_thread.text).intents[].name | equals | benign |
sender.email.domain.root_domain | member | govdelivery.com |
sender.email.domain.root_domain | member | ms-cpa.org |
sender.email.domain.tld | equals | gov |