Brand impersonation: Microsoft with embedded logo and credential theft language

This rule detects messages impersonating Microsoft via a logo and contains credential theft language. From a new and unsolicited sender.

Sublime rule (View on GitHub)

 1name: "Brand impersonation: Microsoft with embedded logo and credential theft language"
 2description: "This rule detects messages impersonating Microsoft via a logo and contains credential theft language. From a new and unsolicited sender."
 3type: "rule"
 4severity: "high"
 5source: |
 6  type.inbound
 7  and length(attachments) == 0
 8  and any(ml.logo_detect(beta.message_screenshot()).brands, 
 9      strings.starts_with(.name, "Microsoft")
10  )
11  and any(ml.nlu_classifier(body.current_thread.text).intents, 
12      .name == "cred_theft" and .confidence in ("medium", "high")
13  )
14  and (
15    not any(headers.hops,
16            .authentication_results.compauth.verdict is not null
17            and .authentication_results.compauth.verdict == "pass"
18            and sender.email.domain.domain in (
19              "microsoft.com",
20              "sharepointonline.com"
21            )
22    )
23  )
24  and (
25    (
26        not profile.by_sender().solicited
27    )
28    or (
29      profile.by_sender().any_messages_malicious_or_spam
30      and not profile.by_sender().any_false_positives
31    )
32  )
33  
34  // negate highly trusted sender domains unless they fail DMARC authentication
35  and (
36    (
37      sender.email.domain.root_domain in $high_trust_sender_root_domains
38      and (
39        any(distinct(headers.hops, .authentication_results.dmarc is not null),
40            strings.ilike(.authentication_results.dmarc, "*fail")
41        )
42      )
43    )
44    or sender.email.domain.root_domain not in $high_trust_sender_root_domains
45  )
46  
47  and not profile.by_sender().any_false_positives  
48attack_types:
49  - "Credential Phishing"
50tactics_and_techniques:
51  - "Impersonation: Brand"
52  - "Social engineering"
53detection_methods:
54  - "Computer Vision"
55  - "Natural Language Understanding"
56  - "Sender analysis"
57id: "3ee9ef3d-8ec4-5df0-a8a2-5c6d037eb17a"
to-top