Attachment: PDF with EOF MD5 hash marker
Detects inbound messages containing a PDF attachment whose contents match a YARA signature identifying an MD5 hash appended near the end of file. This technique is commonly used to make each generated PDF unique, helping evade hash-based detection systems.
Sublime rule (View on GitHub)
1name: "Attachment: PDF with EOF MD5 hash marker"
2description: "Detects inbound messages containing a PDF attachment whose contents match a YARA signature identifying an MD5 hash appended near the end of file. This technique is commonly used to make each generated PDF unique, helping evade hash-based detection systems."
3type: "rule"
4severity: "high"
5source: |
6 type.inbound
7 and any(filter(attachments, .file_type == "pdf"),
8 any(file.explode(.),
9 any(.scan.yara.matches, .name in ("pdf_eof_md5_hash"))
10 )
11 )
12attack_types:
13 - "Credential Phishing"
14 - "Malware/Ransomware"
15tactics_and_techniques:
16 - "PDF"
17 - "Evasion"
18detection_methods:
19 - "File analysis"
20 - "YARA"
21id: "b5eb01ac-b191-5536-b1b6-107e32dfd050"