Detection rules › Sublime MQL

Benefits enrollment impersonation

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

Detects messages about benefit enrollment periods and healthcare selections from external senders that contain urgent language or requests for action. Excludes legitimate HR communications, marketing mailers, and trusted sender domains with valid authentication.

Threat classification

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

CategoryValues
Attack typesCredential Phishing
Tactics and techniquesEvasion, Impersonation: Employee, Out of band pivot, Social engineering

Event coverage

Rule body MQL

type.inbound
and sender.email.domain.domain not in $org_domains
and (
  length(body.current_thread.text) < 5000 or body.current_thread.text is null
)
and (
  regex.icontains(subject.subject,
                  '(open|benefits?) enrol{1,2}ment', // catches both enrolment and enrollment
                  'benefit(s)?.{0,10}(?:plan|choice|selection|deadline|period|summary)',
                  'hr benefits',
                  'annual enrol{1,2}ment',
                  'healthcare (choice|selection|opt.?in)',
                  '(fsa|hsa|401k) (enrol{1,2}ment|selection)',
                  'dependent (coverage|verification)',
                  '(health|dental|vision|insurance|medical) enrol{1,2}ment'
  )
  or regex.icontains(body.current_thread.text,
                     'benefit(s)? (plan|choice|selection|deadline|period)',
                     'hr benefits',
                     'annual enrol{1,2}ment',
                     'healthcare (choice|selection|opt.?in)',
                     '(fsa|hsa|401k) (enrol{1,2}ment|selection)',
                     'dependent (coverage|verification)',
                     '(health|dental|vision|insurance|medical) enrol{1,2}ment',
                     '(urgent|immediate) action required.{0,20}(benefit|enrol{1,2}ment)',
                     'coverage.{0,20}(expire|terminate)',
                     'last (day|chance).{0,20}(enrol{1,2}|select)',
                     '(login|sign.?in).{0,20}(benefit portal|hr portal)',
                     '(verify|update|confirm).{0,20}(benefit.{0,20}selection)'
  )
  or any(attachments,
         regex.icontains(.file_name,
                         'fileDoc-Review',
                         '(open|benefits?) enrol{1,2}ment',
                         'annual enrol{1,2}ment',
                         '(fsa|hsa|401k) (enrol{1,2}ment|selection)',
                         '(urgent|immediate) action required.{0,20}(benefit|enrol{1,2}ment)',
         )
  )
)
and 2 of (
  any(ml.nlu_classifier(body.current_thread.text).entities,
      .name in ("urgency", "request")
  ),
  any(ml.nlu_classifier(body.current_thread.text).intents, .name != "benign"),
  (
    (length(body.current_thread.text) < 250 and length(attachments) == 1)
    or (body.current_thread.text is null and length(attachments) == 1)
  ),
  // lure in attachment
  (
    any(attachments,
        (
          .file_type in $file_types_images
          or .file_type in ("pdf", "docx", "doc")
          or .file_extension in $file_extensions_macros
        )
        and any(filter(file.explode(.), .scan.ocr.raw is not null),
                (
                  any(ml.nlu_classifier(.scan.ocr.raw).intents,
                      .name != "benign"
                  )
                  and any(ml.nlu_classifier(.scan.ocr.raw).entities,
                          .name in ("urgency", "request")
                  )
                )
        )
    )
  )
)
// negate replies
and (length(headers.references) == 0 or headers.in_reply_to is null)

