Brand impersonation: Microsoft
Impersonation of the Microsoft brand.
Sublime rule (View on GitHub)
1name: "Brand impersonation: Microsoft"
2description: |
3 Impersonation of the Microsoft brand.
4references:
5 - "https://www.itproportal.com/news/cybercriminals-launch-targeted-phishing-attacks-against-microsoft-365-users/"
6 - "https://cofense.com/blog/office-365-phishing-variant/"
7 - "https://www.helpnetsecurity.com/2020/05/04/fake-microsoft-teams-notification/"
8type: "rule"
9severity: "high"
10authors:
11 - twitter: "amitchell516"
12source: |
13 type.inbound
14 and (
15 length(body.links) < 30
16 or sender.email.local_part == "newsletter" and length(body.links) < 5
17 )
18 and (
19 (
20 strings.ilike(subject.subject, '*Microsoft 365*')
21 and strings.ilike(subject.subject, '*is expired*')
22 )
23 or (
24 // should catch any instance of the word "expired"
25 strings.ilike(body.current_thread.text, "*expir*")
26 and strings.ilike(body.current_thread.text, "*password*")
27 and strings.ilike(body.current_thread.text, "*microsoft*")
28 )
29 or regex.icontains(body.current_thread.text,
30 ".*reach you.{0,20}Microsoft Teams",
31 "microsoft account\n2fa"
32 )
33 or strings.icontains(body.current_thread.text, "microsoft account team")
34 or strings.ilike(sender.display_name, '*new activity in Teams*')
35 or strings.icontains(strings.replace_confusables(sender.display_name),
36 'microsoft advertising support'
37 )
38 or subject.subject =~ 'Offline Message in Teams'
39 or strings.ilike(subject.subject, '*Teams Sent A Message')
40 or sender.display_name in~ (
41 'Microsoft Partner Network',
42 'Microsoft Advertising',
43 'Microsoft',
44 'Microsoft Feedback',
45 'Microsoft account team',
46 'Microsoft Support',
47 'Microsoft 365 Message center',
48 'Microsoft Azure'
49 )
50 or regex.icontains(sender.display_name,
51 "[MḾṀṂⱮМḿṁṃᵯⱮ𝐌𝑀][iíìîïīĭĩįıɪɨᵢⁱ𝐢𝑖][cćĉċčçƈȼ𝐜𝑐][rŕŗřȑȓɾᵣⁿʳ𝐫𝑟][oóòôõöøōŏőɵₒᵒº𝐨𝑜][sśŝšșşʂᵴˢˢ𝐬𝑠][oóòôõöøōŏőɵₒᵒº𝐨𝑜][fḟƒᵮᶠ𝐟𝑓][tťțţᵵₜᵗᵗ𝐭𝑡]"
52 )
53 or regex.icontains(sender.display_name,
54 "[MḾṀṂⱮМḿṁṃᵯⱮ𝐌𝑀][iíìîïīĭĩįıɪɨᵢⁱ𝐢𝑖][rŕŗřȑȓɾᵣⁿʳ𝐫𝑟][cćĉċčçƈȼ𝐜𝑐][oóòôõöøōŏőɵₒᵒº𝐨𝑜][sśŝšșşʂᵴˢˢ𝐬𝑠][oóòôõöøōŏőɵₒᵒº𝐨𝑜][fḟƒᵮᶠ𝐟𝑓][tťțţᵵₜᵗᵗ𝐭𝑡]" // [sic]
55 )
56 or any(attachments,
57 .file_extension == "pdf"
58 and beta.parse_exif(.).page_count == 1
59 and any(ml.logo_detect(.).brands, .name == "Microsoft")
60 and any(file.explode(.),
61 regex.icontains(.scan.ocr.raw, '[©@]\s*(?:\d+)?\s*Microsoft')
62 )
63 )
64 )
65 and not (
66 sender.email.domain.root_domain in~ (
67 'microsoft.com',
68 'microsoftstoreemail.com',
69 'microsoftsupport.com',
70 'office.com',
71 'teams-events.com',
72 'qualtrics-research.com',
73 'skype.com',
74 'azureadnotifications.us',
75 'microsoftonline.us',
76 'mail.microsoft',
77 'office365.com',
78 'microsoftadvertising.com'
79 )
80 and headers.auth_summary.dmarc.pass
81 )
82 and not (
83 sender.email.domain.domain in~ (
84 'microsoft.regsvc.com',
85 'microsoft.onmicrosoft.com'
86 )
87 and headers.auth_summary.dmarc.pass
88 )
89 and (
90 profile.by_sender().prevalence in ("new", "outlier")
91 or (
92 profile.by_sender().any_messages_malicious_or_spam
93 and not profile.by_sender().any_messages_benign
94 )
95 )
96
97 // negate legitimate Office 365 bouncebacks
98 and not (
99 all(attachments,
100 .content_type in ("message/delivery-status", "message/rfc822")
101 )
102 and (
103 sender.email.local_part in ('postmaster', 'mailer-daemon')
104 or strings.starts_with(sender.email.local_part, 'microsoftexchange')
105 )
106 and (
107 strings.contains(subject.subject, 'Undeliverable:')
108 or strings.contains(subject.subject, 'Blocked:')
109 or strings.contains(subject.subject, 'Não é possível entregar:')
110 or strings.contains(subject.subject, 'Nie można dostarczyć:')
111 or strings.contains(subject.subject, 'Non remis :')
112 or strings.contains(subject.subject, 'Teslim edilmez:')
113 or strings.contains(subject.subject, 'No se puede entregar:')
114 )
115 )
116
117 // negate other legitimate MS notifications
118 and not (
119 length(body.links) > 0
120 and (
121 (
122 all(body.links,
123 .href_url.domain.root_domain in (
124 "aka.ms",
125 "microsoftonline.com",
126 "microsoft.com"
127 )
128 or .href_url.domain.tld == "microsoft"
129 )
130 and headers.auth_summary.dmarc.pass
131 )
132
133 // microsoft b2b applications invitations - no auth checks
134 or (
135 sender.email.local_part == "invites"
136 and sender.email.domain.root_domain == "onmicrosoft.com"
137 // infra validated message id
138 and strings.icontains(headers.message_id, "pepf")
139 )
140 )
141 )
142
143 // negate highly trusted sender domains unless they fail DMARC authentication
144 and not (
145 sender.email.domain.root_domain in $high_trust_sender_root_domains
146 and coalesce(headers.auth_summary.dmarc.pass, false)
147 )
148 // not a newsletter or advertisement
149 and not (
150 any(ml.nlu_classifier(body.current_thread.text).topics,
151 .name in ("Newsletters and Digests") and .confidence == "high"
152 )
153 and (
154 any(body.links,
155 strings.icontains(.display_text, "unsubscribe")
156 and (strings.icontains(.href_url.path, "unsubscribe"))
157 )
158 )
159 )
160
161attack_types:
162 - "Credential Phishing"
163tactics_and_techniques:
164 - "Impersonation: Brand"
165 - "Social engineering"
166detection_methods:
167 - "Content analysis"
168 - "Sender analysis"
169id: "6e2f04e6-b607-5e36-9015-d39c98265579"