Detection rules › Sublime MQL

Fake email quarantine notification

Severity
high
Type
rule
Source
github.com/sublime-security/sublime-rules

Detects phishing messages implying that emails have been delayed or blocked, prompting users to view, release, or delete pending messages.

Threat classification

Sublime's own taxonomy (not MITRE ATT&CK).

CategoryValues
Attack typesCredential Phishing
Tactics and techniquesSocial engineering

Event coverage

Rule body MQL

type.inbound
and length(body.links) < 10
and (
  any(ml.nlu_classifier(body.current_thread.text).intents,
      .name == "cred_theft" and .confidence == "high"
  )
  or (
    length(body.current_thread.text) < 250
    and any(recipients.to,
            strings.icontains(body.current_thread.text, .email.domain.sld)
            or strings.icontains(body.current_thread.text, .email.local_part)
    )
  )
)
and not (
  length(ml.nlu_classifier(body.current_thread.text).topics) == 1
  and any(ml.nlu_classifier(body.current_thread.text).topics,
          .name == "Financial Communications" and .confidence != "low"
  )
)
and 3 of (
  strings.ilike(body.current_thread.text, "*review*"),
  strings.ilike(body.current_thread.text, "*incoming*"),
  strings.ilike(body.current_thread.text, "*release*"),
  strings.ilike(body.current_thread.text, "*quarantine*"),
  strings.ilike(body.current_thread.text, "*messages*"),
  strings.ilike(body.current_thread.text, "*server error*"),
  strings.ilike(body.current_thread.text, "*blocked*"),
  strings.ilike(body.current_thread.text, "*prevented*"),
  strings.ilike(body.current_thread.text, "*validation*"),
  strings.ilike(body.current_thread.text, "*notification*"),
  strings.ilike(body.current_thread.text, "*kindly*"),
  strings.ilike(body.current_thread.text, "*on hold*"),
  strings.ilike(body.current_thread.text, "*held*"),
  strings.ilike(body.current_thread.text, "*pending*"),
  strings.ilike(body.current_thread.text, "*stuck*"),
  strings.like(body.current_thread.text, "* MX *")
)
and (
  any(body.links,
      regex.icontains(.display_text,
                      "view",
                      "release",
                      "message",
                      "delete",
                      "recover",
                      "SSO",
                      "sign in"
      )
  )
  or (
    length(body.links) < 3
    and any(body.links,
            any(recipients.to,
                .email.domain.root_domain == ..display_url.domain.root_domain
                and ..mismatched
            )
    )
  )
)
and not any(body.links,
            regex.icontains(.display_text,
                            "view document",
                            "review (&|and) sign document"
            )
)
and sender.email.domain.root_domain not in (
  "bing.com",
  "microsoft.com",
  "microsoftonline.com",
  "microsoftsupport.com",
  "microsoft365.com",
  "office.com",
  "office365.com",
  "onedrive.com",
  "sharepointonline.com",
  "yammer.com",
  "ppops.net"
)

// negate org domains unless they fail DMARC authentication
and (
  (
    sender.email.domain.root_domain in $org_domains
    and (
      not headers.auth_summary.dmarc.pass
      // MS quarantine digest emails from an org domain are router "internally" to MS, therefore, there is no authentication information
      or not (
        headers.auth_summary.dmarc.pass is null
        and all(headers.domains,
                .root_domain in ("outlook.com", "office365.com")
        )
        // typical emails from freemail Outlook accounts are from prod.outlook.com
        and strings.ends_with(headers.message_id, "protection.outlook.com>")
      )
    )
  )
  or sender.email.domain.root_domain not in $org_domains
)

// 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 profile.by_sender().solicited
and not profile.by_sender().any_messages_benign

Detection logic

Scope: inbound message.

