Detection rules › Sublime MQL

Credential phishing: Blue button styled link with file-sharing template artifacts

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

Detects inbound messages containing styled blue button links commonly associated with generic file-sharing phishing templates, where the link does not point to legitimate Outlook domains.

Threat classification

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

CategoryValues
Attack typesCredential Phishing
Tactics and techniquesImpersonation: Brand, Social engineering

Event coverage

Rule body MQL

type.inbound
and (
  // no previous threads
  length(body.previous_threads) == 0
  // or is a fake thread
  or (
    (length(headers.references) == 0 or headers.in_reply_to is null)
    and (
      subject.is_reply
      or subject.is_forward
      or length(body.previous_threads) > 0
    )
  )
)
and any(filter(html.xpath(body.html, '//a[@href]').nodes,
               // blue button background, background-color and observed colors
               regex.icontains(.raw,
                               '(?:background(?:-color)?)\s*[:\s]\s*#(?:0078d4|3a78d1)'
               )
        ),
        (
          // it's styled as a button
          regex.icontains(.raw, 'padding')
        )
        // ignore links going to microsoft
        and not any(.links,
                    (
                      .href_url.domain.sld in (
                        "microsoft",
                        "azure",
                        "outlook.office365",
                        "office365"
                      )
                    )
                    or .href_url.domain.domain in $tenant_domains
                    or (
                      .href_url.domain.root_domain in (
                        "mimecast.com",
                        "mimecastprotect.com"
                      )
                      and any(.href_url.query_params_decoded['domain'],
                              strings.parse_domain(.).domain in (
                                "microsoft.com",
                                "azure.com",
                                "outlook.office365.com",
                                "office365.com"
                              )
                              or strings.parse_domain(.).domain in $tenant_domains
                      )
                    )
        )
)
and any(ml.nlu_classifier(body.current_thread.text).intents, .name != "benign")
// negate attachments that contain the known microsoft content type
and not any(attachments,
            strings.icontains(.content_type, 'x-microsoft-rpmsg-message')
)
// negate microsoft emails who pass auth
and not (
  sender.email.domain.root_domain == "microsoft.com"
  and headers.auth_summary.dmarc.pass
)

Detection logic

Scope: inbound message.

Detects inbound messages containing styled blue button links commonly associated with generic file-sharing phishing templates, where the link does not point to legitimate Outlook domains.

  1. inbound message
  2. any of:
    • length(body.previous_threads) is 0
    • all of:
      • any of:
        • length(headers.references) is 0
        • headers.in_reply_to is missing
      • any of:
        • subject.is_reply
        • subject.is_forward
        • length(body.previous_threads) > 0
  3. any of filter(...) where all hold:
    • .raw matches 'padding'
    • not:
      • any of .links where any holds:
        • .href_url.domain.sld in ('microsoft', 'azure', 'outlook.office365', 'office365')
        • .href_url.domain.domain in $tenant_domains
        • all of:
          • .href_url.domain.root_domain in ('mimecast.com', 'mimecastprotect.com')
          • any of .href_url.query_params_decoded['domain'] where any holds:
            • strings.parse_domain(.).domain in ('microsoft.com', 'azure.com', 'outlook.office365.com', 'office365.com')
            • strings.parse_domain(.).domain in $tenant_domains
  4. any of ml.nlu_classifier(body.current_thread.text).intents where:
    • .name is not 'benign'
  5. not:
    • any of attachments where:
      • .content_type contains 'x-microsoft-rpmsg-message'
  6. not:
    • all of:
      • sender.email.domain.root_domain is 'microsoft.com'
      • headers.auth_summary.dmarc.pass

Inspects: attachments[].content_type, body.current_thread.text, body.html, body.previous_threads, headers.auth_summary.dmarc.pass, headers.in_reply_to, headers.references, sender.email.domain.root_domain, subject.is_forward, subject.is_reply, type.inbound. Sensors: html.xpath, ml.nlu_classifier, regex.icontains, strings.icontains, strings.parse_domain. Reference lists: $tenant_domains.

Indicators matched (10)

FieldMatchValue
regex.icontainsregex(?:background(?:-color)?)\s*[:\s]\s*#(?:0078d4|3a78d1)
regex.icontainsregexpadding
filter(...)[].links[].href_url.domain.sldmembermicrosoft
filter(...)[].links[].href_url.domain.sldmemberazure
filter(...)[].links[].href_url.domain.sldmemberoutlook.office365
filter(...)[].links[].href_url.domain.sldmemberoffice365
filter(...)[].links[].href_url.domain.root_domainmembermimecast.com
filter(...)[].links[].href_url.domain.root_domainmembermimecastprotect.com
strings.icontainssubstringx-microsoft-rpmsg-message
sender.email.domain.root_domainequalsmicrosoft.com