Detection rules › Sublime MQL

Sublime MQL rules: google

Google Drive abuse: Credential phishing link

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

This rule detects legitimate Google Drive shares that link to files on Google Drive that host credential phishing content. The file is usually a PDF that impersonates a legitimate brand, with credential theft language, and a button or link to an external site that steals login credentials.

Threat Classification

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

CategoryValues
Attack typesCredential Phishing
Tactics and techniquesFree file host, Impersonation: Brand

Telemetry Coverage

PlatformRecord / event type
SublimeInbound email message

Message Attributes

  • body
  • body.current_thread
  • body.links
  • sender.email
  • type

Rule Body

type.inbound
and sender.email.email in (
  "drive-shares-dm-noreply@google.com",
  "drive-shares-noreply@google.com"
)

// malicious observed shares don't include the google "Added you as an editor" phrase.
// allowing user edits to a malicous document could neuter the threat
and not strings.contains(body.current_thread.text, "added you as an editor")
and any(filter(body.links,
               .href_url.domain.domain != "support.google.com"
               and .display_text == "Open"
        ),
        (
          (
            ml.link_analysis(., mode="aggressive").credphish.disposition == "phishing"
          )
          and length(ml.logo_detect(ml.link_analysis(., mode="aggressive").screenshot
                     ).brands
          ) > 0
        )
        or any(file.explode(ml.link_analysis(.).screenshot),
               (
                 any(ml.nlu_classifier(.scan.ocr.raw).intents,
                     .name == "cred_theft" and .confidence in ("medium", "high")
                 )
                 and (
                   length(ml.logo_detect(ml.link_analysis(..).screenshot).brands
                   ) > 0
                   and ml.link_analysis(..).credphish.disposition == "phishing"
                 )
               )
               and not ml.link_analysis(..).effective_url.domain.domain == "accounts.google.com"
               // standard Google Docs error
               and not strings.contains(.scan.ocr.raw,
                                        "encountered an error. Please try reloading this page"
               )
        )
)

Detection Logic

Scope: inbound message.

This rule detects legitimate Google Drive shares that link to files on Google Drive that host credential phishing content. The file is usually a PDF that impersonates a legitimate brand, with credential theft language, and a button or link to an external site that steals login credentials.

  1. inbound message
  2. sender.email.email in ('drive-shares-dm-noreply@google.com', 'drive-shares-noreply@google.com')
  3. not:
    • body.current_thread.text contains 'added you as an editor'
  4. any(filter(body.links, .href_url.domain.domain != "support.google.com" and .display_text == "Open" ), ( ( ml.link_analysis(., mode="aggressive").credphish.disposition == "phishing" ) and length(ml.logo_detect(ml.link_analysis(., mode="aggressive").screenshot ).brands ) > 0 ) or any(file.explode(ml.link_analysis(.).screenshot), ( any(ml.nlu_classifier(.scan.ocr.raw).intents, .name == "cred_theft" and .confidence in ("medium", "high") ) and ( length(ml.logo_detect(ml.link_analysis(..).screenshot).brands ) > 0 and ml.link_analysis(..).credphish.disposition == "phishing" ) ) and not ml.link_analysis(..).effective_url.domain.domain == "accounts.google.com" // standard Google Docs error and not strings.contains(.scan.ocr.raw, "encountered an error. Please try reloading this page" ) ) )

Inspects: body.current_thread.text, body.links, body.links[].display_text, body.links[].href_url.domain.domain, sender.email.email, type.inbound. Sensors: file.explode, ml.link_analysis, ml.logo_detect, ml.nlu_classifier, strings.contains.

Indicators Matched (6)

FieldMatchValue
sender.email.emailmemberdrive-shares-dm-noreply@google.com
sender.email.emailmemberdrive-shares-noreply@google.com
body.links[].display_textequalsOpen
ml.nlu_classifier(file.explode(...)[].scan.ocr.raw).intents[].nameequalscred_theft
ml.nlu_classifier(file.explode(...)[].scan.ocr.raw).intents[].confidencemembermedium
ml.nlu_classifier(file.explode(...)[].scan.ocr.raw).intents[].confidencememberhigh

Stages and Predicates

Stage 1: mql_rule

and
  not
    body.current_thread.text contains "added you as an editor"
  sender.email.email in ["drive-shares-dm-noreply@google.com", "drive-shares-noreply@google.com"]
  type.inbound eq "true"
   macro "any(filter(body.links,\n               .href_url.domain.domain != \"support.google.com\"\n               and .display_text == \"Open\"\n        ),\n        (\n          (\n            ml.link_analysis(., mode=\"aggressive\").credphish.disposition == \"phishing\"\n          )\n          and length(ml.logo_detect(ml.link_analysis(., mode=\"aggressive\").screenshot\n                     ).brands\n          ) > 0\n        )\n        or any(file.explode(ml.link_analysis(.).screenshot),\n               (\n                 any(ml.nlu_classifier(.scan.ocr.raw).intents,\n                     .name == \"cred_theft\" and .confidence in (\"medium\", \"high\")\n                 )\n                 and (\n                   length(ml.logo_detect(ml.link_analysis(..).screenshot).brands\n                   ) > 0\n                   and ml.link_analysis(..).credphish.disposition == \"phishing\"\n                 )\n               )\n               and not ml.link_analysis(..).effective_url.domain.domain == \"accounts.google.com\"\n               // standard Google Docs error\n               and not strings.contains(.scan.ocr.raw,\n                                        \"encountered an error. Please try reloading this page\"\n               )\n        )\n)"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
sender.email.emailin
  • drive-shares-dm-noreply@google.com corpus 5 (mql 5)
  • drive-shares-noreply@google.com corpus 5 (mql 5)
field:"sender.email.email" kind:in
type.inboundeq
  • true transforms: boolean corpus 1212 (mql 1212)
field:"type.inbound" kind:eq value:"true"

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
body.current_thread.textcontainsadded you as an editorexcludes:body.current_thread.text field:"body.current_thread.text" value:"added you as an editor"

Back to all Sublime MQL rules