Sublime Security medium experimental mql

Business Email Compromise (BEC) attempt from untrusted sender

Detects potential Business Email Compromise (BEC) attacks by analyzing text within the email body from first-time senders.

View Source

Detection Logic

type.inbound
and any(ml.nlu_classifier(body.current_thread.text).intents,
        .name in ("bec") and .confidence == "high"
)
// negating legit replies
and not (
  (
    (
      subject.is_reply
      or subject.is_forward
      // out of office auto-reply
      // the NLU model will handle these better natively soon
      or strings.istarts_with(subject.subject, "Automatic reply:")
    )
    and (length(headers.references) > 0 or headers.in_reply_to is not null)
  )
  or (
    // calendar invite responses
    regex.icontains(subject.base,
                    '(?:Accepted
| Declined
| New Time Proposed
| Tentative):'
    )
    and any(attachments, .content_type == "text/calendar")
    and profile.by_sender_email().solicited
  )
)
and (
  not profile.by_sender().solicited
  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 (
  (
    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
)

Field Validations

Loading…

Comments (0)

Loading comments...