Detection rules › Sublime MQL

Brand impersonation: TikTok

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

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.

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 (
  // TikTok Brand Detection 
  (
    // display name contains tiktok
    strings.ilike(strings.replace_confusables(sender.display_name), '*tiktok*')
    // levenshtein distance similar to tiktok
    or strings.ilevenshtein(strings.replace_confusables(sender.display_name),
                            'tiktok'
    ) <= 1
    or (
      length(ml.logo_detect(file.message_screenshot()).brands) == 1
      and any(ml.logo_detect(file.message_screenshot()).brands,
              .name == "TikTok" and .confidence == "high"
      )
    )
    // hyphenated sender domain contains tiktok
    or strings.iends_with(sender.email.domain.root_domain, "-tiktok.com")
  )
  // OR TikTok verification language
  or (
    strings.icontains(body.current_thread.text, "tiktok")
    and (
      strings.icontains(body.current_thread.text, "verified badge")
      or strings.icontains(body.current_thread.text, "verification criteria")
      or strings.icontains(body.current_thread.text, "activate badge")
      or strings.icontains(body.current_thread.text, "verification complete")
      or strings.icontains(body.current_thread.text, "almost verified")
      or strings.icontains(body.current_thread.text, "review complete")
      or strings.icontains(body.current_thread.text, "verify profile")
    )
  )
)
and (
  // ML Topic Analysis and Credential Theft Detection
  any(ml.nlu_classifier(body.current_thread.text).topics,
      .name in (
        "Security and Authentication",
        "Secure Message",
        "Reminders and Notifications"
      )
      and .confidence in ("medium", "high")
  )
  or any(ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics,
         .name in (
           "Security and Authentication",
           "Secure Message",
           "Reminders and Notifications"
         )
         and .confidence in ("medium", "high")
         and beta.ocr(file.message_screenshot()).text != ""
  )
  or any(ml.nlu_classifier(body.current_thread.text).intents,
         .name == "cred_theft" and .confidence == "high"
  )
  or any(ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).intents,
         .name == "cred_theft" and .confidence == "high"
  )
)
// Not from legitimate TikTok or Google domains with DMARC pass
and not (
  sender.email.domain.root_domain in $org_domains
  or (
    sender.email.domain.root_domain in (
      "tiktok.com",
      "tiktokglobalshop.com",
      "tiktokusds.com",
      "bytedance.com",
      "tiktokacademy.com",
      "webassessor.com" // used for this https://ads.tiktok.com/business/en-US/academy/tiktok-certification
    )
    and headers.auth_summary.dmarc.pass
  )
)
// 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
)
and not profile.by_sender().solicited

Detection logic

Scope: inbound message.

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.

  1. inbound message
  2. any of:
    • any of:
      • strings.replace_confusables(sender.display_name) matches '*tiktok*'
      • strings.replace_confusables(sender.display_name) is similar to 'tiktok'
      • all of:
        • length(ml.logo_detect(file.message_screenshot()).brands) is 1
        • any of ml.logo_detect(file.message_screenshot()).brands where all hold:
          • .name is 'TikTok'
          • .confidence is 'high'
      • sender.email.domain.root_domain ends with '-tiktok.com'
    • all of:
      • body.current_thread.text contains 'tiktok'
      • body.current_thread.text contains any of 7 patterns
        • verified badge
        • verification criteria
        • activate badge
        • verification complete
        • almost verified
        • review complete
        • verify profile
  3. any of:
    • any of ml.nlu_classifier(body.current_thread.text).topics where all hold:
      • .name in ('Security and Authentication', 'Secure Message', 'Reminders and Notifications')
      • .confidence in ('medium', 'high')
    • any of ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics where all hold:
      • .name in ('Security and Authentication', 'Secure Message', 'Reminders and Notifications')
      • .confidence in ('medium', 'high')
      • beta.ocr(file.message_screenshot()).text is not ''
    • any of ml.nlu_classifier(body.current_thread.text).intents where all hold:
      • .name is 'cred_theft'
      • .confidence is 'high'
    • any of ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).intents where all hold:
      • .name is 'cred_theft'
      • .confidence is 'high'
  4. none of:
    • sender.email.domain.root_domain in $org_domains
    • all of:
      • sender.email.domain.root_domain in ('tiktok.com', 'tiktokglobalshop.com', 'tiktokusds.com', 'bytedance.com', 'tiktokacademy.com', 'webassessor.com')
      • headers.auth_summary.dmarc.pass
  5. none of:
    • sender.email.domain.domain is 'privaterelay.appleid.com'
    • any of headers.hops where:
      • any of .fields where:
        • .name is 'X-ICLOUD-HME'
  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
  7. not:
    • profile.by_sender().solicited

Inspects: body.current_thread.text, 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, type.inbound. Sensors: beta.ocr, file.message_screenshot, ml.logo_detect, ml.nlu_classifier, profile.by_sender, strings.icontains, strings.iends_with, strings.ilevenshtein, strings.ilike, strings.replace_confusables. Reference lists: $high_trust_sender_root_domains, $org_domains.

Indicators matched (35)

FieldMatchValue
strings.ilikesubstring*tiktok*
strings.ilevenshteinfuzzytiktok
ml.logo_detect(file.message_screenshot()).brands[].nameequalsTikTok
ml.logo_detect(file.message_screenshot()).brands[].confidenceequalshigh
strings.iends_withsuffix-tiktok.com
strings.icontainssubstringtiktok
strings.icontainssubstringverified badge
strings.icontainssubstringverification criteria
strings.icontainssubstringactivate badge
strings.icontainssubstringverification complete
strings.icontainssubstringalmost verified
strings.icontainssubstringreview complete
23 more
strings.icontainssubstringverify profile
ml.nlu_classifier(body.current_thread.text).topics[].namememberSecurity and Authentication
ml.nlu_classifier(body.current_thread.text).topics[].namememberSecure Message
ml.nlu_classifier(body.current_thread.text).topics[].namememberReminders and Notifications
ml.nlu_classifier(body.current_thread.text).topics[].confidencemembermedium
ml.nlu_classifier(body.current_thread.text).topics[].confidencememberhigh
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics[].namememberSecurity and Authentication
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics[].namememberSecure Message
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics[].namememberReminders and Notifications
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics[].confidencemembermedium
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics[].confidencememberhigh
ml.nlu_classifier(body.current_thread.text).intents[].nameequalscred_theft
ml.nlu_classifier(body.current_thread.text).intents[].confidenceequalshigh
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).intents[].nameequalscred_theft
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).intents[].confidenceequalshigh
sender.email.domain.root_domainmembertiktok.com
sender.email.domain.root_domainmembertiktokglobalshop.com
sender.email.domain.root_domainmembertiktokusds.com
sender.email.domain.root_domainmemberbytedance.com
sender.email.domain.root_domainmembertiktokacademy.com
sender.email.domain.root_domainmemberwebassessor.com
sender.email.domain.domainequalsprivaterelay.appleid.com
headers.hops[].fields[].nameequalsX-ICLOUD-HME