Detection rules › Sublime MQL

Free subdomain link with login or captcha (untrusted sender)

Severity
medium
Type
rule
Source
github.com/sublime-security/sublime-rules

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

Threat classification

Sublime's own taxonomy (not MITRE ATT&CK).

CategoryValues
Attack typesCredential Phishing
Tactics and techniquesFree subdomain host, Social engineering

Event coverage

Rule body MQL

type.inbound
and 0 < length(body.links) < 10
and any(body.links,

        // contains login or captcha
        (
          ml.link_analysis(.).credphish.contains_login
          or ml.link_analysis(.).credphish.contains_captcha
        )

        // either the original or the redirect is a free subdomain
        and (
          ml.link_analysis(.).effective_url.domain.root_domain in $free_subdomain_hosts
          or .href_url.domain.root_domain in $free_subdomain_hosts
        )

        // exclude FP prone free subdomain hosts
        // if it's a known brand impersonation, we'll detect it in other rules
        and .href_url.domain.root_domain not in ("zendesk.com")
        and ml.link_analysis(.).effective_url.domain.root_domain not in (
          "zendesk.com"
        )
        and ml.link_analysis(.).effective_url.domain.domain not in (
          "login.squarespace.com"
        )
)

// exclude all freesubdomain links are images
and length(filter(body.links,
                  .href_url.domain.root_domain in $free_subdomain_hosts
                  and .href_url.domain.subdomain is not null
                  and .href_url.domain.subdomain != "www"
           )
) > 0
and not all(filter(body.links,
                   .href_url.domain.root_domain in $free_subdomain_hosts
                   and .href_url.domain.subdomain is not null
                   and .href_url.domain.subdomain != "www"
            ),
            (
              strings.ends_with(.href_url.url, "jpeg")
              or strings.ends_with(.href_url.url, "png")
            )
)

// exclude FP prone senders
and sender.email.domain.root_domain not in ("sharepointonline.com")
// negate highly trusted sender domains unless they fail DMARC authentication
and (
  (
    sender.email.domain.root_domain in $high_trust_sender_root_domains
    and not headers.auth_summary.dmarc.pass
  )
  or sender.email.domain.root_domain not in $high_trust_sender_root_domains
)
and (
  (
    profile.by_sender().prevalence in ("new", "outlier")
    and not profile.by_sender().solicited
  )
  or (
    profile.by_sender().any_messages_malicious_or_spam
    and not profile.by_sender().any_messages_benign
  )
)
and not profile.by_sender().any_messages_benign

Detection logic

Scope: inbound message.

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

  1. inbound message
  2. all of:
    • length(body.links) > 0
    • length(body.links) < 10
  3. any of body.links where all hold:
    • any of:
      • ml.link_analysis(.).credphish.contains_login
      • ml.link_analysis(.).credphish.contains_captcha
    • any of:
      • ml.link_analysis(.).effective_url.domain.root_domain in $free_subdomain_hosts
      • .href_url.domain.root_domain in $free_subdomain_hosts
    • .href_url.domain.root_domain not in ('zendesk.com')
    • ml.link_analysis(.).effective_url.domain.root_domain not in ('zendesk.com')
    • ml.link_analysis(.).effective_url.domain.domain not in ('login.squarespace.com')
  4. length(filter(body.links, .href_url.domain.root_domain in $free_subdomain_hosts and .href_url.domain.subdomain is not null and .href_url.domain.subdomain != 'www')) > 0
  5. not:
    • all of filter(body.links) where any holds:
      • .href_url.url ends with 'jpeg'
      • .href_url.url ends with 'png'
  6. sender.email.domain.root_domain not in ('sharepointonline.com')
  7. any of:
    • all of:
      • sender.email.domain.root_domain in $high_trust_sender_root_domains
      • not:
        • headers.auth_summary.dmarc.pass
    • sender.email.domain.root_domain not in $high_trust_sender_root_domains
  8. any of:
    • all of:
      • profile.by_sender().prevalence in ('new', 'outlier')
      • not:
        • profile.by_sender().solicited
    • all of:
      • profile.by_sender().any_messages_malicious_or_spam
      • not:
        • profile.by_sender().any_messages_benign
  9. not:
    • profile.by_sender().any_messages_benign

Inspects: body.links, body.links[].href_url.domain.root_domain, body.links[].href_url.domain.subdomain, headers.auth_summary.dmarc.pass, sender.email.domain.root_domain, type.inbound. Sensors: ml.link_analysis, profile.by_sender, strings.ends_with. Reference lists: $free_subdomain_hosts, $high_trust_sender_root_domains.

Indicators matched (4)

FieldMatchValue
body.links[].href_url.domain.root_domainmemberzendesk.com
strings.ends_withsuffixjpeg
strings.ends_withsuffixpng
sender.email.domain.root_domainmembersharepointonline.com