Detection rules › Sublime MQL

Brand impersonation: Dropbox

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

Impersonation of Dropbox, a file sharing service.

Threat classification

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

CategoryValues
Attack typesCredential Phishing
Tactics and techniquesImpersonation: Brand, Social engineering

Event coverage

Rule body MQL

type.inbound
and (
  strings.ilike(sender.display_name, '*dropbox*')
  or strings.ilevenshtein(sender.display_name, 'dropbox') <= 1
  or strings.ilike(sender.email.domain.domain, '*dropbox*')
  or any(body.links,
         .display_url.domain.root_domain == "dropbox.com"
         and .mismatched
         and not .href_url.domain.root_domain in (
           "mimecast.com",
           "mimecastprotect.com"
         )
  )
  or regex.icontains(body.current_thread.text,
                     'invited you to view the file ".*" on Dropbox',
                     'dr[o0]pb[o0]x.{0,20}share.{0,20}f[i1|][i1|l]es?',
                     'dropbox sign (?:account|team)'
  )
  // dropbox style button
  or length(html.xpath(body.html,
                       "//a[contains(@style, 'background-color: #0070e0') and contains(@style, 'color: white') and contains(@style, 'width: 210px')  and contains(@style, 'max-width: 210px') and contains(@style, 'border-radius: 4px') and contains(@style, 'text-align: center') and contains(@style, 'font-size: 15px')]"
            ).nodes
  ) == 1
)
and sender.email.domain.root_domain not in~ (
  'dropbox.com',
  'dropboxforum.com',
  'dropboxsign.com'
)
and (
  any(attachments,
      .file_type in $file_types_images
      and any(file.explode(.), strings.ilike(.scan.ocr.raw, "*dropbox*"))
  )
  or any(body.links,
         (
           (
             strings.ilike(.display_text,
                           "*review*",
                           "*sign*",
                           "*view*",
                           "*completed document*",
                           "*open agreement*",
                           "*open document*",
                           "*open file*"
             )
             and not strings.ilike(.display_text, "*view this email in*")
           )
           or (
             .display_text is null
             and .href_url.domain.root_domain in $free_file_hosts
           )
         )
         and (
           .href_url.domain.root_domain != "dropbox.com"
           and any(ml.nlu_classifier(body.current_thread.text).intents,
                   .name == "cred_theft" and .confidence in ("medium", "high")
           )
         )
  )
  or (
    length(ml.logo_detect(file.message_screenshot()).brands) != 0
    and all(ml.logo_detect(file.message_screenshot()).brands,
            .name == "Dropbox"
    )
  )
)
and sender.email.email not in $recipient_emails

// negate dropbox fax (aka hellofax)
and not sender.email.domain.root_domain == 'hellofax.com'

// negate iCloud Private Message Relay
and not (
  sender.email.domain.domain == "privaterelay.appleid.com"
  or any(headers.hops, any(.fields, .name == "X-ICLOUD-HME"))
)

// 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
)

Detection logic

Scope: inbound message.

