Brand Impersonation: PayPal

Impersonation of PayPal.

Sublime rule (View on GitHub)

  1name: "Brand Impersonation: PayPal"
  2description: |
  3    Impersonation of PayPal.
  4references:
  5  - "https://www.welivesecurity.com/2019/12/20/scam-wants-more-than-paypal-logins/"
  6type: "rule"
  7severity: "medium"
  8source: |
  9  type.inbound
 10  and (
 11    strings.replace_confusables(sender.display_name) =~ "paypal"
 12    or strings.ilevenshtein(strings.replace_confusables(sender.display_name),
 13                            'paypal'
 14    ) <= 1
 15    or strings.ilike(strings.replace_confusables(sender.display_name), '*paypal*')
 16    or strings.icontains(body.current_thread.text, "paypal billing team")
 17    or strings.icontains(body.current_thread.text, "paypal account services")
 18    or regex.icontains(body.current_thread.text, 'secure[-\._]?pay[-\._]?pal')
 19    or regex.icontains(body.current_thread.text,
 20                       '(?:pay[-\._\s]*pa[i1]\b|paypa[|!]|p@y\.?p@l)'
 21    )
 22    or any(attachments,
 23           (.file_type in $file_types_images or .file_type == "pdf")
 24           and any(ml.logo_detect(.).brands, .name == "PayPal")
 25           and any(file.explode(.),
 26                   // exclude images taken with mobile cameras and screenshots from android
 27                   not any(.scan.exiftool.fields,
 28                           .key == "Model"
 29                           or (
 30                             .key == "Software"
 31                             and strings.starts_with(.value, "Android")
 32                           )
 33                   )
 34                   // exclude images taken with mobile cameras and screenshots from Apple
 35                   and not any(.scan.exiftool.fields,
 36                               .key == "DeviceManufacturer"
 37                               and .value == "Apple Computer Inc."
 38                   )
 39                   and strings.ilike(.scan.ocr.raw, "*PayPal*")
 40                   and strings.ilike(.scan.ocr.raw,
 41                                     "*invoice*",
 42                                     "*transaction*",
 43                                     "*bitcoin*",
 44                                     "*dear customer*",
 45                                     "*suspicious activity*",
 46                                     "*contact support*",
 47                                     "*helpdesk*"
 48                   )
 49           )
 50    )
 51    or (
 52      any(ml.logo_detect(file.message_screenshot()).brands, .name == "PayPal")
 53      and strings.ilike(body.current_thread.text, "*PayPal*")
 54      and strings.ilike(body.current_thread.text,
 55                        "*invoice*",
 56                        "*transaction*",
 57                        "*bitcoin*",
 58                        "*dear customer*",
 59                        "*suspicious activity*",
 60                        "*contact support*",
 61                        "*helpdesk*"
 62      )
 63    )
 64  )
 65  and not any(ml.nlu_classifier(body.current_thread.text).topics,
 66              .name in~ (
 67                "Professional and Career Development",
 68                "Government Services"
 69              )
 70  )
 71  and sender.email.domain.root_domain not in (
 72    'google.com',
 73    'paypal-brandsfeedback.com',
 74    'paypal-creditsurvey.com',
 75    'paypal-customerfeedback.com',
 76    'paypal-experience.com',
 77    'paypal-prepaid.com',
 78    'paypal.at',
 79    'paypal.be',
 80    'paypal.ca',
 81    'paypal.ch',
 82    'paypal.co.il',
 83    'paypal.co.uk',
 84    'paypal.com',
 85    'paypal.com.au',
 86    'paypal.com.mx',
 87    'paypal.com.sg',
 88    'paypal.de',
 89    'paypal.dk',
 90    'paypal.es',
 91    'paypal.fr',
 92    'paypal.hk',
 93    'paypal.it',
 94    'paypal.nl',
 95    'paypal.pl',
 96    'paypal.se',
 97    'paypalcorp.com',
 98    'q4inc.com',
 99    'synchrony.com',
100    'synchronybank.com',
101    'synchronyfinancial.com',
102    'xoom.com',
103    'zettle.com'
104  )
105  // 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.
106  and sender.email.domain.domain not in~ ('paypal.co.br')
107  
108  // negate highly trusted sender domains unless they fail DMARC authentication
109  and (
110    (
111      sender.email.domain.root_domain in $high_trust_sender_root_domains
112      and not headers.auth_summary.dmarc.pass
113    )
114    or sender.email.domain.root_domain not in $high_trust_sender_root_domains
115  )  
116attack_types:
117  - "Credential Phishing"
118tactics_and_techniques:
119  - "Impersonation: Brand"
120  - "Lookalike domain"
121  - "Social engineering"
122detection_methods:
123  - "Computer Vision"
124  - "Content analysis"
125  - "File analysis"
126  - "Header analysis"
127  - "Sender analysis"
128id: "a6b2ceee-ea57-594d-8437-698fad55c9bf"
to-top