Brand impersonation: TikTok
Detects messages impersonating TikTok through similar display names or logo detection, combined with security-themed content and authentication failures. Excludes legitimate TikTok communications and trusted senders.
Sublime rule (View on GitHub)
1name: "Brand impersonation: TikTok"
2description: "Detects messages impersonating TikTok through similar display names or logo detection, combined with security-themed content and authentication failures. Excludes legitimate TikTok communications and trusted senders."
3type: "rule"
4severity: "medium"
5source: |
6 type.inbound
7 and (
8 // TikTok Brand Detection
9 (
10 // display name contains tiktok
11 strings.ilike(strings.replace_confusables(sender.display_name), '*tiktok*')
12 // levenshtein distance similar to tiktok
13 or strings.ilevenshtein(strings.replace_confusables(sender.display_name),
14 'tiktok'
15 ) <= 1
16 or (
17 length(ml.logo_detect(file.message_screenshot()).brands) == 1
18 and any(ml.logo_detect(file.message_screenshot()).brands,
19 .name == "TikTok" and .confidence == "high"
20 )
21 )
22 // hyphenated sender domain contains tiktok
23 or strings.iends_with(sender.email.domain.root_domain, "-tiktok.com")
24 )
25 // OR TikTok verification language
26 or (
27 strings.icontains(body.current_thread.text, "tiktok")
28 and (
29 strings.icontains(body.current_thread.text, "verified badge")
30 or strings.icontains(body.current_thread.text, "verification criteria")
31 or strings.icontains(body.current_thread.text, "activate badge")
32 or strings.icontains(body.current_thread.text, "verification complete")
33 or strings.icontains(body.current_thread.text, "almost verified")
34 or strings.icontains(body.current_thread.text, "review complete")
35 or strings.icontains(body.current_thread.text, "verify profile")
36 )
37 )
38 )
39 and (
40 // ML Topic Analysis and Credential Theft Detection
41 any(ml.nlu_classifier(body.current_thread.text).topics,
42 .name in (
43 "Security and Authentication",
44 "Secure Message",
45 "Reminders and Notifications"
46 )
47 and .confidence in ("medium", "high")
48 )
49 or (
50 beta.ocr(file.message_screenshot()).text != ""
51 and any(ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics,
52 .name in (
53 "Security and Authentication",
54 "Secure Message",
55 "Reminders and Notifications"
56 )
57 and .confidence in ("medium", "high")
58 )
59 )
60 or any(ml.nlu_classifier(body.current_thread.text).intents,
61 .name == "cred_theft" and .confidence == "high"
62 )
63 or any(ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).intents,
64 .name == "cred_theft" and .confidence == "high"
65 )
66 )
67 // Not from legitimate TikTok or Google domains with DMARC pass
68 and not (
69 sender.email.domain.root_domain in $org_domains
70 or (
71 sender.email.domain.root_domain in (
72 "tiktok.com",
73 "tiktokglobalshop.com",
74 "tiktokusds.com",
75 "bytedance.com",
76 "tiktokacademy.com",
77 "webassessor.com" // used for this https://ads.tiktok.com/business/en-US/academy/tiktok-certification
78 )
79 and headers.auth_summary.dmarc.pass
80 )
81 )
82 // negate iCloud Private Message Relay
83 and not (
84 sender.email.domain.domain == "privaterelay.appleid.com"
85 or any(headers.hops, any(.fields, .name == "X-ICLOUD-HME"))
86 )
87 // negate highly trusted sender domains unless they fail DMARC authentication
88 and (
89 (
90 sender.email.domain.root_domain in $high_trust_sender_root_domains
91 and not headers.auth_summary.dmarc.pass
92 )
93 or sender.email.domain.root_domain not in $high_trust_sender_root_domains
94 )
95 and not profile.by_sender().solicited
96
97attack_types:
98 - "Credential Phishing"
99tactics_and_techniques:
100 - "Impersonation: Brand"
101 - "Social engineering"
102detection_methods:
103 - "Computer Vision"
104 - "Content analysis"
105 - "Header analysis"
106 - "Natural Language Understanding"
107 - "Optical Character Recognition"
108 - "Sender analysis"
109id: "aaacc8b7-fbbd-596d-9268-d90b92bdfcd7"