Detection rules › Sublime MQL

BEC with unusual reply-to or return-path mismatch

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

Detects an unusual header mismatch where the sender is not a freemail address, but the reply-to or return-path are. NLU also detects a BEC intent with medium or high confidence.

Threat classification

Sublime's own taxonomy (not MITRE ATT&CK).

CategoryValues
Attack typesBEC/Fraud
Tactics and techniquesEvasion, Free email provider, Social engineering

Event coverage

Rule body MQL

type.inbound
and any(ml.nlu_classifier(body.current_thread.text).intents,
        .name in ("bec", "advance_fee") and .confidence == "high"
)
and (
  headers.return_path.domain.root_domain in $free_email_providers
  or (
    length(headers.reply_to) > 0
    and all(headers.reply_to,
            .email.domain.root_domain in $free_email_providers
    )
  )
)
and (
  (
    sender.email.domain.root_domain == "paypal.com"
    and (
      not headers.auth_summary.dmarc.pass
      or headers.auth_summary.dmarc.pass is null
    )
  )
  or sender.email.domain.root_domain is null
  or sender.email.domain.root_domain != "paypal.com"
)
and sender.email.domain.root_domain not in $free_email_providers

// negate gmail autoforwards and null return paths
and (
  headers.return_path.email is null
  or not strings.ilike(headers.return_path.local_part, "*+caf_=*")
)

// negate listservs
and not (
  any(headers.hops, any(.fields, .name == "List-Unsubscribe"))
  and strings.contains(sender.display_name, "via")
)

// negate legit replies
and not (length(headers.references) > 0 or headers.in_reply_to is not null)

// legitimate quickbooks from known sender
and not (
  sender.email.email == "quickbooks@notification.intuit.com"
  and headers.auth_summary.spf.pass
  and beta.profile.by_reply_to().prevalence in (
    "outlier",
    "uncommon",
    "rare",
    "common"
  )
)

Detection logic

Scope: inbound message.

Detects an unusual header mismatch where the sender is not a freemail address, but the reply-to or return-path are. NLU also detects a BEC intent with medium or high confidence.

  1. inbound message
  2. any of ml.nlu_classifier(body.current_thread.text).intents where all hold:
    • .name in ('bec', 'advance_fee')
    • .confidence is 'high'
  3. any of:
    • headers.return_path.domain.root_domain in $free_email_providers
    • all of:
      • length(headers.reply_to) > 0
      • all of headers.reply_to where:
        • .email.domain.root_domain in $free_email_providers
  4. any of:
    • all of:
      • sender.email.domain.root_domain is 'paypal.com'
      • any of:
        • not:
          • headers.auth_summary.dmarc.pass
        • headers.auth_summary.dmarc.pass is missing
    • sender.email.domain.root_domain is missing
    • sender.email.domain.root_domain is not 'paypal.com'
  5. sender.email.domain.root_domain not in $free_email_providers
  6. any of:
    • headers.return_path.email is missing
    • not:
      • headers.return_path.local_part matches '*+caf_=*'
  7. not:
    • all of:
      • any of headers.hops where:
        • any of .fields where:
          • .name is 'List-Unsubscribe'
      • sender.display_name contains 'via'
  8. none of:
    • length(headers.references) > 0
    • headers.in_reply_to is set
  9. not:
    • all of:
      • sender.email.email is 'quickbooks@notification.intuit.com'
      • headers.auth_summary.spf.pass
      • beta.profile.by_reply_to().prevalence in ('outlier', 'uncommon', 'rare', 'common')

Inspects: body.current_thread.text, headers.auth_summary.dmarc.pass, headers.auth_summary.spf.pass, headers.hops, headers.hops[].fields, headers.hops[].fields[].name, headers.in_reply_to, headers.references, headers.reply_to, headers.reply_to[].email.domain.root_domain, headers.return_path.domain.root_domain, headers.return_path.email, headers.return_path.local_part, sender.display_name, sender.email.domain.root_domain, sender.email.email, type.inbound. Sensors: beta.profile.by_reply_to, ml.nlu_classifier, strings.contains, strings.ilike. Reference lists: $free_email_providers.

Indicators matched (8)

FieldMatchValue
ml.nlu_classifier(body.current_thread.text).intents[].namememberbec
ml.nlu_classifier(body.current_thread.text).intents[].namememberadvance_fee
ml.nlu_classifier(body.current_thread.text).intents[].confidenceequalshigh
sender.email.domain.root_domainequalspaypal.com
strings.ilikesubstring*+caf_=*
headers.hops[].fields[].nameequalsList-Unsubscribe
strings.containssubstringvia
sender.email.emailequalsquickbooks@notification.intuit.com