Detection rules › Sublime MQL

Sublime MQL rules: uri

URI protocol handler: search-ms

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

Detects HTML attachments using the search-ms URI protocol handler, a technique observed ITW to deliver malicious payloads. This rule can be updated to analyze links in PDF attachments and message bodies

Threat classification

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

CategoryValues
Attack typesMalware/Ransomware
Tactics and techniquesEvasion

Telemetry coverage

PlatformRecord / event type
SublimeInbound email message

Message attributes

  • attachments
  • type

Rule body

type.inbound
and any(attachments,
        .file_type == "html"
        and any(file.explode(.),
                any(.scan.strings.strings,
                    regex.contains(., 'search-ms:query.*location:\\\\')
                )
        )
)

Detection logic

Scope: inbound message.

Detects HTML attachments using the search-ms URI protocol handler, a technique observed ITW to deliver malicious payloads. This rule can be updated to analyze links in PDF attachments and message bodies

  1. inbound message
  2. any of attachments where all hold:
    • .file_type is 'html'
    • any of file.explode(.) where:
      • any of .scan.strings.strings where:
        • . matches 'search-ms:query.*location:\\\\\\\\'

Inspects: attachments[].file_type, type.inbound. Sensors: file.explode, regex.contains.

Indicators matched (2)

FieldMatchValue
attachments[].file_typeequalshtml
regex.containsregexsearch-ms:query.*location:\\\\

Stages and Predicates

Stage 1: mql_rule

and
  any(attachments)
    and
      any(file.explode(attachments))
        any(file.explode(attachments).scan.strings.strings)
          file.explode(attachments).scan.strings.strings regex_match "search-ms:query.*location:\\\\\\\\"
      attachments.file_type eq "html"
  type.inbound eq "true"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
type.inboundeq
  • true transforms: boolean
field:"type.inbound" kind:eq value:"true"