Brand impersonation: Twitter

Impersonation of Twitter.

Sublime rule (View on GitHub)

 1name: "Brand impersonation: Twitter"
 2description: |
 3    Impersonation of Twitter.
 4references:
 5  - "https://www.techrepublic.com/article/phishing-attack-spoofs-twitter-to-steal-account-credentials/"
 6type: "rule"
 7severity: "medium"
 8source: |
 9  type.inbound
10  and (
11    // Twitter logic
12    (
13      sender.display_name =~ "twitter"
14      or strings.ilevenshtein(sender.display_name, 'twitter') <= 1
15      or strings.ilike(sender.email.domain.domain, '*twitter*')
16    )
17    // "X" logic
18    or (
19      (
20        3 of (
21          strings.iends_with(sender.email.domain.root_domain, "-x.com"),
22          any(body.links, strings.iends_with(.href_url.domain.root_domain, "-x.com")),
23          strings.ilike(body.current_thread.text,
24                        "*content dispute*",
25                        "*copyright*",
26                        "*appeal*"
27          ),
28          strings.contains(body.current_thread.text, '1355 Market Street'),
29          strings.contains(body.current_thread.text, 'San Francisco, CA 94103'),
30          strings.contains(body.current_thread.text, 'X Corp'),
31          strings.ilike(body.current_thread.text, '*865 FM 1209*bastrop*')
32        )
33        or (
34          length(ml.logo_detect(file.message_screenshot()).brands) == 1
35          and any(ml.logo_detect(file.message_screenshot()).brands,
36                  .name == "X" and .confidence == "high"
37          )
38          and (
39            any(ml.nlu_classifier(body.current_thread.text).intents,
40                .name == "cred_theft" and .confidence == "high"
41            )
42            or any(ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).intents,
43                   .name == "cred_theft" and .confidence == "high"
44            )
45          )
46        )
47      )
48      and any(beta.ml_topic(body.current_thread.text).topics,
49              .name in (
50                "Reminders and Notifications",
51                "Security and Authentication",
52                "Legal and Compliance",
53                "Customer Service and Support"
54              )
55      )
56    )
57  )
58  and sender.email.domain.domain not in~ (
59    'twitter.com',
60    'privaterelay.appleid.com',
61    'stripe.com',
62    'x.com',
63    'twitter.discoursemail.com',
64    'slack.com'
65  )
66  // negate Hearsay Systems which sends notifications from sender domain ending in twitter.com
67  and not (
68    strings.ends_with(sender.email.domain.domain, '.hearsay.twitter.com')
69    and strings.ends_with(headers.message_id, '@hearsaysystems.com>')
70  )
71  and sender.email.email not in $recipient_emails  
72
73attack_types:
74  - "Credential Phishing"
75tactics_and_techniques:
76  - "Impersonation: Brand"
77  - "Lookalike domain"
78  - "Social engineering"
79detection_methods:
80  - "Sender analysis"
81id: "013c32c2-fa05-5456-9c45-284e008ff6a4"
to-top