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(filter(attachments, .file_type == "pdf"),
8 any(file.explode(.),
9 any(.scan.exiftool.fields, .key == "Encryption")
10 or (
11 .scan.entropy.entropy > 7
12 and any(.scan.strings.strings, strings.icontains(., "/Encrypt"))
13 )
14 )
15 // Encrypted PDFs do not have child nodes with any data
16 and all(filter(file.explode(.), .depth > 0), .size == 0)
17 )
18 and (
19 any(ml.nlu_classifier(body.current_thread.text).intents,
20 .name == "cred_theft" and .confidence in ("medium", "high")
21 )
22 or any(ml.nlu_classifier(beta.ocr(file.message_screenshot()).text).intents,
23 .name == "cred_theft" and .confidence in ("medium", "high")
24 )
25 or (
26 (
27 regex.icontains(body.current_thread.text,
28 'PDF\s*(?:Access|Preview|Unlock|Decrypt)\s*(?:Pass)?code',
29 '(Access|Preview|Unlock|Decrypt|Pass)\s*(?:word|code)\s*to?\s*PDF\s*is?\s*:'
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 '(Access|Preview|Unlock|Decrypt|Pass)\s*(?:word|code)\s*to?\s*PDF\s*is?\s*:'
40 )
41 )
42 )
43 )
44 )
45 )
46 // not forwards/replies
47 and not (
48 (length(headers.references) > 0 or headers.in_reply_to is not null)
49 and (subject.is_forward or subject.is_reply)
50 and length(body.previous_threads) >= 1
51 )
52 and (
53 (
54 profile.by_sender_email().prevalence in ("new", "outlier")
55 and not profile.by_sender_email().solicited
56 )
57 or (
58 profile.by_sender_email().any_messages_malicious_or_spam
59 and not profile.by_sender_email().any_messages_benign
60 )
61 or (
62 length(recipients.to) == 0
63 or all(recipients.to,
64 strings.ilike(.display_name, "undisclosed?recipients")
65 )
66 )
67 or (
68 length(recipients.to) == 1
69 and any(recipients.to, .email.email == sender.email.email)
70 )
71 )
72 // negate highly trusted sender domains unless they fail DMARC authentication
73 and (
74 (
75 sender.email.domain.root_domain in $high_trust_sender_root_domains
76 and not headers.auth_summary.dmarc.pass
77 )
78 or sender.email.domain.root_domain not in $high_trust_sender_root_domains
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"