Detection rules › Sublime MQL

Spam: Single recipient duplicated in cc

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

Detects spam emails where the 'To' and 'CC' fields match, using indicators such as short body length with spam keywords, unsolicited content, dmarc failures, fake threads, and suspicious links.

Threat classification

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

CategoryValues
Attack typesSpam
Tactics and techniquesImpersonation: Brand, Social engineering

Event coverage

Rule body MQL

type.inbound

// one recipient and 1 cc
and length(recipients.to) == 1
and length(recipients.cc) == 1

// unsolicited
and not profile.by_sender().solicited

// recipients email matches the cc email
and any(recipients.to, any(recipients.cc, .email.email == ..email.email))

// body is short with spam keywords
and (
  (
    length(body.current_thread.text) < 150
    and strings.ilike(body.current_thread.text,
                      "*congrat*",
                      "*win*",
                      "*expired*",
                      "*subscription*",
                      "*won*",
                      "*gift*",
                      "*CARTE CADEAU*",
                      "*Votre chance*",
                      "*survey*",
                      "*livraison*",
                      "*delivery*",
                      "*package*"
    )
  )

  // body is super short
  or length(body.current_thread.text) < 10

  // body has no spaces
  or regex.imatch(body.current_thread.text, '[^ ]+')

  // subject is null
  or subject.subject == ""

  // dmarc failure
  or not headers.auth_summary.dmarc.pass

  // or display text contains suspicious terms
  or any(body.links,
         regex.icontains(.display_text,
                         'Congrat|Survey|package|delivery|\bclaim\b'
         )
         and not .href_url.domain.root_domain == "surveymonkey.com"
  )

  // compauth failure
  or any(headers.hops,
         .authentication_results.compauth.verdict not in (
           "pass",
           "softpass",
           "none"
         )
  )

  // all links display text is null or aka.ms
  or (
    length(filter(body.links,
                  (
                    (
                      .display_text is null
                      and .href_url.domain.root_domain != sender.email.domain.root_domain
                    )
                    or .href_url.domain.root_domain in (
                      "aka.ms",
                      "mimecast.com",
                      "mimecastprotect.com",
                      "cisco.com"
                    )
                  )
           )
    ) == length(body.links)
  )
  or (
    // fake thread check
    regex.imatch(subject.subject, '(\[[^\]]+\]\s?){0,3}(re|fwd?)\s?:.*')
    and (
      (length(headers.references) == 0 and headers.in_reply_to is null)
      or headers.in_reply_to is null
    )
  )
)

Detection logic

Scope: inbound message.

Detects spam emails where the 'To' and 'CC' fields match, using indicators such as short body length with spam keywords, unsolicited content, dmarc failures, fake threads, and suspicious links.

  1. inbound message
  2. length(recipients.to) is 1
  3. length(recipients.cc) is 1
  4. not:
    • profile.by_sender().solicited
  5. any of recipients.to where:
    • any of recipients.cc where:
      • .email.email is .email.email
  6. any of:
    • all of:
      • length(body.current_thread.text) < 150
      • body.current_thread.text matches any of 12 patterns
        • *congrat*
        • *win*
        • *expired*
        • *subscription*
        • *won*
        • *gift*
        • *CARTE CADEAU*
        • *Votre chance*
        • *survey*
        • *livraison*
        • *delivery*
        • *package*
    • length(body.current_thread.text) < 10
    • body.current_thread.text matches '[^ ]+'
    • subject.subject is ''
    • not:
      • headers.auth_summary.dmarc.pass
    • any of body.links where all hold:
      • .display_text matches 'Congrat|Survey|package|delivery|\\bclaim\\b'
      • not:
        • .href_url.domain.root_domain is 'surveymonkey.com'
    • any of headers.hops where:
      • .authentication_results.compauth.verdict not in ('pass', 'softpass', 'none')
    • length(filter(body.links, .display_text is null and .href_url.domain.root_domain != sender.email.domain.root_domain or .href_url.domain.root_domain in ('aka.ms', 'mimecast.com', 'mimecastprotect.com', 'cisco.com'))) is length(body.links)
    • all of:
      • subject.subject matches '(\\[[^\\]]+\\]\\s?){0,3}(re|fwd?)\\s?:.*'
      • any of:
        • all of:
          • length(headers.references) is 0
          • headers.in_reply_to is missing
        • headers.in_reply_to is missing

Inspects: body.current_thread.text, body.links, body.links[].display_text, body.links[].href_url.domain.root_domain, headers.auth_summary.dmarc.pass, headers.hops, headers.hops[].authentication_results.compauth.verdict, headers.in_reply_to, headers.references, recipients.cc, recipients.cc[].email.email, recipients.to, recipients.to[].email.email, sender.email.domain.root_domain, subject.subject, type.inbound. Sensors: profile.by_sender, regex.icontains, regex.imatch, strings.ilike.

Indicators matched (24)

FieldMatchValue
strings.ilikesubstring*congrat*
strings.ilikesubstring*win*
strings.ilikesubstring*expired*
strings.ilikesubstring*subscription*
strings.ilikesubstring*won*
strings.ilikesubstring*gift*
strings.ilikesubstring*CARTE CADEAU*
strings.ilikesubstring*Votre chance*
strings.ilikesubstring*survey*
strings.ilikesubstring*livraison*
strings.ilikesubstring*delivery*
strings.ilikesubstring*package*
12 more
regex.imatchregex[^ ]+
subject.subjectequals
regex.icontainsregexCongrat|Survey|package|delivery|\bclaim\b
body.links[].href_url.domain.root_domainequalssurveymonkey.com
headers.hops[].authentication_results.compauth.verdictmemberpass
headers.hops[].authentication_results.compauth.verdictmembersoftpass
headers.hops[].authentication_results.compauth.verdictmembernone
body.links[].href_url.domain.root_domainmemberaka.ms
body.links[].href_url.domain.root_domainmembermimecast.com
body.links[].href_url.domain.root_domainmembermimecastprotect.com
body.links[].href_url.domain.root_domainmembercisco.com
regex.imatchregex(\[[^\]]+\]\s?){0,3}(re|fwd?)\s?:.*