Detection rules › Sublime MQL

Brand impersonation: Amazon Web Services (AWS)

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

Detects messages impersonating AWS through similar display names combined with security-themed content and authentication failures. Excludes legitimate AWS communications and trusted senders.

Threat classification

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

CategoryValues
Attack typesCredential Phishing
Tactics and techniquesImpersonation: Brand, Social engineering

Event coverage

Rule body MQL

type.inbound
and regex.icontains(strings.replace_confusables(sender.display_name),
                    '\baws\b|amazon web services|\bses\b'
)
and (
  // ML Topic Analysis and Credential Theft Detection
  any(ml.nlu_classifier(body.current_thread.text).topics,
      .name in ("Security and Authentication", "Secure Message")
      and .confidence == "high"
  )
  or any(ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics,
         .name in ("Security and Authentication", "Secure Message")
         and .confidence == "high"
         and beta.ocr(file.message_screenshot()).text != ""
  )
  or any(ml.nlu_classifier(body.current_thread.text).intents,
         .name == "cred_theft" and .confidence == "high"
  )
  or any(ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).intents,
         .name == "cred_theft" and .confidence == "high"
  )
)
// Not from legitimate AWS domains
// there was a DMARC check here, but a lot of users send AWS notifications to groups/mailing lists that breaks DMARC
and not (
  sender.email.domain.root_domain in $org_domains
  or sender.email.domain.root_domain in (
    "amazon.com",
    "amazonaws.com",
    "amazonses.com",
    "awsevents.com",
    "aws-experience.com",
    "marketplace.aws",
    "aws.com",
    "amazonaws.cn",
    "repost.aws",
    "awscustomercouncil.com",
    "airtableemail.com", // used for re:Invent
    "nmls.org", // "state examination system", realtor software
    "mktgcampaigns.com", // Elastic + AWS co-marketing emails
    "awseducate.com",
    "awsacademy.com"
  )
  or sender.email.domain.tld == "local"
)
// 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 not profile.by_sender().solicited

Detection logic

Scope: inbound message.

Detects messages impersonating AWS through similar display names combined with security-themed content and authentication failures. Excludes legitimate AWS communications and trusted senders.

  1. inbound message
  2. strings.replace_confusables(sender.display_name) matches '\\baws\\b|amazon web services|\\bses\\b'
  3. any of:
    • any of ml.nlu_classifier(body.current_thread.text).topics where all hold:
      • .name in ('Security and Authentication', 'Secure Message')
      • .confidence is 'high'
    • any of ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics where all hold:
      • .name in ('Security and Authentication', 'Secure Message')
      • .confidence is 'high'
      • beta.ocr(file.message_screenshot()).text is not ''
    • any of ml.nlu_classifier(body.current_thread.text).intents where all hold:
      • .name is 'cred_theft'
      • .confidence is 'high'
    • any of ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).intents where all hold:
      • .name is 'cred_theft'
      • .confidence is 'high'
  4. none of:
    • sender.email.domain.root_domain in $org_domains
    • sender.email.domain.root_domain in ('amazon.com', 'amazonaws.com', 'amazonses.com', 'awsevents.com', 'aws-experience.com', 'marketplace.aws', 'aws.com', 'amazonaws.cn', 'repost.aws', 'awscustomercouncil.com', 'airtableemail.com', 'nmls.org', 'mktgcampaigns.com', 'awseducate.com', 'awsacademy.com')
    • sender.email.domain.tld is 'local'
  5. 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
  6. not:
    • profile.by_sender().solicited

Inspects: body.current_thread.text, headers.auth_summary.dmarc.pass, sender.display_name, sender.email.domain.root_domain, sender.email.domain.tld, type.inbound. Sensors: beta.ocr, file.message_screenshot, ml.nlu_classifier, profile.by_sender, regex.icontains, strings.replace_confusables. Reference lists: $high_trust_sender_root_domains, $org_domains.

Indicators matched (27)

FieldMatchValue
regex.icontainsregex\baws\b|amazon web services|\bses\b
ml.nlu_classifier(body.current_thread.text).topics[].namememberSecurity and Authentication
ml.nlu_classifier(body.current_thread.text).topics[].namememberSecure Message
ml.nlu_classifier(body.current_thread.text).topics[].confidenceequalshigh
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics[].namememberSecurity and Authentication
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics[].namememberSecure Message
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics[].confidenceequalshigh
ml.nlu_classifier(body.current_thread.text).intents[].nameequalscred_theft
ml.nlu_classifier(body.current_thread.text).intents[].confidenceequalshigh
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).intents[].nameequalscred_theft
ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).intents[].confidenceequalshigh
sender.email.domain.root_domainmemberamazon.com
15 more
sender.email.domain.root_domainmemberamazonaws.com
sender.email.domain.root_domainmemberamazonses.com
sender.email.domain.root_domainmemberawsevents.com
sender.email.domain.root_domainmemberaws-experience.com
sender.email.domain.root_domainmembermarketplace.aws
sender.email.domain.root_domainmemberaws.com
sender.email.domain.root_domainmemberamazonaws.cn
sender.email.domain.root_domainmemberrepost.aws
sender.email.domain.root_domainmemberawscustomercouncil.com
sender.email.domain.root_domainmemberairtableemail.com
sender.email.domain.root_domainmembernmls.org
sender.email.domain.root_domainmembermktgcampaigns.com
sender.email.domain.root_domainmemberawseducate.com
sender.email.domain.root_domainmemberawsacademy.com
sender.email.domain.tldequalslocal