Detection rules › Sublime MQL
Suspicious SharePoint file sharing
This rule detect potential credential phishing leveraging SharePoint file sharing to deliver a PDF, OneNote, or Unknown file type file using indicators such as suspicious sender analysis and link characteristics.
Threat classification
Sublime's own taxonomy (not MITRE ATT&CK).
| Category | Values |
|---|---|
| Attack types | Credential Phishing |
| Tactics and techniques | Free email provider, Free file host, OneNote, PDF |
Event coverage
Rule body MQL
type.inbound
// Matches the message id observed. DKIM/SPF domains can be custom and therefore are unpredictable.
and strings.starts_with(headers.message_id, '<Share-')
and strings.ends_with(headers.message_id, '@odspnotify>')
// SharePoint email indicators
and strings.like(body.current_thread.text,
"*shared a file with you*",
"*shared with you*",
"*invited you to access a file*"
)
and strings.icontains(subject.subject, "shared")
// sender analysis
and (
(
// if the sender is not the sharepointonline.com, we can use the sender email
// to see if it is a solicited email
sender.email.domain.domain != "sharepointonline.com"
and not profile.by_sender().solicited
)
// if it is the sharepointonline sender, use the reply-to header
or (
sender.email.domain.domain =~ "sharepointonline.com"
and length(headers.reply_to) > 0
and
// a newly created domain
(
all(headers.reply_to,
.email.domain.root_domain not in $free_email_providers
and network.whois(.email.domain).days_old <= 30
and .email.email != sender.email.email
)
// is a free email provider
or all(headers.reply_to,
.email.domain.root_domain in $free_email_providers
)
//
// This rule makes use of a beta feature and is subject to change without notice
// using the beta feature in custom rules is not suggested until it has been formally released
//
// no outbound emails
or not beta.profile.by_reply_to().solicited
)
// do not match if the reply_to address has been observed as a reply_to address
// of a message that has been classified as benign
and not beta.profile.by_reply_to().any_messages_benign
)
)
// link logic
and any(body.links,
.href_url.domain.root_domain == "sharepoint.com"
// it is a personal share
and (
// /g/ is only found with /personal
strings.icontains(.href_url.path, '/g/personal/')
or strings.icontains(.href_url.path, '/p/')
)
// it is either a OneNote or PDF
and (
strings.icontains(.href_url.path, '/:o:/')
or strings.icontains(.href_url.path, '/:b:/')
or strings.icontains(.href_url.path, '/:u:/')
)
)
Detection logic
Scope: inbound message.
This rule detect potential credential phishing leveraging SharePoint file sharing to deliver a PDF, OneNote, or Unknown file type file using indicators such as suspicious sender analysis and link characteristics.
- inbound message
- headers.message_id starts with '<Share-'
- headers.message_id ends with '@odspnotify>'
body.current_thread.text matches any of 3 patterns
*shared a file with you**shared with you**invited you to access a file*
- subject.subject contains 'shared'
any of:
all of:
- sender.email.domain.domain is not 'sharepointonline.com'
not:
- profile.by_sender().solicited
all of:
- sender.email.domain.domain is 'sharepointonline.com'
- length(headers.reply_to) > 0
any of:
all of
headers.reply_towhere all hold:- .email.domain.root_domain not in $free_email_providers
- network.whois(.email.domain).days_old ≤ 30
- .email.email is not sender.email.email
all of
headers.reply_towhere:- .email.domain.root_domain in $free_email_providers
not:
- beta.profile.by_reply_to().solicited
not:
- beta.profile.by_reply_to().any_messages_benign
any of
body.linkswhere all hold:- .href_url.domain.root_domain is 'sharepoint.com'
any of:
- .href_url.path contains '/g/personal/'
- .href_url.path contains '/p/'
any of:
- .href_url.path contains '/:o:/'
- .href_url.path contains '/:b:/'
- .href_url.path contains '/:u:/'
Inspects: body.current_thread.text, body.links, body.links[].href_url.domain.root_domain, body.links[].href_url.path, headers.message_id, headers.reply_to, headers.reply_to[].email.domain, headers.reply_to[].email.domain.root_domain, headers.reply_to[].email.email, sender.email.domain.domain, sender.email.email, subject.subject, type.inbound. Sensors: beta.profile.by_reply_to, network.whois, profile.by_sender, strings.ends_with, strings.icontains, strings.like, strings.starts_with. Reference lists: $free_email_providers.
Indicators matched (13)
| Field | Match | Value |
|---|---|---|
strings.starts_with | prefix | <Share- |
strings.ends_with | suffix | @odspnotify> |
strings.like | substring | *shared a file with you* |
strings.like | substring | *shared with you* |
strings.like | substring | *invited you to access a file* |
strings.icontains | substring | shared |
sender.email.domain.domain | equals | sharepointonline.com |
body.links[].href_url.domain.root_domain | equals | sharepoint.com |
strings.icontains | substring | /g/personal/ |
strings.icontains | substring | /p/ |
strings.icontains | substring | /:o:/ |
strings.icontains | substring | /:b:/ |
1 more
strings.icontains | substring | /:u:/ |