Detection rules › Sublime MQL

Service abuse: Google Firebase sender address with suspicious content

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

Detects messages from Firebase hosted domains that contain suspicious indicators such as emojis, spam keywords, unusual link patterns, or freemail registrant information.

Threat classification

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

CategoryValues
Attack typesSpam, Credential Phishing
Tactics and techniquesFree subdomain host, Social engineering

Event coverage

Rule body MQL

type.inbound
and sender.email.domain.root_domain == "firebaseapp.com"
and length(body.links) != 0
and 1 of (
  // has an emoji in the subject or body
  regex.contains(body.plain.raw,
                 '[\x{1F300}-\x{1F5FF}\x{1F600}-\x{1F64F}\x{1F680}-\x{1F6FF}\x{1F700}-\x{1F77F}\x{1F780}-\x{1F7FF}\x{1F900}-\x{1F9FF}\x{2600}-\x{26FF}\x{2700}-\x{27BF}\x{2300}-\x{23FF}]'
  ),
  regex.contains(subject.subject,
                 '[\x{1F300}-\x{1F5FF}\x{1F600}-\x{1F64F}\x{1F680}-\x{1F6FF}\x{1F700}-\x{1F77F}\x{1F780}-\x{1F7FF}\x{1F900}-\x{1F9FF}\x{2600}-\x{26FF}\x{2700}-\x{27BF}\x{2300}-\x{23FF}]'
  ),
  // spammy keywords
  strings.ilike(body.current_thread.text,
                "*congrat*",
                "*win*",
                "*expired*",
                "*subscription*",
                "*won*",
                "*gift*",
                "*CARTE CADEAU*",
                "*Votre chance*",
                "*survey*",
                "*livraison*",
                "*delivery*",
                "*package*",
                "*claim*",
                "*rewards*"
  ),
  // entire body is an image with a link
  length(body.current_thread.text) == 0
  and length(body.links) == 1,
  // HTML body starts with a link
  strings.istarts_with(body.html.raw, '<a href='),
  // known spammy HTML elements
  any(html.xpath(body.html, '//*/@class').nodes,
      strings.icontains(.raw, 'eb-drag-and-drop-builder')
  ),
  // multiple links that are identical
  length(body.links) > 1
  and length(distinct(body.links, .href_url.url)) == 1,
  // body link whois email is a freemail
  any(body.links,
      strings.parse_email(network.whois(.href_url.domain).registrant_email).domain.root_domain in $free_email_providers
      or strings.parse_email(network.whois(.href_url.domain).administrative_email
      ).domain.root_domain in $free_email_providers
      or strings.parse_email(network.whois(.href_url.domain).technical_email).domain.root_domain in $free_email_providers
  ),
  // all links utilize a url shortener
  all(body.links, .href_url.domain.root_domain in $url_shorteners),
  // freemail reply-to
  any(headers.reply_to, .email.domain.root_domain in $free_email_providers),
  // link with display text, but no tracking info (unusual for legitimate marketing)
  any(body.links, .display_text is not null and .href_url.path is null),
  // presence of Javascript inside of the message
  regex.contains(body.html.raw, '<script[\s>]')
)

Detection logic

Scope: inbound message.

Detects messages from Firebase hosted domains that contain suspicious indicators such as emojis, spam keywords, unusual link patterns, or freemail registrant information.

  1. inbound message
  2. sender.email.domain.root_domain is 'firebaseapp.com'
  3. length(body.links) is not 0
  4. at least 1 of:
    • body.plain.raw matches '[\\x{1F300}-\\x{1F5FF}\\x{1F600}-\\x{1F64F}\\x{1F680}-\\x{1F6FF}\\x{1F700}-\\x{1F77F}\\x{1F780}-\\x{1F7FF}\\x{1F900}-\\x{1F9FF}\\x{2600}-\\x{26FF}\\x{2700}-\\x{27BF}\\x{2300}-\\x{23FF}]'
    • subject.subject matches '[\\x{1F300}-\\x{1F5FF}\\x{1F600}-\\x{1F64F}\\x{1F680}-\\x{1F6FF}\\x{1F700}-\\x{1F77F}\\x{1F780}-\\x{1F7FF}\\x{1F900}-\\x{1F9FF}\\x{2600}-\\x{26FF}\\x{2700}-\\x{27BF}\\x{2300}-\\x{23FF}]'
    • body.current_thread.text matches any of 14 patterns
      • *congrat*
      • *win*
      • *expired*
      • *subscription*
      • *won*
      • *gift*
      • *CARTE CADEAU*
      • *Votre chance*
      • *survey*
      • *livraison*
      • *delivery*
      • *package*
      • *claim*
      • *rewards*
    • all of:
      • length(body.current_thread.text) is 0
      • length(body.links) is 1
    • body.html.raw starts with '<a href='
    • any of html.xpath(body.html, '//*/@class').nodes where:
      • .raw contains 'eb-drag-and-drop-builder'
    • all of:
      • length(body.links) > 1
      • length(distinct(body.links, .href_url.url)) is 1
    • any of body.links where any holds:
      • strings.parse_email(network.whois(.href_url.domain).registrant_email).domain.root_domain in $free_email_providers
      • strings.parse_email(network.whois(.href_url.domain).administrative_email).domain.root_domain in $free_email_providers
      • strings.parse_email(network.whois(.href_url.domain).technical_email).domain.root_domain in $free_email_providers
    • all of body.links where:
      • .href_url.domain.root_domain in $url_shorteners
    • any of headers.reply_to where:
      • .email.domain.root_domain in $free_email_providers
    • any of body.links where all hold:
      • .display_text is set
      • .href_url.path is missing
    • body.html.raw matches '<script[\\s>]'

Inspects: body.current_thread.text, body.html, body.html.raw, body.links, body.links[].display_text, body.links[].href_url.domain, body.links[].href_url.domain.root_domain, body.links[].href_url.path, body.links[].href_url.url, body.plain.raw, headers.reply_to, headers.reply_to[].email.domain.root_domain, sender.email.domain.root_domain, subject.subject, type.inbound. Sensors: html.xpath, network.whois, regex.contains, strings.icontains, strings.ilike, strings.istarts_with, strings.parse_email. Reference lists: $free_email_providers, $url_shorteners.

Indicators matched (19)

FieldMatchValue
sender.email.domain.root_domainequalsfirebaseapp.com
regex.containsregex[\x{1F300}-\x{1F5FF}\x{1F600}-\x{1F64F}\x{1F680}-\x{1F6FF}\x{1F700}-\x{1F77F}\x{1F780}-\x{1F7FF}\x{1F900}-\x{1F9FF}\x{2600}-\x{26FF}\x{2700}-\x{27BF}\x{2300}-\x{23FF}]
strings.ilikesubstring*congrat*
strings.ilikesubstring*win*
strings.ilikesubstring*expired*
strings.ilikesubstring*subscription*
strings.ilikesubstring*won*
strings.ilikesubstring*gift*
strings.ilikesubstring*CARTE CADEAU*
strings.ilikesubstring*Votre chance*
strings.ilikesubstring*survey*
strings.ilikesubstring*livraison*
7 more
strings.ilikesubstring*delivery*
strings.ilikesubstring*package*
strings.ilikesubstring*claim*
strings.ilikesubstring*rewards*
strings.istarts_withprefix<a href=
strings.icontainssubstringeb-drag-and-drop-builder
regex.containsregex<script[\s>]