Detection rules › Sublime MQL

Brand Impersonation: PayPal

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

Impersonation of PayPal.

Threat classification

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

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

Event coverage

Rule body MQL

type.inbound
and (
  strings.replace_confusables(sender.display_name) =~ "paypal"
  or strings.ilevenshtein(strings.replace_confusables(sender.display_name),
                          'paypal'
  ) <= 1
  or strings.ilike(strings.replace_confusables(sender.display_name), '*paypal*')
  or strings.icontains(body.current_thread.text, "paypal billing team")
  or strings.icontains(body.current_thread.text, "paypal account services")
  or regex.icontains(body.current_thread.text, 'secure[-\._]?pay[-\._]?pal')
  or regex.icontains(body.current_thread.text,
                     '(?:paypa[i1]\b|paypa[|!]|p@y\.?p@l)'
  )
  or any(attachments,
         (.file_type in $file_types_images or .file_type == "pdf")
         and any(ml.logo_detect(.).brands, .name == "PayPal")
         and any(file.explode(.),
                 // exclude images taken with mobile cameras and screenshots from android
                 not any(.scan.exiftool.fields,
                         .key == "Model"
                         or (
                           .key == "Software"
                           and strings.starts_with(.value, "Android")
                         )
                 )
                 // exclude images taken with mobile cameras and screenshots from Apple
                 and not any(.scan.exiftool.fields,
                             .key == "DeviceManufacturer"
                             and .value == "Apple Computer Inc."
                 )
                 and strings.ilike(.scan.ocr.raw, "*PayPal*")
                 and strings.ilike(.scan.ocr.raw,
                                   "*invoice*",
                                   "*transaction*",
                                   "*bitcoin*",
                                   "*dear customer*",
                                   "*suspicious activity*"
                 )
         )
  )
  or (
    any(ml.logo_detect(file.message_screenshot()).brands, .name == "PayPal")
    and strings.ilike(body.current_thread.text, "*PayPal*")
    and strings.ilike(body.current_thread.text,
                      "*invoice*",
                      "*transaction*",
                      "*bitcoin*",
                      "*dear customer*",
                      "*suspicious activity*"
    )
  )
)
and not any(ml.nlu_classifier(body.current_thread.text).topics,
            .name in~ (
              "Professional and Career Development",
              "Government Services"
            )
)
and sender.email.domain.root_domain not in (
  'google.com',
  'paypal-brandsfeedback.com',
  'paypal-creditsurvey.com',
  'paypal-customerfeedback.com',
  'paypal-experience.com',
  'paypal-prepaid.com',
  'paypal.at',
  'paypal.be',
  'paypal.ca',
  'paypal.ch',
  'paypal.co.il',
  'paypal.co.uk',
  'paypal.com',
  'paypal.com.au',
  'paypal.com.mx',
  'paypal.com.sg',
  'paypal.de',
  'paypal.dk',
  'paypal.es',
  'paypal.fr',
  'paypal.hk',
  'paypal.it',
  'paypal.nl',
  'paypal.pl',
  'paypal.se',
  'paypalcorp.com',
  'q4inc.com',
  'synchrony.com',
  'synchronybank.com',
  'synchronyfinancial.com',
  'xoom.com',
  'zettle.com'
)
// negate paypal.co.br explicitly, this cannot be part of the root_domain set above as it uses the PSL (Public suffix list) for parsing and co.br is not a recognized public suffix.
and sender.email.domain.domain not in~ ('paypal.co.br')

