Attachment: Encrypted PDF with credential theft body

Attached PDF is encrypted, and email body contains credential theft language. Seen in-the-wild impersonating e-fax services.

Sublime rule (View on GitHub)

 1name: "Attachment: Encrypted PDF with credential theft body"
 2description: "Attached PDF is encrypted, and email body contains credential theft language. Seen in-the-wild impersonating e-fax services."
 3type: "rule"
 4severity: "medium"
 5source: |
 6  type.inbound
 7  and any(attachments,
 8          .file_type == "pdf"
 9          and any(file.explode(.),
10                  any(.scan.exiftool.fields, .key == "Encryption")
11                  or (
12                    .scan.entropy.entropy > 7
13                    and any(.scan.strings.strings,
14                            strings.icontains(., "/Encrypt")
15                    )
16                  )
17          )
18  )
19  and (
20    any(ml.nlu_classifier(body.current_thread.text).intents,
21        .name == "cred_theft" and .confidence in ("medium", "high")
22    )
23    or any(ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).intents,
24           .name == "cred_theft" and .confidence in ("medium", "high")
25    )
26    or (
27      (
28        regex.icontains(body.current_thread.text,
29                        'PDF\s*(?:Access|Preview|Unlock|Decrypt)\s*(?:Pass)?code'
30        )
31        or (
32          (
33            length(body.current_thread.text) <= 10
34            or (body.current_thread.text is null)
35          )
36          and any(body.previous_threads,
37                  regex.icontains(.text,
38                                  'PDF\s*(?:Access|Preview|Unlock|Decrypt)\s*(?:Pass)?code'
39                  )
40          )
41        )
42      )
43    )
44  )
45  // not forwards/replies
46  and not (
47    (length(headers.references) > 0 or headers.in_reply_to is not null)
48    and (subject.is_forward or subject.is_reply)
49    and length(body.previous_threads) >= 1
50  )
51  and (
52    (
53      profile.by_sender_email().prevalence in ("new", "outlier")
54      and not profile.by_sender_email().solicited
55    )
56    or (
57      profile.by_sender_email().any_messages_malicious_or_spam
58      and not profile.by_sender_email().any_messages_benign
59    )
60    or (
61      length(recipients.to) == 0
62      or all(recipients.to,
63             strings.ilike(.display_name, "undisclosed?recipients")
64      )
65    )
66    or (
67      length(recipients.to) == 1
68      and any(recipients.to, .email.email == sender.email.email)
69    )
70  )
71  // negate highly trusted sender domains unless they fail DMARC authentication
72  and (
73    (
74      sender.email.domain.root_domain in $high_trust_sender_root_domains
75      and not headers.auth_summary.dmarc.pass
76    )
77    or sender.email.domain.root_domain not in $high_trust_sender_root_domains
78  )  
79
80attack_types:
81  - "Credential Phishing"
82tactics_and_techniques:
83  - "Encryption"
84  - "Evasion"
85  - "PDF"
86  - "Social engineering"
87detection_methods:
88  - "Content analysis"
89  - "Exif analysis"
90  - "File analysis"
91  - "Natural Language Understanding"
92  - "Sender analysis"
93id: "c9596c9a-0465-5364-8523-542e6d25a8f7"
to-top