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 any(ml.nlu_classifier(body.current_thread.text).intents,
 23          .name == "cred_theft" and .confidence == "high"
 24  )
 25  and 1 of (
 26    ( // sender domain matches no body domains
 27      length(body.links) > 0
 28      and all(body.links,
 29              .href_url.domain.root_domain != sender.email.domain.root_domain
 30              and .href_url.domain.root_domain not in (
 31                "salesforce.com",
 32                "force.com",
 33                "site.com"
 34              )
 35      )
 36    ),
 37    regex.icontains(subject.subject,
 38                    "termination.*notice",
 39                    "38417",
 40                    ":completed",
 41                    "[il1]{2}mit.*ma[il1]{2} ?bo?x",
 42                    "[il][il][il]egai[ -]",
 43                    "[li][li][li]ega[li] attempt",
 44                    "[ng]-?[io]n .*block",
 45                    "[ng]-?[io]n .*cancel",
 46                    "[ng]-?[io]n .*deactiv",
 47                    "[ng]-?[io]n .*disabl",
 48                    "action.*required",
 49                    "abandon.*package",
 50                    "about.your.account",
 51                    "acc(ou)?n?t (is )?on ho[li]d",
 52                    "acc(ou)?n?t.*terminat",
 53                    "acc(oun)?t.*[il1]{2}mitation",
 54                    "access.*limitation",
 55                    "account (will be )?block",
 56                    "account.*de-?activat",
 57                    "account.*locked",
 58                    "account.*restrict",
 59                    "account.*re-verification",
 60                    "account.*security",
 61                    "account.*suspension",
 62                    "account.has.been",
 63                    "account.has.expired",
 64                    "account.will.be.blocked",
 65                    "account v[il]o[li]at",
 66                    "activity.*acc(oun)?t",
 67                    "almost.full",
 68                    "app[li]e.[il]d",
 69                    "authenticate.*account",
 70                    "been.*suspend",
 71                    "clos.*of.*account.*processed",
 72                    "confirm.your.account",
 73                    "courier.*able",
 74                    "crediential.*notif",
 75                    "deactivation.*in.*progress",
 76                    "delivery.*attempt.*failed",
 77                    "document.received",
 78                    "documented.*shared.*with.*you",
 79                    "dropbox.*document",
 80                    "e-?ma[il1]+ .{010}suspen",
 81                    "e-?ma[il1]{1} user",
 82                    "e-?ma[il1]{2} acc",
 83                    "e-?ma[il1]{2}.*up.?grade",
 84                    "e.?ma[il1]{2}.*server",
 85                    "e.?ma[il1]{2}.*suspend",
 86                    "email.update",
 87                    "faxed you",
 88                    "fraud(ulent)?.*charge",
 89                    "from.helpdesk",
 90                    "fu[il1]{2}.*ma[il1]+[ -]?box",
 91                    "has.been.*suspended",
 92                    "has.been.limited",
 93                    "have.locked",
 94                    "he[li]p ?desk upgrade",
 95                    "heipdesk",
 96                    "i[il]iega[il]",
 97                    "ii[il]ega[il]",
 98                    "incoming e?mail",
 99                    "incoming.*fax",
100                    "lock.*security",
101                    "ma[il1]{1}[ -]?box.*quo",
102                    "ma[il1]{2}[ -]?box.*fu[il1]",
103                    "ma[il1]{2}box.*[il1]{2}mit",
104                    "ma[il1]{2}box stor",
105                    "mail on.?hold",
106                    "mail.*box.*migration",
107                    "mail.*de-?activat",
108                    "mail.update.required",
109                    "mails.*pending",
110                    "messages.*pending",
111                    "missed.*shipping.*notification",
112                    "missed.shipment.notification",
113                    "must.update.your.account",
114                    "new [sl][io]g?[nig][ -]?in from",
115                    "new voice ?-?mail",
116                    "notifications.*pending",
117                    "office.*3.*6.*5.*suspend",
118                    "office365",
119                    "on google docs with you",
120                    "online doc",
121                    "password.*compromised",
122                    "periodic maintenance",
123                    "potential(ly)? unauthorized",
124                    "refund not approved",
125                    "report",
126                    "revised.*policy",
127                    "scam",
128                    "scanned.?invoice",
129                    "secured?.update",
130                    "security breach",
131                    "securlty",
132                    "signed.*delivery",
133                    "status of your .{314}? ?delivery",
134                    "susp[il1]+c[il1]+ous.*act[il1]+v[il1]+ty",
135                    "suspicious.*sign.*[io]n",
136                    "suspicious.activit",
137                    "temporar(il)?y deactivate",
138                    "temporar[il1]{2}y disab[li]ed",
139                    "temporarily.*lock",
140                    "un-?usua[li].activity",
141                    "unable.*deliver",
142                    "unauthorized.*activit",
143                    "unauthorized.device",
144                    "undelivered message",
145                    "unread.*doc",
146                    "unusual.activity",
147                    "upgrade.*account",
148                    "upgrade.notice",
149                    "urgent message",
150                    "urgent.verification",
151                    "v[il1]o[li1]at[il1]on security",
152                    "va[il1]{1}date.*ma[il1]{2}[ -]?box",
153                    "verification ?-?require",
154                    "verification( )?-?need",
155                    "verify.your?.account",
156                    "web ?-?ma[il1]{2}",
157                    "web[ -]?ma[il1]{2}",
158                    "will.be.suspended",
159                    "your (customer )?account .as",
160                    "your.office.365",
161                    "your.online.access",
162                    "Critical.Notice",
163                    "Restore.Access",
164                    // https://github.com/sublime-security/static-files/blob/master/suspicious_subjects.txt
165                    "account has been limited",
166                    "action required",
167                    "almost full",
168                    "apd notifi cation",
169                    "are you at your desk",
170                    "are you available",
171                    "attached file to docusign",
172                    "banking is temporarily unavailable",
173                    "bankofamerica",
174                    "closing statement invoice",
175                    "completed: docusign",
176                    "de-activation of",
177                    "delivery attempt",
178                    "delivery stopped for shipment",
179                    "detected suspicious",
180                    "detected suspicious actvity",
181                    "docu sign",
182                    "document for you",
183                    "document has been sent to you via docusign",
184                    "document is ready for signature",
185                    "docusign",
186                    "encrypted message",
187                    "failed delivery",
188                    "fedex tracking",
189                    "file was shared",
190                    "freefax",
191                    "fwd: due invoice paid",
192                    "has shared",
193                    "inbox is full",
194                    "invitation to comment",
195                    "invitation to edit",
196                    "invoice due",
197                    "left you a message",
198                    "message from",
199                    "new message",
200                    "new voicemail",
201                    "on desk",
202                    "out of space",
203                    "password reset",
204                    "payment status",
205                    "quick reply",
206                    "re: w-2",
207                    "required",
208                    "required: completed docusign",
209                    "remittance",
210                    "ringcentral",
211                    "scanned image",
212                    "secured files",
213                    "secured pdf",
214                    "security alert",
215                    "new sign-in",
216                    "new sign in",
217                    "sign-in attempt",
218                    "sign in attempt",
219                    "staff review",
220                    "suspicious activity",
221                    "unrecognized login attempt",
222                    "upgrade immediately",
223                    "urgent",
224                    "wants to share",
225                    "w2",
226                    "you have notifications pending",
227                    "your account",
228                    'your (?:\w+\s+){0,1}\s*account',
229                    "your amazon order",
230                    "your document settlement",
231                    "your order with amazon",
232                    "your password has been compromised",
233    ),
234    any($suspicious_subjects, strings.icontains(subject.subject, .))
235  )
236  and (
237    // if the From is a custom domain, check that it's an unknown sender
238    // otherwise, it should be from salesforce
239    (
240      sender.email.domain.domain == "salesforce.com"
241      and any(headers.hops,
242              any(.fields,
243                  .name == "X-SFDC-EmailCategory"
244                  and .value in ("apiMassMail", "networksNewUser")
245              )
246      )
247    )
248    or (
249      (
250        (
251          profile.by_sender().prevalence in ("new", "outlier")
252          and not profile.by_sender().solicited
253        )
254        or (
255          profile.by_sender().any_messages_malicious_or_spam
256          and not profile.by_sender().any_false_positives
257        )
258      )
259  
260      // negate highly trusted sender domains unless they fail DMARC authentication
261      and (
262        (
263          sender.email.domain.root_domain in $high_trust_sender_root_domains
264          and not headers.auth_summary.dmarc.pass
265        )
266        or sender.email.domain.root_domain not in $high_trust_sender_root_domains
267      )
268    )
269  )  
270attack_types:
271  - "Credential Phishing"
272tactics_and_techniques:
273  - "Evasion"
274  - "Social engineering"
275detection_methods:
276  - "Content analysis"
277  - "Header analysis"
278  - "Natural Language Understanding"
279  - "URL analysis"
280id: "78a77c70-4008-545a-812f-bde793b72c29"
to-top