Detection rules › Sublime MQL

Brand impersonation: Microsoft logo or suspicious language with open redirect

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

Message contains a Microsoft logo or suspicious terms and use of an open redirect. This has been exploited in the wild to impersonate Microsoft.

Threat classification

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

CategoryValues
Attack typesBEC/Fraud
Tactics and techniquesImpersonation: Brand, Open redirect, Social engineering

Event coverage

Rule body MQL

type.inbound
and (length(attachments) < 5 or length(body.links) < 10)
// Microsoft logo
and (
  any(attachments,
      .file_type in $file_types_images
      and any(ml.logo_detect(.).brands, strings.starts_with(.name, "Microsoft"))
  )
  or any(attachments,
         .file_type in $file_types_images
         and (
           any(file.explode(.),
               2 of (
                 strings.ilike(.scan.ocr.raw, "*password*"),
                 strings.ilike(.scan.ocr.raw, "*unread messages*"),
                 strings.ilike(.scan.ocr.raw, "*Shared Documents*"),
                 strings.ilike(.scan.ocr.raw, "*expiration*"),
                 strings.ilike(.scan.ocr.raw, "*office*"),
                 strings.ilike(.scan.ocr.raw, "*expire*"),
                 strings.ilike(.scan.ocr.raw, "*expiring*"),
                 strings.ilike(.scan.ocr.raw, "*kindly*"),
                 strings.ilike(.scan.ocr.raw, "*renew*"),
                 strings.ilike(.scan.ocr.raw, "*review"),
                 strings.ilike(.scan.ocr.raw, "*emails failed*"),
                 strings.ilike(.scan.ocr.raw, "*kicked out*"),
                 strings.ilike(.scan.ocr.raw, "*prevented*"),
                 strings.ilike(.scan.ocr.raw, "*storage quota*"),
                 strings.ilike(.scan.ocr.raw, "*required now"),
                 strings.ilike(.scan.ocr.raw, "*cache*"),
                 strings.ilike(.scan.ocr.raw, "*qr code*"),
                 strings.ilike(.scan.ocr.raw, "*barcode*"),
                 strings.ilike(.scan.ocr.raw, "*security update*"),
                 strings.ilike(.scan.ocr.raw, "*quarantine*")
               )
           )
         )
  )
)

// open redirect
and any(body.links,
        any(.href_url.rewrite.encoders, strings.icontains(., "open_redirect"))
        and not .href_url.domain.root_domain in $org_domains
)
and not (length(headers.references) > 0 or headers.in_reply_to is not null)
and sender.email.domain.root_domain not in $org_domains
and sender.email.domain.root_domain not in (
  "bing.com",
  "microsoft.com",
  "microsoftonline.com",
  "microsoftstoreemail.com",
  "microsoftsupport.com",
  "microsoft365.com",
  "office.com",
  "onedrive.com",
  "sharepointonline.com",
  "yammer.com"
)

Detection logic

Scope: inbound message.

Message contains a Microsoft logo or suspicious terms and use of an open redirect. This has been exploited in the wild to impersonate Microsoft.

  1. inbound message
  2. any of:
    • length(attachments) < 5
    • length(body.links) < 10
  3. any of:
    • any of attachments where all hold:
      • .file_type in $file_types_images
      • any of ml.logo_detect(.).brands where:
        • .name starts with 'Microsoft'
    • any of attachments where all hold:
      • .file_type in $file_types_images
      • any of file.explode(.) where:
        • at least 2 of 20: .scan.ocr.raw matches any of 20 patterns
          • *password*
          • *unread messages*
          • *Shared Documents*
          • *expiration*
          • *office*
          • *expire*
          • *expiring*
          • *kindly*
          • *renew*
          • *review
          • *emails failed*
          • *kicked out*
          • *prevented*
          • *storage quota*
          • *required now
          • *cache*
          • *qr code*
          • *barcode*
          • *security update*
          • *quarantine*
  4. any of body.links where all hold:
    • any of .href_url.rewrite.encoders where:
      • . contains 'open_redirect'
    • not:
      • .href_url.domain.root_domain in $org_domains
  5. none of:
    • length(headers.references) > 0
    • headers.in_reply_to is set
  6. sender.email.domain.root_domain not in $org_domains
  7. sender.email.domain.root_domain not in ('bing.com', 'microsoft.com', 'microsoftonline.com', 'microsoftstoreemail.com', 'microsoftsupport.com', 'microsoft365.com', 'office.com', 'onedrive.com', 'sharepointonline.com', 'yammer.com')

Inspects: attachments[].file_type, body.links, body.links[].href_url.domain.root_domain, body.links[].href_url.rewrite.encoders, headers.in_reply_to, headers.references, sender.email.domain.root_domain, type.inbound. Sensors: file.explode, ml.logo_detect, strings.icontains, strings.ilike, strings.starts_with. Reference lists: $file_types_images, $org_domains.

Indicators matched (32)

FieldMatchValue
strings.starts_withprefixMicrosoft
strings.ilikesubstring*password*
strings.ilikesubstring*unread messages*
strings.ilikesubstring*Shared Documents*
strings.ilikesubstring*expiration*
strings.ilikesubstring*office*
strings.ilikesubstring*expire*
strings.ilikesubstring*expiring*
strings.ilikesubstring*kindly*
strings.ilikesubstring*renew*
strings.ilikesubstring*review
strings.ilikesubstring*emails failed*
20 more
strings.ilikesubstring*kicked out*
strings.ilikesubstring*prevented*
strings.ilikesubstring*storage quota*
strings.ilikesubstring*required now
strings.ilikesubstring*cache*
strings.ilikesubstring*qr code*
strings.ilikesubstring*barcode*
strings.ilikesubstring*security update*
strings.ilikesubstring*quarantine*
strings.icontainssubstringopen_redirect
sender.email.domain.root_domainmemberbing.com
sender.email.domain.root_domainmembermicrosoft.com
sender.email.domain.root_domainmembermicrosoftonline.com
sender.email.domain.root_domainmembermicrosoftstoreemail.com
sender.email.domain.root_domainmembermicrosoftsupport.com
sender.email.domain.root_domainmembermicrosoft365.com
sender.email.domain.root_domainmemberoffice.com
sender.email.domain.root_domainmemberonedrive.com
sender.email.domain.root_domainmembersharepointonline.com
sender.email.domain.root_domainmemberyammer.com