Detects phishing messages implying that emails have been delayed or blocked, prompting users to view, release, or delete pending messages.

  1. inbound message
  2. length(body.links) < 10
  3. any of:
    • any of ml.nlu_classifier(body.current_thread.text).intents where all hold:
      • .name is 'cred_theft'
      • .confidence is 'high'
    • all of:
      • length(body.current_thread.text) < 250
      • any of recipients.to where any holds:
        • strings.icontains(body.current_thread.text)
        • strings.icontains(body.current_thread.text)
  4. not:
    • all of:
      • length(ml.nlu_classifier(body.current_thread.text).topics) is 1
      • any of ml.nlu_classifier(body.current_thread.text).topics where all hold:
        • .name is 'Financial Communications'
        • .confidence is not 'low'
  5. at least 3 of 16: body.current_thread.text matches any of 16 patterns
    • *review*
    • *incoming*
    • *release*
    • *quarantine*
    • *messages*
    • *server error*
    • *blocked*
    • *prevented*
    • *validation*
    • *notification*
    • *kindly*
    • *on hold*
    • *held*
    • *pending*
    • *stuck*
    • * MX *
  6. any of:
    • any of body.links where:
      • .display_text matches any of 7 patterns
        • view
        • release
        • message
        • delete
        • recover
        • SSO
        • sign in
    • all of:
      • length(body.links) < 3
      • any of body.links where:
        • any of recipients.to where all hold:
          • .email.domain.root_domain is .display_url.domain.root_domain
          • .mismatched
  7. not:
    • any of body.links where:
      • .display_text matches any of 2 patterns
        • view document
        • review (&|and) sign document
  8. sender.email.domain.root_domain not in ('bing.com', 'microsoft.com', 'microsoftonline.com', 'microsoftsupport.com', 'microsoft365.com', 'office.com', 'office365.com', 'onedrive.com', 'sharepointonline.com', 'yammer.com', 'ppops.net')
  9. any of:
    • all of:
      • sender.email.domain.root_domain in $org_domains
      • any of:
        • not:
          • headers.auth_summary.dmarc.pass
        • not:
          • all of:
            • headers.auth_summary.dmarc.pass is missing
            • all of headers.domains where:
              • .root_domain in ('outlook.com', 'office365.com')
            • headers.message_id ends with 'protection.outlook.com>'
    • sender.email.domain.root_domain not in $org_domains
  10. 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
  11. not:
    • profile.by_sender().solicited
  12. not:
    • profile.by_sender().any_messages_benign

Inspects: body.current_thread.text, body.links, body.links[].display_text, body.links[].display_url.domain.root_domain, body.links[].mismatched, headers.auth_summary.dmarc.pass, headers.domains, headers.domains[].root_domain, headers.message_id, recipients.to, recipients.to[].email.domain.root_domain, recipients.to[].email.domain.sld, recipients.to[].email.local_part, sender.email.domain.root_domain, type.inbound. Sensors: ml.nlu_classifier, profile.by_sender, regex.icontains, strings.ends_with, strings.icontains, strings.ilike, strings.like. Reference lists: $high_trust_sender_root_domains, $org_domains.

Indicators matched (42)

FieldMatchValue
ml.nlu_classifier(body.current_thread.text).intents[].nameequalscred_theft
ml.nlu_classifier(body.current_thread.text).intents[].confidenceequalshigh
ml.nlu_classifier(body.current_thread.text).topics[].nameequalsFinancial Communications
strings.ilikesubstring*review*
strings.ilikesubstring*incoming*
strings.ilikesubstring*release*
strings.ilikesubstring*quarantine*
strings.ilikesubstring*messages*
strings.ilikesubstring*server error*
strings.ilikesubstring*blocked*
strings.ilikesubstring*prevented*
strings.ilikesubstring*validation*
30 more
strings.ilikesubstring*notification*
strings.ilikesubstring*kindly*
strings.ilikesubstring*on hold*
strings.ilikesubstring*held*
strings.ilikesubstring*pending*
strings.ilikesubstring*stuck*
strings.likesubstring* MX *
regex.icontainsregexview
regex.icontainsregexrelease
regex.icontainsregexmessage
regex.icontainsregexdelete
regex.icontainsregexrecover
regex.icontainsregexSSO
regex.icontainsregexsign in
regex.icontainsregexview document
regex.icontainsregexreview (&|and) sign document
sender.email.domain.root_domainmemberbing.com
sender.email.domain.root_domainmembermicrosoft.com
sender.email.domain.root_domainmembermicrosoftonline.com
sender.email.domain.root_domainmembermicrosoftsupport.com
sender.email.domain.root_domainmembermicrosoft365.com
sender.email.domain.root_domainmemberoffice.com
sender.email.domain.root_domainmemberoffice365.com
sender.email.domain.root_domainmemberonedrive.com
sender.email.domain.root_domainmembersharepointonline.com
sender.email.domain.root_domainmemberyammer.com
sender.email.domain.root_domainmemberppops.net
headers.domains[].root_domainmemberoutlook.com
headers.domains[].root_domainmemberoffice365.com
strings.ends_withsuffixprotection.outlook.com>