Description

Detection Rule matches on messages which contain a link to a sharepoint shared folder containing a single .url file. These messages must not be sent from sharepoint and are either not solicited or from a new or outlier sender.

References

No references.

Sublime Security
Created Sep 23rd, 2024 • Last updated Oct 30th, 2026
Source
type.inbound
and any(filter(body.links,
               // folder share
               strings.icontains(.href_url.domain.domain, "-my.sharepoint.com")
               and strings.icontains(.href_url.url, "/:f:/g/personal")

               // remove links which contains the domain sld in the subdomain (tenenat) name
               and not any($org_slds,
                           strings.icontains(..href_url.domain.subdomain, .)
               )
        ),
        // a single shared URL file
        length(html.xpath(ml.link_analysis(., mode="aggressive").final_dom,
                          '//div[@role="row" and starts-with(@data-automationid, "row-")][.//span[@data-id="heroField"][contains(@title, ".url")]][.//button[@data-automationid="manageAccess"]]'
               ).nodes
        ) == 1
)

// message is not from sharepoint actual
and not (
  strings.starts_with(headers.message_id, '<Share-')
  and strings.ends_with(headers.message_id, '@odspnotify>')
)
and (
  // not solicited
  not profile.by_sender().solicited
  // new or outlier sender prevalence
  or profile.by_sender().prevalence in ("new", "outlier")
  // marked as spam and no FPs
  or (
    profile.by_sender().any_messages_malicious_or_spam
    and not profile.by_sender().any_messages_benign
  )
)

// negate highly trusted sender domains unless they fail DMARC authentication
and not (
  sender.email.domain.root_domain in $high_trust_sender_root_domains
  and coalesce(headers.auth_summary.dmarc.pass, false)
)
MQL Rule Console
•Docs•Learning Labs

Playground

Test against your own EMLs or sample data.

Share

Post about this on your socials.

Get Started. Today.

Managed or self-managed. No MX changes.

Deploy and integrate a free Sublime instance in minutes.
Get Started