Detection rules › Sublime MQL

Link: Executable file download with suspicious message content

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

Detects inbound messages containing links to executable files combined with high-confidence security, financial, or credential theft content indicators, while excluding legitimate trusted domains with proper DMARC authentication.

Threat classification

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

CategoryValues
Attack typesCredential Phishing, Malware/Ransomware
Tactics and techniquesEvasion, Social engineering

Event coverage

Rule body MQL

type.inbound
and length(body.links) < 10
and any(body.links,
        any($file_extensions_executables,
            strings.iends_with(..href_url.url, strings.concat(".", .))
            // the display text is not going to reveal the executable extension
            and not strings.iends_with(..display_text, strings.concat(".", .))
        )
        and .href_url.path is not null
        // filter out some executables
        and not any(["com", "action", "js", "app"],
                    strings.iends_with(..href_url.url, .)
        )
        // .app links from Google Play
        and not .href_url.domain.domain == "play.google.com"
        and not .href_url.domain.root_domain in $high_trust_sender_root_domains
)
and not (
  (subject.is_reply or subject.is_forward)
  and length(body.previous_threads) > 0
  and (length(headers.references) > 0 or headers.in_reply_to is not null)
)
and 2 of (
  any(ml.nlu_classifier(body.current_thread.text).topics,
      .name in ("Security and Authentication", "Financial Communications")
      and .confidence == "high"
  ),
  any(ml.nlu_classifier(body.current_thread.text).intents,
      .name == "cred_theft" and .confidence == "high"
  ),
  sender.email.domain.tld in $suspicious_tlds
)

// 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
)

Detection logic

Scope: inbound message.

Detects inbound messages containing links to executable files combined with high-confidence security, financial, or credential theft content indicators, while excluding legitimate trusted domains with proper DMARC authentication.

  1. inbound message
  2. length(body.links) < 10
  3. any of body.links where all hold:
    • any of $file_extensions_executables where all hold:
      • strings.iends_with(.href_url.url)
      • not:
        • strings.iends_with(.display_text)
    • .href_url.path is set
    • not:
      • any of ['com', 'action', 'js', 'app'] where:
        • strings.iends_with(.href_url.url)
    • not:
      • .href_url.domain.domain is 'play.google.com'
    • not:
      • .href_url.domain.root_domain in $high_trust_sender_root_domains
  4. not:
    • all of:
      • any of:
        • subject.is_reply
        • subject.is_forward
      • length(body.previous_threads) > 0
      • any of:
        • length(headers.references) > 0
        • headers.in_reply_to is set
  5. at least 2 of:
    • any of ml.nlu_classifier(body.current_thread.text).topics where all hold:
      • .name in ('Security and Authentication', 'Financial Communications')
      • .confidence is 'high'
    • any of ml.nlu_classifier(body.current_thread.text).intents where all hold:
      • .name is 'cred_theft'
      • .confidence is 'high'
    • sender.email.domain.tld in $suspicious_tlds
  6. 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

Inspects: body.current_thread.text, body.links, body.links[].display_text, body.links[].href_url.domain.domain, body.links[].href_url.domain.root_domain, body.links[].href_url.path, body.links[].href_url.url, body.previous_threads, headers.auth_summary.dmarc.pass, headers.in_reply_to, headers.references, sender.email.domain.root_domain, sender.email.domain.tld, subject.is_forward, subject.is_reply, type.inbound. Sensors: ml.nlu_classifier, strings.concat, strings.iends_with. Reference lists: $file_extensions_executables, $high_trust_sender_root_domains, $suspicious_tlds.

Indicators matched (6)

FieldMatchValue
body.links[].href_url.domain.domainequalsplay.google.com
ml.nlu_classifier(body.current_thread.text).topics[].namememberSecurity and Authentication
ml.nlu_classifier(body.current_thread.text).topics[].namememberFinancial Communications
ml.nlu_classifier(body.current_thread.text).topics[].confidenceequalshigh
ml.nlu_classifier(body.current_thread.text).intents[].nameequalscred_theft
ml.nlu_classifier(body.current_thread.text).intents[].confidenceequalshigh