// 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 PayPal.

  1. inbound message
  2. any of:
    • strings.replace_confusables(sender.display_name) is 'paypal'
    • strings.replace_confusables(sender.display_name) is similar to 'paypal'
    • strings.replace_confusables(sender.display_name) matches '*paypal*'
    • body.current_thread.text contains 'paypal billing team'
    • body.current_thread.text contains 'paypal account services'
    • body.current_thread.text matches 'secure[-\\._]?pay[-\\._]?pal'
    • body.current_thread.text matches '(?:paypa[i1]\\b|paypa[|!]|p@y\\.?p@l)'
    • any of attachments where all hold:
      • any of:
        • .file_type in $file_types_images
        • .file_type is 'pdf'
      • any of ml.logo_detect(.).brands where:
        • .name is 'PayPal'
      • any of file.explode(.) where all hold:
        • not:
          • any of .scan.exiftool.fields where any holds:
            • .key is 'Model'
            • all of:
              • .key is 'Software'
              • .value starts with 'Android'
        • not:
          • any of .scan.exiftool.fields where all hold:
            • .key is 'DeviceManufacturer'
            • .value is 'Apple Computer Inc.'
        • .scan.ocr.raw matches '*PayPal*'
        • .scan.ocr.raw matches any of 5 patterns
          • *invoice*
          • *transaction*
          • *bitcoin*
          • *dear customer*
          • *suspicious activity*
    • all of:
      • any of ml.logo_detect(file.message_screenshot()).brands where:
        • .name is 'PayPal'
      • body.current_thread.text matches '*PayPal*'
      • body.current_thread.text matches any of 5 patterns
        • *invoice*
        • *transaction*
        • *bitcoin*
        • *dear customer*
        • *suspicious activity*
  3. not:
    • any of ml.nlu_classifier(body.current_thread.text).topics where:
      • .name in ('Professional and Career Development', 'Government Services')
  4. sender.email.domain.root_domain not in ('google.com', 'paypal-brandsfeedback.com', 'paypal-creditsurvey.com', 'paypal-customerfeedback.com', 'paypal-experience.com', 'paypal-prepaid.com', 'paypal.at', 'paypal.be', 'paypal.ca', 'paypal.ch', 'paypal.co.il', 'paypal.co.uk', 'paypal.com', 'paypal.com.au', 'paypal.com.mx', 'paypal.com.sg', 'paypal.de', 'paypal.dk', 'paypal.es', 'paypal.fr', 'paypal.hk', 'paypal.it', 'paypal.nl', 'paypal.pl', 'paypal.se', 'paypalcorp.com', 'q4inc.com', 'synchrony.com', 'synchronybank.com', 'synchronyfinancial.com', 'xoom.com', 'zettle.com')
  5. sender.email.domain.domain not in ('paypal.co.br')
  6. 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, headers.auth_summary.dmarc.pass, sender.display_name, sender.email.domain.domain, sender.email.domain.root_domain, type.inbound. Sensors: file.explode, file.message_screenshot, ml.logo_detect, ml.nlu_classifier, regex.icontains, strings.icontains, strings.ilevenshtein, strings.ilike, strings.replace_confusables, strings.starts_with. Reference lists: $file_types_images, $high_trust_sender_root_domains.

Indicators matched (55)

FieldMatchValue
strings.ilevenshteinfuzzypaypal
strings.ilikesubstring*paypal*
strings.icontainssubstringpaypal billing team
strings.icontainssubstringpaypal account services
regex.icontainsregexsecure[-\._]?pay[-\._]?pal
regex.icontainsregex(?:paypa[i1]\b|paypa[|!]|p@y\.?p@l)
attachments[].file_typeequalspdf
ml.logo_detect(attachments[]).brands[].nameequalsPayPal
file.explode(attachments[])[].scan.exiftool.fields[].keyequalsModel
file.explode(attachments[])[].scan.exiftool.fields[].keyequalsSoftware
strings.starts_withprefixAndroid
file.explode(attachments[])[].scan.exiftool.fields[].keyequalsDeviceManufacturer
43 more
file.explode(attachments[])[].scan.exiftool.fields[].valueequalsApple Computer Inc.
strings.ilikesubstring*PayPal*
strings.ilikesubstring*invoice*
strings.ilikesubstring*transaction*
strings.ilikesubstring*bitcoin*
strings.ilikesubstring*dear customer*
strings.ilikesubstring*suspicious activity*
ml.logo_detect(file.message_screenshot()).brands[].nameequalsPayPal
ml.nlu_classifier(body.current_thread.text).topics[].namememberProfessional and Career Development
ml.nlu_classifier(body.current_thread.text).topics[].namememberGovernment Services
sender.email.domain.root_domainmembergoogle.com
sender.email.domain.root_domainmemberpaypal-brandsfeedback.com
sender.email.domain.root_domainmemberpaypal-creditsurvey.com
sender.email.domain.root_domainmemberpaypal-customerfeedback.com
sender.email.domain.root_domainmemberpaypal-experience.com
sender.email.domain.root_domainmemberpaypal-prepaid.com
sender.email.domain.root_domainmemberpaypal.at
sender.email.domain.root_domainmemberpaypal.be
sender.email.domain.root_domainmemberpaypal.ca
sender.email.domain.root_domainmemberpaypal.ch
sender.email.domain.root_domainmemberpaypal.co.il
sender.email.domain.root_domainmemberpaypal.co.uk
sender.email.domain.root_domainmemberpaypal.com
sender.email.domain.root_domainmemberpaypal.com.au
sender.email.domain.root_domainmemberpaypal.com.mx
sender.email.domain.root_domainmemberpaypal.com.sg
sender.email.domain.root_domainmemberpaypal.de
sender.email.domain.root_domainmemberpaypal.dk
sender.email.domain.root_domainmemberpaypal.es
sender.email.domain.root_domainmemberpaypal.fr
sender.email.domain.root_domainmemberpaypal.hk
sender.email.domain.root_domainmemberpaypal.it
sender.email.domain.root_domainmemberpaypal.nl
sender.email.domain.root_domainmemberpaypal.pl
sender.email.domain.root_domainmemberpaypal.se
sender.email.domain.root_domainmemberpaypalcorp.com
sender.email.domain.root_domainmemberq4inc.com
sender.email.domain.root_domainmembersynchrony.com
sender.email.domain.root_domainmembersynchronybank.com
sender.email.domain.root_domainmembersynchronyfinancial.com
sender.email.domain.root_domainmemberxoom.com
sender.email.domain.root_domainmemberzettle.com
sender.email.domain.domainmemberpaypal.co.br