Detection rules › Sublime MQL

Open redirect: YouTube

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

Looks for use of the YouTube open redirect coming from someone other than YouTube.

Threat classification

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

CategoryValues
Attack typesCredential Phishing, Malware/Ransomware
Tactics and techniquesOpen redirect

Event coverage

Rule body MQL

type.inbound
and (
  any(body.links,
      .href_url.domain.sld == "youtube"
      and (
        strings.icontains(.href_url.url, "attribution_link?")
        or .href_url.path == "/redirect"
      )
  )
  or any(attachments,
         (
           .file_extension in~ $file_extensions_macros
           or .file_extension in~ $file_extensions_common_archives
           or (
             .file_extension is null
             and .file_type == "unknown"
             and .content_type == "application/octet-stream"
             and .size < 100000000
           )
         )
         and any(file.oletools(.).relationships,
                 .name == "hyperlink"
                 and .target_url.domain.sld == "youtube"
                 and (
                   strings.icontains(.target_url.path, "attribution_link?")
                   or .target_url.path == "/redirect"
                 )
         )
  )
)
and headers.auth_summary.dmarc.details.from.root_domain == "youtube.com"

// 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
  or profile.by_sender().any_messages_malicious_or_spam
)

Detection logic

Scope: inbound message.

Looks for use of the YouTube open redirect coming from someone other than YouTube.

  1. inbound message
  2. any of:
    • any of body.links where all hold:
      • .href_url.domain.sld is 'youtube'
      • any of:
        • .href_url.url contains 'attribution_link?'
        • .href_url.path is '/redirect'
    • any of attachments where all hold:
      • any of:
        • .file_extension in $file_extensions_macros
        • .file_extension in $file_extensions_common_archives
        • all of:
          • .file_extension is missing
          • .file_type is 'unknown'
          • .content_type is 'application/octet-stream'
          • .size < 100000000
      • any of file.oletools(.).relationships where all hold:
        • .name is 'hyperlink'
        • .target_url.domain.sld is 'youtube'
        • any of:
          • .target_url.path contains 'attribution_link?'
          • .target_url.path is '/redirect'
  3. headers.auth_summary.dmarc.details.from.root_domain is 'youtube.com'
  4. 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
  5. any of:
    • not:
      • profile.by_sender().solicited
    • profile.by_sender().any_messages_malicious_or_spam

Inspects: attachments[].content_type, attachments[].file_extension, attachments[].file_type, attachments[].size, body.links, body.links[].href_url.domain.sld, body.links[].href_url.path, body.links[].href_url.url, headers.auth_summary.dmarc.details.from.root_domain, headers.auth_summary.dmarc.pass, sender.email.domain.root_domain, type.inbound. Sensors: file.oletools, profile.by_sender, strings.icontains. Reference lists: $file_extensions_common_archives, $file_extensions_macros, $high_trust_sender_root_domains.

Indicators matched (9)

FieldMatchValue
body.links[].href_url.domain.sldequalsyoutube
strings.icontainssubstringattribution_link?
body.links[].href_url.pathequals/redirect
attachments[].file_typeequalsunknown
attachments[].content_typeequalsapplication/octet-stream
file.oletools(attachments[]).relationships[].nameequalshyperlink
file.oletools(attachments[]).relationships[].target_url.domain.sldequalsyoutube
file.oletools(attachments[]).relationships[].target_url.pathequals/redirect
headers.auth_summary.dmarc.details.from.root_domainequalsyoutube.com