Detection rules › Sublime MQL

Link: QR code in EML attachment with credential phishing indicators

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

This rule detects QR codes in EML attachments that return a phishing disposition when analyzed, or are leveraging a known open redirect.

Threat classification

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

CategoryValues
Attack typesCredential Phishing
Tactics and techniquesEvasion, Open redirect, QR code

Event coverage

Rule body MQL

type.inbound
and length(attachments) == 1
and any(attachments,
        (.content_type == "message/rfc822" or .file_extension =~ "eml")
        // credential theft language in the attached EML
        and any(file.explode(.),
                .depth > 0
                and .scan.qr.type == "url"

                // linkanalysis phishing disposition
                and (
                  ml.link_analysis(.scan.qr.url).credphish.disposition == "phishing"
                  or (
                    strings.ilike(ml.link_analysis(.scan.qr.url).final_dom.display_text,
                                  "*robot*",
                                  "*session check*",
                                  "*verify*",
                                  "*human*"
                    )
                    and length(ml.link_analysis(.scan.qr.url).final_dom.display_text
                    ) < 250
                  )
                  or any(ml.link_analysis(.scan.qr.url).unique_urls_accessed,
                         .domain.domain == "challenges.cloudflare.com"
                         and strings.icontains(.path, "turnstile")
                  )
                  or any(.scan.qr.url.rewrite.encoders,
                         strings.icontains(., "open_redirect")
                  )
                )
                and .scan.qr.url.domain.root_domain not in $org_domains
        )
)

Detection logic

Scope: inbound message.

This rule detects QR codes in EML attachments that return a phishing disposition when analyzed, or are leveraging a known open redirect.

  1. inbound message
  2. length(attachments) is 1
  3. any of attachments where all hold:
    • any of:
      • .content_type is 'message/rfc822'
      • .file_extension is 'eml'
    • any of file.explode(.) where all hold:
      • .depth > 0
      • .scan.qr.type is 'url'
      • any of:
        • ml.link_analysis(.scan.qr.url).credphish.disposition is 'phishing'
        • all of:
          • ml.link_analysis(.scan.qr.url).final_dom.display_text matches any of 4 patterns
            • *robot*
            • *session check*
            • *verify*
            • *human*
          • length(ml.link_analysis(.scan.qr.url).final_dom.display_text) < 250
        • any of ml.link_analysis(.scan.qr.url).unique_urls_accessed where all hold:
          • .domain.domain is 'challenges.cloudflare.com'
          • .path contains 'turnstile'
        • any of .scan.qr.url.rewrite.encoders where:
          • . contains 'open_redirect'
      • .scan.qr.url.domain.root_domain not in $org_domains

Inspects: attachments[].content_type, attachments[].file_extension, type.inbound. Sensors: file.explode, ml.link_analysis, strings.icontains, strings.ilike. Reference lists: $org_domains.

Indicators matched (10)

FieldMatchValue
attachments[].content_typeequalsmessage/rfc822
attachments[].file_extensionequalseml
file.explode(attachments[])[].scan.qr.typeequalsurl
strings.ilikesubstring*robot*
strings.ilikesubstring*session check*
strings.ilikesubstring*verify*
strings.ilikesubstring*human*
ml.link_analysis(file.explode(attachments[])[].scan.qr.url).unique_urls_accessed[].domain.domainequalschallenges.cloudflare.com
strings.icontainssubstringturnstile
strings.icontainssubstringopen_redirect