// Negate common marketing mailers
and not regex.icontains(sender.display_name,
                        'HR (?:Events|Expert|Support Center|Studies|Knowledge Cloud|News Library|Crowd|Solutions|Interests)|HR and People Operations'
)
and not (
  // Constant Contact
  any(headers.hops,
      strings.icontains(.authentication_results.spf_details.designator,
                        "constantcontact.com"
      )
  )
  or any(headers.hops,
         strings.icontains(.received_spf.designator, "constantcontact.com")
  )
  or (
    (
      any(headers.hops,
          .index == 0
          and any(.authentication_results.dkim_details,
                  .domain == "auth.ccsend.com"
          )
      )
    )
    and headers.auth_summary.dmarc.pass
  )
  or any(headers.references, strings.iends_with(., "ccsend.com"))
  // Hubspot
  or any(headers.hops,
         strings.icontains(.authentication_results.spf_details.designator,
                           "hubspotemail.net"
         )
  )
)
and sender.email.domain.root_domain not in~ (
  'medicare.gov',
  'farmers.com',
  'uhc.com',
  'blueshieldca.com',
  'corestream.com'
)
and (
  profile.by_sender().prevalence in ("new", "outlier")
  or (
    profile.by_sender().any_messages_malicious_or_spam
    and not profile.by_sender().any_messages_benign
  )
)
// 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 messages about benefit enrollment periods and healthcare selections from external senders that contain urgent language or requests for action. Excludes legitimate HR communications, marketing mailers, and trusted sender domains with valid authentication.

  1. inbound message
  2. sender.email.domain.domain not in $org_domains
  3. any of:
    • length(body.current_thread.text) < 5000
    • body.current_thread.text is missing
  4. any of:
    • subject.subject matches any of 8 patterns
      • (open|benefits?) enrol{1,2}ment
      • benefit(s)?.{0,10}(?:plan|choice|selection|deadline|period|summary)
      • hr benefits
      • annual enrol{1,2}ment
      • healthcare (choice|selection|opt.?in)
      • (fsa|hsa|401k) (enrol{1,2}ment|selection)
      • dependent (coverage|verification)
      • (health|dental|vision|insurance|medical) enrol{1,2}ment
    • body.current_thread.text matches any of 12 patterns
      • benefit(s)? (plan|choice|selection|deadline|period)
      • hr benefits
      • annual enrol{1,2}ment
      • healthcare (choice|selection|opt.?in)
      • (fsa|hsa|401k) (enrol{1,2}ment|selection)
      • dependent (coverage|verification)
      • (health|dental|vision|insurance|medical) enrol{1,2}ment
      • (urgent|immediate) action required.{0,20}(benefit|enrol{1,2}ment)
      • coverage.{0,20}(expire|terminate)
      • last (day|chance).{0,20}(enrol{1,2}|select)
      • (login|sign.?in).{0,20}(benefit portal|hr portal)
      • (verify|update|confirm).{0,20}(benefit.{0,20}selection)
    • any of attachments where:
      • .file_name matches any of 5 patterns
        • fileDoc-Review
        • (open|benefits?) enrol{1,2}ment
        • annual enrol{1,2}ment
        • (fsa|hsa|401k) (enrol{1,2}ment|selection)
        • (urgent|immediate) action required.{0,20}(benefit|enrol{1,2}ment)
  5. at least 2 of:
    • any of ml.nlu_classifier(body.current_thread.text).entities where:
      • .name in ('urgency', 'request')
    • any of ml.nlu_classifier(body.current_thread.text).intents where:
      • .name is not 'benign'
    • any of:
      • all of:
        • length(body.current_thread.text) < 250
        • length(attachments) is 1
      • all of:
        • body.current_thread.text is missing
        • length(attachments) is 1
    • any of attachments where all hold:
      • any of:
        • .file_type in $file_types_images
        • .file_type in ('pdf', 'docx', 'doc')
        • .file_extension in $file_extensions_macros
      • any of filter(...) where all hold:
        • any of ml.nlu_classifier(.scan.ocr.raw).intents where:
          • .name is not 'benign'
        • any of ml.nlu_classifier(.scan.ocr.raw).entities where:
          • .name in ('urgency', 'request')
  6. any of:
    • length(headers.references) is 0
    • headers.in_reply_to is missing
  7. not:
    • sender.display_name matches 'HR (?:Events|Expert|Support Center|Studies|Knowledge Cloud|News Library|Crowd|Solutions|Interests)|HR and People Operations'
  8. none of:
    • any of headers.hops where:
      • .authentication_results.spf_details.designator contains 'constantcontact.com'
    • any of headers.hops where:
      • .received_spf.designator contains 'constantcontact.com'
    • all of:
      • any of headers.hops where all hold:
        • .index is 0
        • any of .authentication_results.dkim_details where:
          • .domain is 'auth.ccsend.com'
      • headers.auth_summary.dmarc.pass
    • any of headers.references where:
      • . ends with 'ccsend.com'
    • any of headers.hops where:
      • .authentication_results.spf_details.designator contains 'hubspotemail.net'
  9. sender.email.domain.root_domain not in ('medicare.gov', 'farmers.com', 'uhc.com', 'blueshieldca.com', 'corestream.com')
  10. any of:
    • profile.by_sender().prevalence in ('new', 'outlier')
    • all of:
      • profile.by_sender().any_messages_malicious_or_spam
      • not:
        • profile.by_sender().any_messages_benign
  11. 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: attachments[].file_extension, attachments[].file_name, attachments[].file_type, body.current_thread.text, headers.auth_summary.dmarc.pass, headers.hops, headers.hops[].authentication_results.dkim_details, headers.hops[].authentication_results.dkim_details[].domain, headers.hops[].authentication_results.spf_details.designator, headers.hops[].index, headers.hops[].received_spf.designator, headers.in_reply_to, headers.references, sender.display_name, sender.email.domain.domain, sender.email.domain.root_domain, subject.subject, type.inbound. Sensors: file.explode, ml.nlu_classifier, profile.by_sender, regex.icontains, strings.icontains, strings.iends_with. Reference lists: $file_extensions_macros, $file_types_images, $high_trust_sender_root_domains, $org_domains.