Impersonation of Dropbox, a file sharing service.

  1. inbound message
  2. any of:
    • sender.display_name matches '*dropbox*'
    • sender.display_name is similar to 'dropbox'
    • sender.email.domain.domain matches '*dropbox*'
    • any of body.links where all hold:
      • .display_url.domain.root_domain is 'dropbox.com'
      • .mismatched
      • not:
        • .href_url.domain.root_domain in ('mimecast.com', 'mimecastprotect.com')
    • body.current_thread.text matches any of 3 patterns
      • invited you to view the file ".*" on Dropbox
      • dr[o0]pb[o0]x.{0,20}share.{0,20}f[i1|][i1|l]es?
      • dropbox sign (?:account|team)
    • length(html.xpath(body.html, "//a[contains(@style, 'background-color: #0070e0') and contains(@style, 'color: white') and contains(@style, 'width: 210px') and contains(@style, 'max-width: 210px') and contains(@style, 'border-radius: 4px') and contains(@style, 'text-align: center') and contains(@style, 'font-size: 15px')]").nodes) is 1
  3. sender.email.domain.root_domain not in ('dropbox.com', 'dropboxforum.com', 'dropboxsign.com')
  4. any of:
    • any of attachments where all hold:
      • .file_type in $file_types_images
      • any of file.explode(.) where:
        • .scan.ocr.raw matches '*dropbox*'
    • any of body.links where all hold:
      • any of:
        • all of:
          • .display_text matches any of 7 patterns
            • *review*
            • *sign*
            • *view*
            • *completed document*
            • *open agreement*
            • *open document*
            • *open file*
          • not:
            • .display_text matches '*view this email in*'
        • all of:
          • .display_text is missing
          • .href_url.domain.root_domain in $free_file_hosts
      • all of:
        • .href_url.domain.root_domain is not 'dropbox.com'
        • any of ml.nlu_classifier(body.current_thread.text).intents where all hold:
          • .name is 'cred_theft'
          • .confidence in ('medium', 'high')
    • all of:
      • length(ml.logo_detect(file.message_screenshot()).brands) is not 0
      • all of ml.logo_detect(file.message_screenshot()).brands where:
        • .name is 'Dropbox'
  5. sender.email.email not in $recipient_emails
  6. not:
    • sender.email.domain.root_domain is 'hellofax.com'
  7. none of:
    • sender.email.domain.domain is 'privaterelay.appleid.com'
    • any of headers.hops where:
      • any of .fields where:
        • .name is 'X-ICLOUD-HME'
  8. 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

Inspects: attachments[].file_type, body.current_thread.text, body.html, body.links, body.links[].display_text, body.links[].display_url.domain.root_domain, body.links[].href_url.domain.root_domain, body.links[].mismatched, headers.auth_summary.dmarc.pass, headers.hops, headers.hops[].fields, headers.hops[].fields[].name, sender.display_name, sender.email.domain.domain, sender.email.domain.root_domain, sender.email.email, type.inbound. Sensors: file.explode, file.message_screenshot, html.xpath, ml.logo_detect, ml.nlu_classifier, regex.icontains, strings.ilevenshtein, strings.ilike. Reference lists: $file_types_images, $free_file_hosts, $high_trust_sender_root_domains, $recipient_emails.

Indicators matched (26)

FieldMatchValue
strings.ilikesubstring*dropbox*
strings.ilevenshteinfuzzydropbox
body.links[].display_url.domain.root_domainequalsdropbox.com
body.links[].href_url.domain.root_domainmembermimecast.com
body.links[].href_url.domain.root_domainmembermimecastprotect.com
regex.icontainsregexinvited you to view the file ".*" on Dropbox
regex.icontainsregexdr[o0]pb[o0]x.{0,20}share.{0,20}f[i1|][i1|l]es?
regex.icontainsregexdropbox sign (?:account|team)
sender.email.domain.root_domainmemberdropbox.com
sender.email.domain.root_domainmemberdropboxforum.com
sender.email.domain.root_domainmemberdropboxsign.com
strings.ilikesubstring*review*
14 more
strings.ilikesubstring*sign*
strings.ilikesubstring*view*
strings.ilikesubstring*completed document*
strings.ilikesubstring*open agreement*
strings.ilikesubstring*open document*
strings.ilikesubstring*open file*
strings.ilikesubstring*view this email in*
ml.nlu_classifier(body.current_thread.text).intents[].nameequalscred_theft
ml.nlu_classifier(body.current_thread.text).intents[].confidencemembermedium
ml.nlu_classifier(body.current_thread.text).intents[].confidencememberhigh
ml.logo_detect(file.message_screenshot()).brands[].nameequalsDropbox
sender.email.domain.root_domainequalshellofax.com
sender.email.domain.domainequalsprivaterelay.appleid.com
headers.hops[].fields[].nameequalsX-ICLOUD-HME