Attachment: Hex-encoded recipient email in URL fragment

Detects non-ICS attachments (PDFs, Office docs, HTML, etc.) that embed a URL whose fragment contains the recipient's email address encoded in hexadecimal. This technique is used to personalize or track clicks on malicious links delivered via file attachments rather than inline in the message body. Observed samples largely spoof financial or invoicing correspondence—such as invoice notices, AR aging reports, and cashflow or change-order updates—to lure recipients into opening the attachment and following the embedded link, often leading to credential phishing.

Sublime rule (View on GitHub)

 1name: "Attachment: Hex-encoded recipient email in URL fragment"
 2description: "Detects non-ICS attachments (PDFs, Office docs, HTML, etc.) that embed a URL whose fragment contains the recipient's email address encoded in hexadecimal. This technique is used to personalize or track clicks on malicious links delivered via file attachments rather than inline in the message body. Observed samples largely spoof financial or invoicing correspondence—such as invoice notices, AR aging reports, and cashflow or change-order updates—to lure recipients into opening the attachment and following the embedded link, often leading to credential phishing."
 3type: "rule"
 4severity: "medium"
 5source: |
 6  type.inbound
 7  and any(attachments,
 8          not (
 9            .file_type == "ics"
10            or .file_extension == "ics"
11            or .content_type in ("application/ics", "text/calendar")
12          )
13          and any(file.explode(.),
14                  any(.scan.url.urls,
15                      strings.decode_hex(.fragment) == recipients.to[0].email.email
16                  )
17          )
18  )  
19tags:
20  - "Attack surface reduction"
21attack_types:
22  - "Credential Phishing"
23  - "BEC/Fraud"
24tactics_and_techniques:
25  - "Social engineering"
26  - "Evasion"
27  - "PDF"
28detection_methods:
29  - "File analysis"
30  - "URL analysis"
31  - "Content analysis"
32id: "5637ad1e-2fbb-5856-9530-c6a0181d9134"

Related rules

to-top