Salesforce Infrastructure Abuse
Identifies messages that resemble credential theft, originating from Salesforce. Salesforce infrastrcture abuse has been observed recently to send phishing attacks.
Sublime rule (View on GitHub)
1name: "Salesforce Infrastructure Abuse"
2description: "Identifies messages that resemble credential theft, originating from Salesforce. Salesforce infrastrcture abuse has been observed recently to send phishing attacks."
3type: "rule"
4severity: "medium"
5source: |
6 type.inbound
7
8 // we look at the return-path because many times in the abuse
9 // we've seen, the From is a custom domain
10 and headers.return_path.domain.root_domain == "salesforce.com"
11 and length(attachments) == 0
12 // theare are external links (not org or SF domains)
13 and length(filter(body.links,
14 .href_url.domain.domain not in $org_domains
15 and .href_url.domain.root_domain not in (
16 "salesforce.com",
17 "force.com",
18 "site.com" // salesforce CRM
19 )
20 )
21 ) > 0
22 and (
23 any(ml.nlu_classifier(body.current_thread.text).intents,
24 .name == "cred_theft" and .confidence == "high"
25 )
26 // subject match when cred_theft doesn't match
27 // high confidence observed subject intros in the format of "Urgent Thing: ..."
28 or regex.icontains(subject.subject,
29 '^(?:(?:Final|Last)?\s*Warning|(?:Final|Last|Legal|Critical|Content Violation)?\s*(?:Alert|Noti(?:ce|fication))|Appeal Required|Time.Sensitive|Critical.Alert|Important|Copyright Issue)\s*:\s*'
30 )
31 or any(ml.logo_detect(beta.message_screenshot()).brands,
32 .name in ("Facebook", "Meta", "Instagram") and .confidence in ("medium", "high")
33 )
34 // any of the links are for newly registered domains
35 or any(filter(body.links,
36 .href_url.domain.domain not in $org_domains
37 and .href_url.domain.root_domain not in (
38 "salesforce.com",
39 "force.com",
40 "site.com" // salesforce CRM
41 )
42 ), network.whois(.href_url.domain).days_old < 30
43 )
44 )
45 and 1 of (
46 ( // sender domain matches no body domains
47 length(body.links) > 0
48 and all(body.links,
49 (
50 .href_url.domain.root_domain != sender.email.domain.root_domain
51 and .href_url.domain.root_domain not in (
52 "salesforce.com",
53 "force.com",
54 "site.com"
55 )
56 )
57 or .href_url.domain.root_domain is null
58 )
59 ),
60 any(recipients.to,
61 .email.domain.valid
62 and any(body.links,
63 strings.icontains(.href_url.url, ..email.email)
64 or any(beta.scan_base64(.href_url.url,
65 format="url",
66 ignore_padding=true
67 ),
68 strings.icontains(., ...email.email)
69 )
70 or any(beta.scan_base64(.href_url.fragment, ignore_padding=true),
71 strings.icontains(., ...email.email)
72 )
73 // cloudflare turnstile or phishing warning page
74 or strings.icontains(ml.link_analysis(., mode="aggressive").final_dom.display_text,
75 "cloudflare"
76 )
77 )
78 ),
79 regex.icontains(subject.subject,
80 "termination.*notice",
81 "38417",
82 ":completed",
83 "[il1]{2}mit.*ma[il1]{2} ?bo?x",
84 "[il][il][il]egai[ -]",
85 "[li][li][li]ega[li] attempt",
86 "[ng]-?[io]n .*block",
87 "[ng]-?[io]n .*cancel",
88 "[ng]-?[io]n .*deactiv",
89 "[ng]-?[io]n .*disabl",
90 "action.*required",
91 "abandon.*package",
92 "about.your.account",
93 "acc(ou)?n?t (is )?on ho[li]d",
94 "acc(ou)?n?t.*terminat",
95 "acc(oun)?t.*[il1]{2}mitation",
96 "access.*limitation",
97 "account (will be )?block",
98 "account.*de-?activat",
99 "account.*locked",
100 "account.*restrict",
101 "account.*re-verification",
102 "account.*security",
103 "account.*suspension",
104 "account.has.been",
105 "account.has.expired",
106 "account.will.be.blocked",
107 "account v[il]o[li]at",
108 "activity.*acc(oun)?t",
109 "almost.full",
110 "app[li]e.[il]d",
111 "appeal required",
112 "authenticate.*account",
113 "been.*suspend",
114 "clos.*of.*account.*processed",
115 "confirm.your.account",
116 "copyright (?:restriction|infringment)",
117 "courier.*able",
118 "crediential.*notif",
119 "Critical Alert",
120 "deactivation.*in.*progress",
121 "delivery.*attempt.*failed",
122 "document.received",
123 "documented.*shared.*with.*you",
124 "dropbox.*document",
125 "e-?ma[il1]+ .{010}suspen",
126 "e-?ma[il1]{1} user",
127 "e-?ma[il1]{2} acc",
128 "e-?ma[il1]{2}.*up.?grade",
129 "e.?ma[il1]{2}.*server",
130 "e.?ma[il1]{2}.*suspend",
131 "email.update",
132 "faxed you",
133 "final notice",
134 "fraud(ulent)?.*charge",
135 "from.helpdesk",
136 "fu[il1]{2}.*ma[il1]+[ -]?box",
137 "has.been.*suspended",
138 "has.been.limited",
139 "have.locked",
140 "he[li]p ?desk upgrade",
141 "heipdesk",
142 "i[il]iega[il]",
143 "ii[il]ega[il]",
144 "immediate action",
145 "incoming e?mail",
146 "incoming.*fax",
147 "lock.*security",
148 "ma[il1]{1}[ -]?box.*quo",
149 "ma[il1]{2}[ -]?box.*fu[il1]",
150 "ma[il1]{2}box.*[il1]{2}mit",
151 "ma[il1]{2}box stor",
152 "mail on.?hold",
153 "mail.*box.*migration",
154 "mail.*de-?activat",
155 "mail.update.required",
156 "mails.*pending",
157 "messages.*pending",
158 "missed.*shipping.*notification",
159 "missed.shipment.notification",
160 "must.update.your.account",
161 "new [sl][io]g?[nig][ -]?in from",
162 "new voice ?-?mail",
163 "notifications.*pending",
164 "office.*3.*6.*5.*suspend",
165 "office365",
166 "on google docs with you",
167 "online doc",
168 "password.*compromised",
169 "periodic maintenance",
170 "potential(ly)? unauthorized",
171 "refund not approved",
172 "restrictions applied",
173 "report",
174 "revised.*policy",
175 "scam",
176 "scanned.?invoice",
177 "secured?.update",
178 "security breach",
179 "securlty",
180 "signed.*delivery",
181 "social media",
182 "status of your .{314}? ?delivery",
183 "susp[il1]+c[il1]+ous.*act[il1]+v[il1]+ty",
184 "suspicious.*sign.*[io]n",
185 "suspicious.activit",
186 "temporar(il)?y deactivate",
187 "temporar[il1]{2}y disab[li]ed",
188 "temporarily.*lock",
189 "time.sensitive",
190 "un-?usua[li].activity",
191 "unable.*deliver",
192 "unauthorized.*activit",
193 "unauthorized.device",
194 "unauthorized.use",
195 "undelivered message",
196 "unread.*doc",
197 "unusual.activity",
198 "upgrade.*account",
199 "upgrade.notice",
200 "urgent message",
201 "urgent.verification",
202 "v[il1]o[li1]at[il1]on security",
203 "va[il1]{1}date.*ma[il1]{2}[ -]?box",
204 "verification ?-?require",
205 "verification( )?-?need",
206 "verify.your?.account",
207 "web ?-?ma[il1]{2}",
208 "web[ -]?ma[il1]{2}",
209 "will.be.suspended",
210 "your (customer )?account .as",
211 "your.office.365",
212 "your.online.access",
213 "Critical.Notice",
214 "Restore.Access",
215 // https://github.com/sublime-security/static-files/blob/master/suspicious_subjects.txt
216 "account has been limited",
217 "action required",
218 "almost full",
219 "apd notifi cation",
220 "are you at your desk",
221 "are you available",
222 "attached file to docusign",
223 "banking is temporarily unavailable",
224 "bankofamerica",
225 "closing statement invoice",
226 "completed: docusign",
227 "de-activation of",
228 "delivery attempt",
229 "delivery stopped for shipment",
230 "detected suspicious",
231 "detected suspicious actvity",
232 "docu sign",
233 "document for you",
234 "document has been sent to you via docusign",
235 "document is ready for signature",
236 "docusign",
237 "encrypted message",
238 "failed delivery",
239 "fedex tracking",
240 "file was shared",
241 "freefax",
242 "fwd: due invoice paid",
243 "has shared",
244 "inbox is full",
245 "invitation to comment",
246 "invitation to edit",
247 "invoice due",
248 "left you a message",
249 "message from",
250 "new message",
251 "new voicemail",
252 "on desk",
253 "out of space",
254 "password reset",
255 "payment status",
256 "quick reply",
257 "re: w-2",
258 "required",
259 "required: completed docusign",
260 "remittance",
261 "ringcentral",
262 "scanned image",
263 "secured files",
264 "secured pdf",
265 "security alert",
266 "new sign-in",
267 "new sign in",
268 "sign-in attempt",
269 "sign in attempt",
270 "staff review",
271 "suspicious activity",
272 "unrecognized login attempt",
273 "upgrade immediately",
274 "urgent",
275 "wants to share",
276 "w2",
277 "you have notifications pending",
278 "your account",
279 'your (?:\w+\s+){0,1}\s*account',
280 "your amazon order",
281 "your document settlement",
282 "your order with amazon",
283 "your password has been compromised",
284 ),
285 any($suspicious_subjects, strings.icontains(subject.subject, .))
286 )
287 and (
288 // if the From is a custom domain, check that it's an unknown sender
289 // otherwise, it should be from salesforce
290 (
291 sender.email.domain.domain == "salesforce.com"
292 and any(headers.hops,
293 any(.fields,
294 .name == "X-SFDC-EmailCategory"
295 and .value in ("apiMassMail", "networksNewUser")
296 )
297 )
298 )
299 or (
300 (
301 (
302 profile.by_sender().prevalence in ("new", "outlier")
303 and not profile.by_sender().solicited
304 )
305 or (
306 profile.by_sender().any_messages_malicious_or_spam
307 and not profile.by_sender().any_false_positives
308 )
309 )
310
311 // negate highly trusted sender domains unless they fail DMARC authentication
312 and (
313 (
314 sender.email.domain.root_domain in $high_trust_sender_root_domains
315 and not headers.auth_summary.dmarc.pass
316 )
317 or sender.email.domain.root_domain not in $high_trust_sender_root_domains
318 )
319 )
320 )
321attack_types:
322 - "Credential Phishing"
323tactics_and_techniques:
324 - "Evasion"
325 - "Social engineering"
326detection_methods:
327 - "Content analysis"
328 - "Header analysis"
329 - "Natural Language Understanding"
330 - "URL analysis"
331id: "78a77c70-4008-545a-812f-bde793b72c29"