Detection rules › Sublime MQL
Sublime MQL rules: file
| Rule | Severity |
|---|---|
| Brand impersonation: File sharing notification with template artifacts | low |
| File sharing link from suspicious sender domain | medium |
| File sharing link with a suspicious subject | medium |
Brand impersonation: File sharing notification with template artifacts
#Detects messages impersonating file sharing services that contain template artifacts such as placeholder comments, incomplete HTML elements, and development remnants. The message includes 'shared with you' language and exhibits multiple indicators of being generated from a malicious template including HTML comments with development terms, broken anchor tags, and filename elements that closely match the subject line.
Threat Classification
Sublime's own taxonomy (not MITRE ATT&CK).
| Category | Values |
|---|---|
| Attack types | Credential Phishing |
| Tactics and techniques | Impersonation: Brand, Social engineering, Evasion |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| Sublime | Inbound email message |
Message Attributes
Rule Body
type.inbound
and strings.icontains(body.current_thread.text, 'shared with you')
// we detect a file sharing logo with high confidence
and any(ml.logo_detect(file.message_screenshot()).brands,
.name in ('Microsoft', 'Dropbox', 'Google') and .confidence == "high"
)
and 2 of (
// the subject is very similar to the name of the file-name html class
any(html.xpath(body.html, '//span[@class="file-name"]').nodes,
strings.ilevenshtein(.display_text, subject.subject) < 15
),
// we detect a href to a # implying a neglected placeholder
any(html.xpath(body.html, '//a[@href="#"]').nodes, .raw is not null),
// we detect "ai-esque" comments
any(html.xpath(body.html, '//comment()').nodes,
regex.icontains(.raw, '(optional|section|placeholder|todo|fixme)')
),
// recipients local part is in the body of the message
any(recipients.to,
strings.icontains(body.current_thread.text, .email.local_part)
),
strings.icontains(body.html.raw, 'if the button does not work')
)
// and cred theft/bec high confidence
and any(ml.nlu_classifier(body.current_thread.text).intents,
.name in ("cred_theft", "bec") and .confidence == "high"
)
// not sent from legitimate Microsoft emails as long as auth passes
and not (
sender.email.email in (
'no-reply@outlook.mail.microsoft',
'azuredevops@microsoft.com'
)
and headers.auth_summary.dmarc.pass
)
Detection Logic
Scope: inbound message.
Detects messages impersonating file sharing services that contain template artifacts such as placeholder comments, incomplete HTML elements, and development remnants. The message includes 'shared with you' language and exhibits multiple indicators of being generated from a malicious template including HTML comments with development terms, broken anchor tags, and filename elements that closely match the subject line.
- inbound message
- body.current_thread.text contains 'shared with you'
- any(ml.logo_detect(file.message_screenshot()).brands, .name in ('Microsoft', 'Dropbox', 'Google') and .confidence == "high" )
at least 2 of:
- any(html.xpath(body.html, '//span[@class="file-name"]').nodes, strings.ilevenshtein(.display_text, subject.subject) < 15 )
- any(html.xpath(body.html, '//a[@href="#"]').nodes, .raw is not null)
- any(html.xpath(body.html, '//comment()').nodes, regex.icontains(.raw, '(optional|section|placeholder|todo|fixme)') )
any of
recipients.towhere:- strings.icontains(body.current_thread.text, .email.local_part)
- body.html.raw contains 'if the button does not work'
- any(ml.nlu_classifier(body.current_thread.text).intents, .name in ("cred_theft", "bec") and .confidence == "high" )
not:
all of:
- sender.email.email in ('no-reply@outlook.mail.microsoft', 'azuredevops@microsoft.com')
- headers.auth_summary.dmarc.pass
Inspects: body.current_thread.text, body.html, body.html.raw, headers.auth_summary.dmarc.pass, recipients.to, recipients.to[].email.local_part, sender.email.email, subject.subject, type.inbound. Sensors: file.message_screenshot, html.xpath, ml.logo_detect, ml.nlu_classifier, regex.icontains, strings.icontains, strings.ilevenshtein.
Indicators Matched (10)
| Field | Match | Value |
|---|---|---|
strings.icontains | substring | shared with you |
ml.logo_detect(file.message_screenshot()).brands[].name | member | Microsoft |
ml.logo_detect(file.message_screenshot()).brands[].name | member | Dropbox |
ml.logo_detect(file.message_screenshot()).brands[].name | member | Google |
ml.logo_detect(file.message_screenshot()).brands[].confidence | equals | high |
regex.icontains | regex | (optional|section|placeholder|todo|fixme) |
strings.icontains | substring | if the button does not work |
ml.nlu_classifier(body.current_thread.text).intents[].name | member | cred_theft |
ml.nlu_classifier(body.current_thread.text).intents[].name | member | bec |
ml.nlu_classifier(body.current_thread.text).intents[].confidence | equals | high |
Stages and Predicates
Stage 1: mql_rule
and
or
and
any(recipients.to)
strings.icontains func_call "strings.icontains(body.current_thread.text, .email.local_part)"
body.html.raw contains "if the button does not work"
and
any(recipients.to)
strings.icontains func_call "strings.icontains(body.current_thread.text, .email.local_part)"
macro "any(html.xpath(body.html, '//a[@href=\"#\"]').nodes, .raw is not null)"
and
any(recipients.to)
strings.icontains func_call "strings.icontains(body.current_thread.text, .email.local_part)"
macro "any(html.xpath(body.html, '//comment()').nodes,\n regex.icontains(.raw, '(optional|section|placeholder|todo|fixme)')\n )"
and
any(recipients.to)
strings.icontains func_call "strings.icontains(body.current_thread.text, .email.local_part)"
macro "any(html.xpath(body.html, '//span[@class=\"file-name\"]').nodes,\n strings.ilevenshtein(.display_text, subject.subject) < 15\n )"
and
body.html.raw contains "if the button does not work"
macro "any(html.xpath(body.html, '//a[@href=\"#\"]').nodes, .raw is not null)"
and
body.html.raw contains "if the button does not work"
macro "any(html.xpath(body.html, '//comment()').nodes,\n regex.icontains(.raw, '(optional|section|placeholder|todo|fixme)')\n )"
and
body.html.raw contains "if the button does not work"
macro "any(html.xpath(body.html, '//span[@class=\"file-name\"]').nodes,\n strings.ilevenshtein(.display_text, subject.subject) < 15\n )"
and
macro "any(html.xpath(body.html, '//a[@href=\"#\"]').nodes, .raw is not null)"
macro "any(html.xpath(body.html, '//comment()').nodes,\n regex.icontains(.raw, '(optional|section|placeholder|todo|fixme)')\n )"
and
macro "any(html.xpath(body.html, '//a[@href=\"#\"]').nodes, .raw is not null)"
macro "any(html.xpath(body.html, '//span[@class=\"file-name\"]').nodes,\n strings.ilevenshtein(.display_text, subject.subject) < 15\n )"
and
macro "any(html.xpath(body.html, '//comment()').nodes,\n regex.icontains(.raw, '(optional|section|placeholder|todo|fixme)')\n )"
macro "any(html.xpath(body.html, '//span[@class=\"file-name\"]').nodes,\n strings.ilevenshtein(.display_text, subject.subject) < 15\n )"
not
and
headers.auth_summary.dmarc.pass eq "true"
sender.email.email in ["azuredevops@microsoft.com", "no-reply@outlook.mail.microsoft"]
body.current_thread.text contains "shared with you"
type.inbound eq "true"
macro "any(ml.logo_detect(file.message_screenshot()).brands,\n .name in ('Microsoft', 'Dropbox', 'Google') and .confidence == \"high\"\n)"
macro "any(ml.nlu_classifier(body.current_thread.text).intents,\n .name in (\"cred_theft\", \"bec\") and .confidence == \"high\"\n)"Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
body.current_thread.text | contains |
| field:"body.current_thread.text" kind:contains value:"shared with you" |
body.html.raw | contains |
| field:"body.html.raw" kind:contains value:"if the button does not work" |
type.inbound | eq |
| field:"type.inbound" kind:eq value:"true" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
headers.auth_summary.dmarc.pass | eq | true | excludes:headers.auth_summary.dmarc.pass field:"headers.auth_summary.dmarc.pass" value:"true" |
sender.email.email | in | azuredevops@microsoft.com, no-reply@outlook.mail.microsoft | excludes:sender.email.email field:"sender.email.email" value:"azuredevops@microsoft.com" field:"sender.email.email" value:"no-reply@outlook.mail.microsoft" |
File sharing link from suspicious sender domain
#A file sharing link in the body sent from a suspicious sender domain.
Threat Classification
Sublime's own taxonomy (not MITRE ATT&CK).
| Category | Values |
|---|---|
| Attack types | Credential Phishing, Malware/Ransomware |
| Tactics and techniques | Free file host |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| Sublime | Inbound email message |
Message Attributes
Rule Body
type.inbound
and any(body.links,
(
.href_url.domain.domain in $free_file_hosts
or .href_url.domain.root_domain in $free_file_hosts
)
and not .href_url.domain.domain in $tenant_domains
// remove free_file_hosts used to host images as links
and not any($file_types_images,
strings.iends_with(..href_url.url, strings.concat('.', .))
)
)
and sender.email.domain.tld in $suspicious_tlds
and not sender.email.domain.root_domain in ("notion.so", "cribl.cloud")
and (
not profile.by_sender().solicited
or (
profile.by_sender().any_messages_malicious_or_spam
and not profile.by_sender().any_messages_benign
)
)
Detection Logic
Scope: inbound message.
A file sharing link in the body sent from a suspicious sender domain.
- inbound message
any of
body.linkswhere all hold:any of:
- .href_url.domain.domain in $free_file_hosts
- .href_url.domain.root_domain in $free_file_hosts
not:
- .href_url.domain.domain in $tenant_domains
not:
- any($file_types_images, strings.iends_with(..href_url.url, strings.concat('.', .)) )
- sender.email.domain.tld in $suspicious_tlds
not:
- sender.email.domain.root_domain in ('notion.so', 'cribl.cloud')
any of:
not:
- profile.by_sender().solicited
all of:
- profile.by_sender().any_messages_malicious_or_spam
not:
- profile.by_sender().any_messages_benign
Inspects: body.links, body.links[].href_url.domain.domain, body.links[].href_url.domain.root_domain, body.links[].href_url.url, sender.email.domain.root_domain, sender.email.domain.tld, type.inbound. Sensors: profile.by_sender, strings.concat, strings.iends_with. Reference lists: $file_types_images, $free_file_hosts, $suspicious_tlds, $tenant_domains.
Stages and Predicates
Stage 1: mql_rule
and
any(body.links)
and
or
body.links.href_url.domain.domain macro "body.links[].href_url.domain.domain in free_file_hosts"
body.links.href_url.domain.root_domain macro "body.links[].href_url.domain.root_domain in free_file_hosts"
not
body.links.href_url.domain.domain macro "body.links[].href_url.domain.domain in tenant_domains"
not
macro "any($file_types_images,\n strings.iends_with(..href_url.url, strings.concat('.', .))\n )"
or
and
not
profile.by_sender func_call "profile.by_sender().any_messages_benign"
profile.by_sender func_call "profile.by_sender().any_messages_malicious_or_spam"
not
profile.by_sender func_call "profile.by_sender().solicited"
not
sender.email.domain.root_domain in ["cribl.cloud", "notion.so"]
sender.email.domain.tld macro "sender.email.domain.tld in suspicious_tlds"
type.inbound eq "true"Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
type.inbound | eq |
| field:"type.inbound" kind:eq value:"true" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
sender.email.domain.root_domain | in | cribl.cloud, notion.so | excludes:sender.email.domain.root_domain field:"sender.email.domain.root_domain" value:"cribl.cloud" field:"sender.email.domain.root_domain" value:"notion.so" |
File sharing link with a suspicious subject
#A file sharing link in the body with a common BEC subject. This rule could be expanded to include additional BEC subjects.
Threat Classification
Sublime's own taxonomy (not MITRE ATT&CK).
| Category | Values |
|---|---|
| Attack types | BEC/Fraud |
| Tactics and techniques | Free file host, Social engineering |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| Sublime | Inbound email message |
Message Attributes
Rule Body
type.inbound
and sender.email.domain.root_domain != 'google.com'
and not (
sender.email.domain.root_domain == "dropbox.com"
and headers.auth_summary.dmarc.pass
)
and any(body.links,
(
.href_url.domain.domain in $free_file_hosts
or .href_url.domain.root_domain in $free_file_hosts
)
and not (
// negating Google Forms links
.href_url.domain.domain == "docs.google.com"
and strings.istarts_with(.href_url.path, "/forms/")
)
and not .href_url.domain.domain in $tenant_domains
)
and regex.icontains(subject.subject, 'immediately', 'urgent')
and any(ml.nlu_classifier(body.current_thread.text).intents, .name != "benign")
and (
not profile.by_sender().solicited
or (
profile.by_sender().any_messages_malicious_or_spam
and not profile.by_sender().any_messages_benign
)
)
Detection Logic
Scope: inbound message.
A file sharing link in the body with a common BEC subject. This rule could be expanded to include additional BEC subjects.
- inbound message
- sender.email.domain.root_domain is not 'google.com'
not:
all of:
- sender.email.domain.root_domain is 'dropbox.com'
- headers.auth_summary.dmarc.pass
any of
body.linkswhere all hold:any of:
- .href_url.domain.domain in $free_file_hosts
- .href_url.domain.root_domain in $free_file_hosts
not:
all of:
- .href_url.domain.domain is 'docs.google.com'
- .href_url.path starts with '/forms/'
not:
- .href_url.domain.domain in $tenant_domains
subject.subject matches any of 2 patterns
immediatelyurgent
- any(ml.nlu_classifier(body.current_thread.text).intents, .name != "benign")
any of:
not:
- profile.by_sender().solicited
all of:
- profile.by_sender().any_messages_malicious_or_spam
not:
- profile.by_sender().any_messages_benign
Inspects: body.current_thread.text, body.links, body.links[].href_url.domain.domain, body.links[].href_url.domain.root_domain, body.links[].href_url.path, headers.auth_summary.dmarc.pass, sender.email.domain.root_domain, subject.subject, type.inbound. Sensors: ml.nlu_classifier, profile.by_sender, regex.icontains, strings.istarts_with. Reference lists: $free_file_hosts, $tenant_domains.
Indicators Matched (2)
| Field | Match | Value |
|---|---|---|
regex.icontains | regex | immediately |
regex.icontains | regex | urgent |
Stages and Predicates
Stage 1: mql_rule
and
any(body.links)
and
not
and
body.links.href_url.domain.domain eq "docs.google.com"
body.links.href_url.path starts_with "/forms/"
or
body.links.href_url.domain.domain macro "body.links[].href_url.domain.domain in free_file_hosts"
body.links.href_url.domain.root_domain macro "body.links[].href_url.domain.root_domain in free_file_hosts"
not
body.links.href_url.domain.domain macro "body.links[].href_url.domain.domain in tenant_domains"
or
and
not
profile.by_sender func_call "profile.by_sender().any_messages_benign"
profile.by_sender func_call "profile.by_sender().any_messages_malicious_or_spam"
not
profile.by_sender func_call "profile.by_sender().solicited"
not
and
headers.auth_summary.dmarc.pass eq "true"
sender.email.domain.root_domain eq "dropbox.com"
or
subject.subject regex_match "immediately"
subject.subject regex_match "urgent"
sender.email.domain.root_domain ne "google.com"
type.inbound eq "true"
macro "any(ml.nlu_classifier(body.current_thread.text).intents, .name != \"benign\")"Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
sender.email.domain.root_domain | ne |
| field:"sender.email.domain.root_domain" kind:ne value:"google.com" |
subject.subject | regex_match |
| field:"subject.subject" kind:regex_match |
type.inbound | eq |
| field:"type.inbound" kind:eq value:"true" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
headers.auth_summary.dmarc.pass | eq | true | excludes:headers.auth_summary.dmarc.pass field:"headers.auth_summary.dmarc.pass" value:"true" |
sender.email.domain.root_domain | eq | dropbox.com | excludes:sender.email.domain.root_domain field:"sender.email.domain.root_domain" value:"dropbox.com" |