Indicators matched (32)

FieldMatchValue
regex.icontainsregex(open|benefits?) enrol{1,2}ment
regex.icontainsregexbenefit(s)?.{0,10}(?:plan|choice|selection|deadline|period|summary)
regex.icontainsregexhr benefits
regex.icontainsregexannual enrol{1,2}ment
regex.icontainsregexhealthcare (choice|selection|opt.?in)
regex.icontainsregex(fsa|hsa|401k) (enrol{1,2}ment|selection)
regex.icontainsregexdependent (coverage|verification)
regex.icontainsregex(health|dental|vision|insurance|medical) enrol{1,2}ment
regex.icontainsregexbenefit(s)? (plan|choice|selection|deadline|period)
regex.icontainsregex(urgent|immediate) action required.{0,20}(benefit|enrol{1,2}ment)
regex.icontainsregexcoverage.{0,20}(expire|terminate)
regex.icontainsregexlast (day|chance).{0,20}(enrol{1,2}|select)
20 more
regex.icontainsregex(login|sign.?in).{0,20}(benefit portal|hr portal)
regex.icontainsregex(verify|update|confirm).{0,20}(benefit.{0,20}selection)
regex.icontainsregexfileDoc-Review
ml.nlu_classifier(body.current_thread.text).entities[].namememberurgency
ml.nlu_classifier(body.current_thread.text).entities[].namememberrequest
attachments[].file_typememberpdf
attachments[].file_typememberdocx
attachments[].file_typememberdoc
ml.nlu_classifier(filter(...)[].scan.ocr.raw).entities[].namememberurgency
ml.nlu_classifier(filter(...)[].scan.ocr.raw).entities[].namememberrequest
regex.icontainsregexHR (?:Events|Expert|Support Center|Studies|Knowledge Cloud|News Library|Crowd|Solutions|Interests)|HR and People Operations
strings.icontainssubstringconstantcontact.com
headers.hops[].authentication_results.dkim_details[].domainequalsauth.ccsend.com
strings.iends_withsuffixccsend.com
strings.icontainssubstringhubspotemail.net
sender.email.domain.root_domainmembermedicare.gov
sender.email.domain.root_domainmemberfarmers.com
sender.email.domain.root_domainmemberuhc.com
sender.email.domain.root_domainmemberblueshieldca.com
sender.email.domain.root_domainmembercorestream.com