Credential phishing: 'Secure message' and engaging language
Body contains language resembling credential theft, and a "secure message" from an untrusted sender.
Sublime rule (View on GitHub)
1name: "Credential phishing: 'Secure message' and engaging language"
2description: |
3 Body contains language resembling credential theft, and a "secure message" from an untrusted sender.
4type: "rule"
5severity: "medium"
6source: |
7 type.inbound
8 and (
9 (
10 any(ml.nlu_classifier(body.current_thread.text).intents,
11 .name == "cred_theft" and .confidence == "high"
12 )
13 or any(body.current_thread.links,
14 regex.icontains(.display_text, '(?:read|view|open) the message')
15 and (
16 .href_url.domain.root_domain not in $tranco_1m
17 or .href_url.domain.domain in $free_file_hosts
18 or .href_url.domain.root_domain in $free_file_hosts
19 or .href_url.domain.root_domain in $free_subdomain_hosts
20 or .href_url.domain.domain in $url_shorteners
21 or .href_url.domain.domain in $social_landing_hosts
22 )
23 )
24 )
25 or any(ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).intents,
26 .name == "cred_theft" and .confidence in ("medium", "high")
27 )
28 )
29 and (
30 (
31 regex.icontains(body.current_thread.text,
32 "secured? (message|directory|document|file)"
33 )
34 or regex.icontains(subject.base,
35 "secured? (message|directory|document|file)"
36 )
37 or strings.icontains(body.current_thread.text, "document portal")
38 or strings.icontains(body.current_thread.text, "encrypted message")
39 or strings.icontains(body.current_thread.text, "protected message")
40 )
41 or any(body.previous_threads,
42 regex.icontains(.text, "secured? (message|directory|document|file)")
43 or strings.icontains(.text, "document portal")
44 or strings.icontains(.text, "encrypted message")
45 or strings.icontains(.text, "protected message")
46 )
47 or any(body.current_thread.links,
48 regex.icontains(ml.link_analysis(.).final_dom.display_text,
49 'secured? (?:message|directory|document|file) access'
50 )
51 or regex.icontains(ml.link_analysis(.).final_dom.inner_text,
52 'secured? (?:message|directory|document|file) access'
53 )
54 )
55 or (
56 length(filter(ml.nlu_classifier(body.current_thread.text).entities,
57 .name == "urgency"
58 )
59 ) >= 2
60 and any(ml.nlu_classifier(body.current_thread.text).topics,
61 .name == "Secure Message" and .confidence != "low"
62 )
63 )
64 )
65 // has at least 1 link
66 and length(body.links) > 0
67
68 // negate legitimate message senders
69 and (
70 sender.email.domain.root_domain not in ("protectedtrust.com")
71 and any(body.links,
72 .href_url.domain.root_domain != sender.email.domain.root_domain
73 )
74 // negate known secure mailers
75 and not all(body.links,
76 .href_url.domain.root_domain in (
77 "mimecast.com",
78 "cisco.com",
79 "csiesafe.com"
80 )
81 )
82 and any(headers.hops,
83 .index == 0
84 and not any(.fields,
85 strings.contains(.value,
86 'multipart/mixed; boundary="PROOFPOINT_BOUNDARY_1"'
87 )
88 )
89 )
90 and not (
91 length(filter(attachments,
92 strings.ilike(.file_name,
93 "logo.*",
94 "lock.gif",
95 "SecureMessageAtt.html"
96 )
97 )
98 ) == 3
99 and any(attachments,
100 .file_type == "html"
101 and any(file.explode(.),
102 .scan.html.title == "Proofpoint Encryption"
103 and any(.scan.url.urls,
104 strings.iends_with(.path,
105 'formpostdir/safeformpost.aspx'
106 )
107 )
108 )
109 and strings.count(file.parse_html(.).raw, 'name="msg') > 3
110 )
111 )
112 and not (
113 any(headers.hops,
114 any(.fields,
115 .name in (
116 'X-ZixNet',
117 'X-VPM-MIV',
118 'X-VPM-ActionCode',
119 'X-VPM-SmtpTo'
120 )
121 )
122 )
123 and any(headers.domains,
124 .root_domain in (
125 "zixport.com",
126 "zixcorp.com",
127 "zixmail.net",
128 "zixworks.com"
129 )
130 )
131 )
132 and not (
133 any(headers.hops, any(.fields, .name == 'X-SendInc-Message-Id'))
134 and any(headers.domains, .root_domain in ("sendinc.net"))
135 )
136 // negating Mimecast sends with MS banner and/or sender's email pulled out as a link
137 and not length(filter(body.links,
138 (
139 .display_text is null
140 and .display_url.url == sender.email.domain.root_domain
141 )
142 or .href_url.domain.root_domain in (
143 "aka.ms",
144 "mimecast.com",
145 "cisco.com"
146 )
147 )
148 ) == length(body.links)
149 )
150 and (
151 (
152 profile.by_sender().prevalence in ("new", "outlier")
153 and not profile.by_sender().solicited
154 )
155 or (
156 profile.by_sender().any_messages_malicious_or_spam
157 and not profile.by_sender().any_messages_benign
158 )
159 // or the sender is all undisclosed or there are no recipients
160 or (
161 length(recipients.to) == 0
162 or all(recipients.to,
163 strings.ilike(.display_name, "undisclosed?recipients")
164 )
165 )
166 // or the sender exhibits a "self sender" pattern
167 or (
168 length(recipients.to) == 1
169 and any(recipients.to, .email.email == sender.email.email)
170 )
171 )
172 and not profile.by_sender().any_messages_benign
173 and not (
174 sender.email.domain.root_domain in $high_trust_sender_root_domains
175 and coalesce(headers.auth_summary.dmarc.pass, false)
176 )
177attack_types:
178 - "Credential Phishing"
179tactics_and_techniques:
180 - "Social engineering"
181detection_methods:
182 - "Natural Language Understanding"
183 - "Sender analysis"
184id: "bd95a7b1-dc96-53c1-bb7c-3a0f98b04744"