Attachment: Risk assessment PDF with inline image
Detects inbound messages containing a PDF attachment whose file name matches a 'risk assessment' naming pattern with an alphanumeric code, alongside an inline image attachment referenced via content ID in the HTML body. Messages from highly trusted sender domains that pass DMARC authentication are excluded.
Sublime rule (View on GitHub)
1name: "Attachment: Risk assessment PDF with inline image"
2description: "Detects inbound messages containing a PDF attachment whose file name matches a 'risk assessment' naming pattern with an alphanumeric code, alongside an inline image attachment referenced via content ID in the HTML body. Messages from highly trusted sender domains that pass DMARC authentication are excluded."
3type: "rule"
4severity: "high"
5source: |
6 type.inbound
7 and any(filter(attachments,
8 .file_type in $file_types_images
9 and .content_disposition == "inline"
10 ),
11 strings.icontains(body.html.raw, .content_id)
12 )
13 and any(attachments,
14 .file_type == "pdf"
15 and regex.icontains(.file_name, 'risk assessment [a-z]{2,4}[0-9]{6,}')
16 )
17 // negate highly trusted sender domains unless they fail DMARC authentication
18 and not (
19 sender.email.domain.root_domain in $high_trust_sender_root_domains
20 and coalesce(headers.auth_summary.dmarc.pass, false)
21 )
22attack_types:
23 - "Malware/Ransomware"
24 - "Spam"
25tactics_and_techniques:
26 - "Image as content"
27 - "PDF"
28 - "Social engineering"
29detection_methods:
30 - "File analysis"
31 - "HTML analysis"
32 - "Header analysis"
33 - "Sender analysis"
34id: "40eb7daa-8815-5111-8ab9-5d747c70f61c"