EXPLORE
← Back to Explore
sublimemediumRule

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.

MITRE ATT&CK

initial-access

Detection Query

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
)

Data Sources

Email MessagesEmail HeadersEmail Attachments

Platforms

email
Raw Content
name: "Business Email Compromise (BEC) attempt from untrusted sender"
description: |
  Detects potential Business Email Compromise (BEC) attacks by analyzing text within the email body from first-time senders.
type: "rule"
severity: "medium"
source: |
  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
  )
attack_types:
  - "BEC/Fraud"
tactics_and_techniques:
  - "Social engineering"
detection_methods:
  - "Content analysis"
  - "Header analysis"
  - "Natural Language Understanding"
  - "Sender analysis"
id: "96d4c35a-ca53-559e-9db3-349dbbdffc20"