Medium Severity

Impersonation using recipient domain (untrusted sender)

Description

The recipient's domain is used in the sender's display name in order to impersonate the organization. The impersonation has been observed to use both the recipient's full email address, as well as just the domain.

References

No references.

Sublime Security
Created Aug 17th, 2023 • Last updated Sep 23rd, 2026
Source
type.inbound

// only 1 To: recipient
and length(recipients.to) + length(recipients.bcc) + length(recipients.cc) == 1

// custom domains only
and sender.email.domain.domain not in $free_email_providers
and any(recipients.to,
        // recipient's domain is in the sender's display name
        strings.icontains(sender.display_name, .email.domain.root_domain)
)
and not (
  (
    strings.contains(sender.display_name, "on behalf of")
    and sender.email.domain.root_domain == "microsoftonline.com"
  )
  or (
    strings.contains(sender.display_name, "via TransferXL")
    and sender.email.domain.root_domain == "transferxl.com"
  )
)
and all(recipients.to,
        .email.domain.root_domain != sender.email.domain.root_domain
)
and (
  profile.by_sender().prevalence in ("new", "outlier")
  or (
    profile.by_sender().any_messages_malicious_or_spam
    and not profile.by_sender().any_messages_benign
  )
)

// negate highly trusted sender domains unless they fail DMARC authentication
and not (
  sender.email.domain.root_domain in $high_trust_sender_root_domains
  and coalesce(headers.auth_summary.dmarc.pass, false)
)
MQL Rule Console
•Docs•Learning Labs

Playground

Test against your own EMLs or sample data.

Share

Post about this on your socials.

Get Started. Today.

Managed or self-managed. No MX changes.

Deploy and integrate a free Sublime instance in minutes.
Get Started