Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions detection-rules/link_microsoft_html_generator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Link: Microsoft HTML generator with recipient targeting"
description: "Detects messages with HTML content generated by Microsoft tools (MSHTML) or specific CSS styling patterns, where links contain the recipient's email address in URL parameters, paths, or fragments. This targeting technique is commonly used to personalize malicious content and bypass security filters."
type: "rule"
severity: "high"
source: |
type.inbound
and (
length(html.xpath(body.html,
"//div[contains(@style, 'ORPHANS: 2;') and contains(@style, 'WIDOWS: 2;')]"
).nodes
) == 2
or length(html.xpath(body.html,
"//meta[@name='GENERATOR' and contains(@content, 'MSHTML')]"
).nodes
) == 1
)
and (
any(recipients.to,
any(body.links, ..email.email in .href_url.query_params_decoded["eta"])
or any(body.links, strings.icontains(.href_url.path, ..email.email))
or any(body.links, .href_url.fragment == ..email.email)
)
)

attack_types:
- "Credential Phishing"
tactics_and_techniques:
- "Social engineering"
- "Evasion"
detection_methods:
- "HTML analysis"
- "Content analysis"
- "URL analysis"
id: "09d596e0-47eb-5403-9f1e-784474396a15"