EXPLORE
← Back to Explore
sublimemediumRule

Attachment: PDF with bolded passcode

Detects inbound emails carrying at least one PDF attachment where the HTML body contains a bolded phrase with a distinct RGB color value, and where the text references an upcoming 'code' or 'password'.

MITRE ATT&CK

defense-evasioninitial-access

Detection Query

type.inbound
and length(filter(attachments, .file_type == "pdf")) >= 1
and any(html.xpath(body.html, '//div[span/b and span/following-sibling::span]').nodes,
        length(distinct(regex.extract(.raw, 'rgb\(.*?\)'), .full_match)) == 2
        and any(html.xpath(., './/span').nodes,
                regex.contains(.inner_text, 'following (code|password|pass):$')
        )
)

Data Sources

Email MessagesEmail HeadersEmail Attachments

Platforms

email
Raw Content
name: "Attachment: PDF with bolded passcode"
description: "Detects inbound emails carrying at least one PDF attachment where the HTML body contains a bolded phrase with a distinct RGB color value, and where the text references an upcoming 'code' or 'password'."
type: "rule"
severity: "medium"
source: |
  type.inbound
  and length(filter(attachments, .file_type == "pdf")) >= 1
  and any(html.xpath(body.html, '//div[span/b and span/following-sibling::span]').nodes,
          length(distinct(regex.extract(.raw, 'rgb\(.*?\)'), .full_match)) == 2
          and any(html.xpath(., './/span').nodes,
                  regex.contains(.inner_text, 'following (code|password|pass):$')
          )
  )
attack_types:
  - "Credential Phishing"
tactics_and_techniques:
  - "PDF"
  - "Evasion"
  - "Social engineering"
detection_methods:
  - "HTML analysis"
  - "Content analysis"
  - "File analysis"
id: "f6b680d3-cc80-5039-a14c-5301170c1477"