1
+ name : " Attachment: Encrypted PDF with credential theft body"
2
+ description : " Attached PDF is encrypted, and email body contains credential theft language. Seen in-the-wild impersonating e-fax services."
3
+ type : " rule"
4
+ severity : " medium"
5
+ source : |
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(beta.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|Unlock|Decrypt)\s?Code|Passcode))'
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|Unlock|Decrypt)\s?Code|Passcode))'
39
+ )
40
+ )
41
+ )
42
+ )
43
+ )
44
+ )
45
+ and (
46
+ (
47
+ profile.by_sender_email().prevalence in ("new", "outlier")
48
+ and not profile.by_sender_email().solicited
49
+ )
50
+ or (
51
+ profile.by_sender_email().any_messages_malicious_or_spam
52
+ and not profile.by_sender_email().any_false_positives
53
+ )
54
+ )
55
+ // negate highly trusted sender domains unless they fail DMARC authentication
56
+ and (
57
+ (
58
+ sender.email.domain.root_domain in $high_trust_sender_root_domains
59
+ and not headers.auth_summary.dmarc.pass
60
+ )
61
+ or sender.email.domain.root_domain not in $high_trust_sender_root_domains
62
+ )
63
+
64
+ attack_types :
65
+ - " Credential Phishing"
66
+ tactics_and_techniques :
67
+ - " Encryption"
68
+ - " Evasion"
69
+ - " PDF"
70
+ - " Social engineering"
71
+ detection_methods :
72
+ - " Content analysis"
73
+ - " Exif analysis"
74
+ - " File analysis"
75
+ - " Natural Language Understanding"
76
+ - " Sender analysis"
77
+ id : " 6c878de2-2422-5218-83ce-9a642ce62e1a"
78
+ og_id : " c9596c9a-0465-5364-8523-542e6d25a8f7"
79
+ testing_pr : 3087
80
+ testing_sha : e44322587404183c6962e75c6993a72024516f8b
0 commit comments