1+ name : " Business Email Compromise (BEC) attempt from untrusted sender"
2+ description : |
3+ Detects potential Business Email Compromise (BEC) attacks by analyzing text within the email body from first-time senders.
4+ type : " rule"
5+ severity : " medium"
6+ source : |
7+ type.inbound
8+ and any(ml.nlu_classifier(body.current_thread.text).intents,
9+ .name in ("bec") and .confidence in ("high", "medium")
10+ )
11+ // negating legit replies
12+ and not (
13+ (
14+ (
15+ subject.is_reply
16+ or subject.is_forward
17+ // out of office auto-reply
18+ // the NLU model will handle these better natively soon
19+ or strings.istarts_with(subject.subject, "Automatic reply:")
20+ )
21+ and (length(headers.references) > 0 or headers.in_reply_to is not null)
22+ )
23+ or (
24+ // calendar invite responses
25+ regex.icontains(subject.base,
26+ '(?:Accepted|Declined|New Time Proposed|Tentative):'
27+ )
28+ and any(attachments, .content_type == "text/calendar")
29+ and profile.by_sender_email().solicited
30+ )
31+ )
32+ and (
33+ not profile.by_sender().solicited
34+ or (
35+ profile.by_sender().any_messages_malicious_or_spam
36+ and not profile.by_sender().any_messages_benign
37+ )
38+ )
39+
40+ // negate highly trusted sender domains unless they fail DMARC authentication
41+ and (
42+ (
43+ sender.email.domain.root_domain in $high_trust_sender_root_domains
44+ and not headers.auth_summary.dmarc.pass
45+ )
46+ or sender.email.domain.root_domain not in $high_trust_sender_root_domains
47+ )
48+ attack_types :
49+ - " BEC/Fraud"
50+ tactics_and_techniques :
51+ - " Social engineering"
52+ detection_methods :
53+ - " Content analysis"
54+ - " Header analysis"
55+ - " Natural Language Understanding"
56+ - " Sender analysis"
57+ id : " ae5408e2-38c1-5f11-ba4d-a7b6b7dcd0b1"
58+ og_id : " 96d4c35a-ca53-559e-9db3-349dbbdffc20"
59+ testing_pr : 4609
60+ testing_sha : b7067cbc24e6c5dd1ed3612f6c2f5a1cac9bac49
0 commit comments