Detection rules › Sublime MQL

Link to Google Apps Script macro via comment tagging

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

Message contains a Google Apps Script macro link invoked from a comment on Google Slides|Docs. App Scripts can run arbitrary code, including redirecting the user to a malicious web page.

Threat classification

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

CategoryValues
Attack typesCredential Phishing, Malware/Ransomware
Tactics and techniquesSocial engineering

Event coverage

Rule body MQL

type.inbound
and regex.contains(sender.display_name, '\(Google (Slides|Docs)')
and any(body.links,
        .href_url.domain.domain == "script.google.com"
        and strings.ilike(.href_url.path, "/macros*")
)
and 1 of (
  strings.ilike(body.plain.raw, '*you have ? hours*'),
  strings.ilike(body.plain.raw, '*transfer of funds*'),
  strings.ilike(body.plain.raw, '*order your funds*')
  // Or the Sender Display Name is not in your Org Display Names
  or not any($org_display_names,
             strings.istarts_with(sender.display_name,
                                  strings.concat(., " (Google ")
             )
  )
)

Detection logic

Scope: inbound message.

Message contains a Google Apps Script macro link invoked from a comment on Google Slides|Docs. App Scripts can run arbitrary code, including redirecting the user to a malicious web page.

  1. inbound message
  2. sender.display_name matches '\\(Google (Slides|Docs)'
  3. any of body.links where all hold:
    • .href_url.domain.domain is 'script.google.com'
    • .href_url.path matches '/macros*'
  4. at least 1 of:
    • body.plain.raw matches '*you have ? hours*'
    • body.plain.raw matches '*transfer of funds*'
    • any of:
      • body.plain.raw matches '*order your funds*'
      • not:
        • any of $org_display_names where:
          • strings.istarts_with(sender.display_name)

Inspects: body.links, body.links[].href_url.domain.domain, body.links[].href_url.path, body.plain.raw, sender.display_name, type.inbound. Sensors: regex.contains, strings.concat, strings.ilike, strings.istarts_with. Reference lists: $org_display_names.

Indicators matched (6)

FieldMatchValue
regex.containsregex\(Google (Slides|Docs)
body.links[].href_url.domain.domainequalsscript.google.com
strings.ilikesubstring/macros*
strings.ilikesubstring*you have ? hours*
strings.ilikesubstring*transfer of funds*
strings.ilikesubstring*order your funds*