Free subdomain link with login or captcha (untrusted sender)

Message contains a link that uses a free subdomain provider, and has a login or captcha on the page.

Sublime rule (View on GitHub)

 1name: "Free subdomain link with login or captcha (untrusted sender)"
 2description: |
 3    Message contains a link that uses a free subdomain provider, and has a login or captcha on the page.
 4type: "rule"
 5severity: "medium"
 6source: |
 7  type.inbound
 8  and 0 < length(body.links) < 10
 9  and any(body.links,
10  
11          // contains login or captcha
12          (
13            ml.link_analysis(.).credphish.contains_login
14            or ml.link_analysis(.).credphish.contains_captcha
15          )
16  
17          // either the original or the redirect is a free subdomain
18          and (
19            ml.link_analysis(.).effective_url.domain.root_domain in $free_subdomain_hosts
20            or .href_url.domain.root_domain in $free_subdomain_hosts
21          )
22  
23          // exclude FP prone free subdomain hosts
24          // if it's a known brand impersonation, we'll detect it in other rules
25          and .href_url.domain.root_domain not in ("zendesk.com")
26          and ml.link_analysis(.).effective_url.domain.root_domain not in ("zendesk.com")
27          and ml.link_analysis(.).effective_url.domain.domain not in ("login.squarespace.com")
28  )
29  
30  // exclude all freesubdomain links are images
31  and length(filter(body.links, 
32                 .href_url.domain.root_domain in $free_subdomain_hosts
33                 and .href_url.domain.subdomain is not null
34                 and .href_url.domain.subdomain != "www") ) > 0
35  
36  and not all(filter(body.links, 
37                 .href_url.domain.root_domain in $free_subdomain_hosts
38                 and .href_url.domain.subdomain is not null
39                 and .href_url.domain.subdomain != "www"), (strings.ends_with(.href_url.url, "jpeg") or strings.ends_with(.href_url.url, "png")))
40  
41  // exclude FP prone senders
42  and sender.email.domain.root_domain not in ("sharepointonline.com")
43  // negate highly trusted sender domains unless they fail DMARC authentication
44  and (
45    (
46      sender.email.domain.root_domain in $high_trust_sender_root_domains
47      and not headers.auth_summary.dmarc.pass
48    )
49    or sender.email.domain.root_domain not in $high_trust_sender_root_domains
50  )
51  and (
52    (
53      profile.by_sender().prevalence in ("new", "outlier")
54      and not profile.by_sender().solicited
55    )
56    or (
57      profile.by_sender().any_messages_malicious_or_spam
58      and not profile.by_sender().any_false_positives
59    )
60  )
61  and not profile.by_sender().any_false_positives  
62
63tags:
64  - "Attack surface reduction"
65attack_types:
66  - "Credential Phishing"
67tactics_and_techniques:
68  - "Free subdomain host"
69  - "Social engineering"
70detection_methods:
71  - "Computer Vision"
72  - "File analysis"
73  - "Sender analysis"
74  - "URL screenshot"
75id: "93288f82-fbd2-5e88-b207-7f06386495a6"

Related rules

to-top