Detection rules › Sublime MQL

Brand impersonation: Toronto-Dominion Bank

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

Impersonation of TD Bank or TD Canada Trust using display name spoofing or logo detection, combined with suspicious content related to security authentication or credential theft from unauthorized 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 (
  // display name contains TD Bank
  (
    strings.ilike(strings.replace_confusables(sender.display_name), '*TD Bank*')
    or strings.ilike(strings.replace_confusables(sender.display_name),
                     '*TD Canada Trust*'
    )
    // levenshtein distance similar to TD bank
    or strings.ilevenshtein(strings.replace_confusables(sender.display_name),
                            'TD Bank'
    ) <= 1
    or strings.ilevenshtein(strings.replace_confusables(sender.display_name),
                            'TD Canada Trust'
    ) <= 1
    or any(ml.logo_detect(file.message_screenshot()).brands,
           .name == "TD Bank" and .confidence == "high"
    )
    // TD Secure Email
    or any([subject.base, sender.display_name], strings.ilike(., "*TD?Secure*"))
  )
)
and (
  (
    any(ml.nlu_classifier(body.current_thread.text).topics,
        .name in (
          "Security and Authentication",
          "Secure Message",
          "Reminders and Notifications"
        )
        and .confidence in ("medium", "high")
    )
    and not any(ml.nlu_classifier(body.current_thread.text).topics,
                .name in ("Newsletters and Digests", "Entertainment and Sports")
                and .confidence in ("medium", "high")
    )
  )
  or (
    beta.ocr(file.message_screenshot()).text != ""
    and 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 not any(ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics,
                .name in ("Newsletters and Digests", "Entertainment and Sports")
                and .confidence in ("medium", "high")
    )
  )
  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"
  )
)

// and the sender is not in org_domains or from TD domains and passes auth
and not (
  sender.email.domain.root_domain in $org_domains
  or (
    sender.email.domain.root_domain in (
      "td.com",
      "tdbank.com",
      "tdcanadatrust.com",
      "tdameritrade.com",
      "tdwaterhouse.ca",
      "tdwaterhouse.com",
      "tdassetmanagement.com",
      "tdinsurance.com",
      "tdautofinance.com",
      "tdautofinance.ca",
      "email-td.com",
      "feedback-td.com",
      "interac.ca"
    )
    and headers.auth_summary.dmarc.pass
  )
)
// and the sender is not from high trust sender root domains
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
  or not headers.auth_summary.dmarc.pass
  or not headers.auth_summary.spf.pass
)

Detection logic

Scope: inbound message.

Impersonation of TD Bank or TD Canada Trust using display name spoofing or logo detection, combined with suspicious content related to security authentication or credential theft from unauthorized senders.

  1. inbound message
  2. any of:
    • strings.replace_confusables(sender.display_name) matches '*TD Bank*'
    • strings.replace_confusables(sender.display_name) matches '*TD Canada Trust*'
    • strings.replace_confusables(sender.display_name) is similar to 'TD Bank'
    • strings.replace_confusables(sender.display_name) is similar to 'TD Canada Trust'
    • any of ml.logo_detect(file.message_screenshot()).brands where all hold:
      • .name is 'TD Bank'
      • .confidence is 'high'
    • any of [subject.base, sender.display_name] where:
      • . matches '*TD?Secure*'
  3. any of:
    • all 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')
      • not:
        • any of ml.nlu_classifier(body.current_thread.text).topics where all hold:
          • .name in ('Newsletters and Digests', 'Entertainment and Sports')
          • .confidence in ('medium', 'high')
    • all of:
      • beta.ocr(file.message_screenshot()).text is not ''
      • 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')
      • not:
        • any of ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics where all hold:
          • .name in ('Newsletters and Digests', 'Entertainment and Sports')
          • .confidence in ('medium', 'high')
    • 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 ('td.com', 'tdbank.com', 'tdcanadatrust.com', 'tdameritrade.com', 'tdwaterhouse.ca', 'tdwaterhouse.com', 'tdassetmanagement.com', 'tdinsurance.com', 'tdautofinance.com', 'tdautofinance.ca', 'email-td.com', 'feedback-td.com', 'interac.ca')
      • headers.auth_summary.dmarc.pass
  5. 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
  6. any of:
    • not:
      • profile.by_sender().solicited
    • not:
      • headers.auth_summary.dmarc.pass
    • not:
      • headers.auth_summary.spf.pass

Inspects: body.current_thread.text, headers.auth_summary.dmarc.pass, headers.auth_summary.spf.pass, sender.display_name, sender.email.domain.root_domain, subject.base, type.inbound. Sensors: beta.ocr, file.message_screenshot, ml.logo_detect, ml.nlu_classifier, profile.by_sender, strings.ilevenshtein, strings.ilike, strings.replace_confusables. Reference lists: $high_trust_sender_root_domains, $org_domains.

Indicators matched (38)

FieldMatchValue
strings.ilikesubstring*TD Bank*
strings.ilikesubstring*TD Canada Trust*
strings.ilevenshteinfuzzyTD Bank
strings.ilevenshteinfuzzyTD Canada Trust
ml.logo_detect(file.message_screenshot()).brands[].nameequalsTD Bank
ml.logo_detect(file.message_screenshot()).brands[].confidenceequalshigh
strings.ilikesubstring*TD?Secure*
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
26 more
ml.nlu_classifier(body.current_thread.text).topics[].namememberNewsletters and Digests
ml.nlu_classifier(body.current_thread.text).topics[].namememberEntertainment and Sports
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(beta.ocr(file.message_screenshot()).text).topics[].namememberNewsletters and Digests
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics[].namememberEntertainment and Sports
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_domainmembertd.com
sender.email.domain.root_domainmembertdbank.com
sender.email.domain.root_domainmembertdcanadatrust.com
sender.email.domain.root_domainmembertdameritrade.com
sender.email.domain.root_domainmembertdwaterhouse.ca
sender.email.domain.root_domainmembertdwaterhouse.com
sender.email.domain.root_domainmembertdassetmanagement.com
sender.email.domain.root_domainmembertdinsurance.com
sender.email.domain.root_domainmembertdautofinance.com
sender.email.domain.root_domainmembertdautofinance.ca
sender.email.domain.root_domainmemberemail-td.com
sender.email.domain.root_domainmemberfeedback-td.com
sender.email.domain.root_domainmemberinterac.ca