Brand impersonation: Amazon Web Services (AWS)

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

Sublime rule (View on GitHub)

 1name: "Brand impersonation: Amazon Web Services (AWS)"
 2description: "Detects messages impersonating AWS through similar display names combined with security-themed content and authentication failures. Excludes legitimate AWS communications and trusted senders."
 3type: "rule"
 4severity: "medium"
 5source: |
 6  type.inbound
 7  and regex.icontains(strings.replace_confusables(sender.display_name),
 8                      '\baws\b|amazon web services|\bses\b'
 9  )
10  and (
11    // ML Topic Analysis and Credential Theft Detection
12    any(ml.nlu_classifier(body.current_thread.text).topics,
13        .name in ("Security and Authentication", "Secure Message")
14        and .confidence == "high"
15    )
16    or (
17      beta.ocr(file.message_screenshot()).text != ""
18      and any(ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).topics,
19              .name in ("Security and Authentication", "Secure Message")
20              and .confidence == "high"
21      )
22    )
23    or any(ml.nlu_classifier(body.current_thread.text).intents,
24           .name == "cred_theft" and .confidence == "high"
25    )
26    or any(ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).intents,
27           .name == "cred_theft" and .confidence == "high"
28    )
29  )
30  // Not from legitimate AWS domains
31  // there was a DMARC check here, but a lot of users send AWS notifications to groups/mailing lists that breaks DMARC
32  and not (
33    sender.email.domain.root_domain in $org_domains
34    or sender.email.domain.root_domain in (
35      "amazon.com",
36      "amazonaws.com",
37      "amazonses.com",
38      "awsevents.com",
39      "awsmp-seller-conference.com",
40      "aws-experience.com",
41      "marketplace.aws",
42      "aws.com",
43      "amazonaws.cn",
44      "repost.aws",
45      "awscustomercouncil.com",
46      "airtableemail.com", // used for re:Invent
47      "nmls.org", // "state examination system", realtor software
48      "mktgcampaigns.com", // Elastic + AWS co-marketing emails
49      "awseducate.com",
50      "awsacademy.com"
51    )
52    or sender.email.domain.tld == "local"
53  )
54  // negate highly trusted sender domains unless they fail DMARC authentication
55  and not (
56    sender.email.domain.root_domain in $high_trust_sender_root_domains
57    and coalesce(headers.auth_summary.dmarc.pass, false)
58  )
59  // sender email specific
60  and not (
61    profile.by_sender_email().solicited
62    // sender domain specific
63    or (
64      profile.by_sender().solicited
65      // 30 day decay
66      and (profile.by_sender().days_since.last_contact < 30)
67    )
68  )  
69
70attack_types:
71  - "Credential Phishing"
72tactics_and_techniques:
73  - "Impersonation: Brand"
74  - "Social engineering"
75detection_methods:
76  - "Content analysis"
77  - "Header analysis"
78  - "Optical Character Recognition"
79  - "Sender analysis"
80  - "Natural Language Understanding"
81id: "31de94e0-8c93-5408-929f-f448eea91830"
to-top