Self-impersonation: Sender matches recipient with bolded name and suspicious link
Detects messages where the sender's email address matches the recipient's email address, with the sender's display name appearing in bold text and a suspicious 'Read the Message' link present in the body.
Sublime rule (View on GitHub)
1name: "Self-impersonation: Sender matches recipient with bolded name and suspicious link"
2description: "Detects messages where the sender's email address matches the recipient's email address, with the sender's display name appearing in bold text and a suspicious 'Read the Message' link present in the body."
3type: "rule"
4severity: "medium"
5source: |
6 type.inbound
7 // sender matches recipients
8 and (
9 length(recipients.to) == 1
10 and recipients.to[0].email.email == sender.email.email
11 )
12 // sender in current thread BOLD
13 and any(html.xpath(body.html, '//b').nodes,
14 .display_text == sender.display_name
15 )
16 // we want the dashed html element to contain a link, and that link to include part of the subject (the subject is the org)
17 and any(html.xpath(body.html,
18 '//table//td[contains(@style, "border-style: dashed") and contains(@style, "border-width: 1pt")]//a[./b]'
19 ).nodes,
20 any(regex.extract(subject.base, '(?P<word>\w+)'),
21 any(..links,
22 strings.icontains(.href_url.url, ..named_groups["word"])
23 )
24 )
25 )
26attack_types:
27 - "Credential Phishing"
28tactics_and_techniques:
29 - "Evasion"
30 - "Social engineering"
31detection_methods:
32 - "Header analysis"
33 - "HTML analysis"
34 - "Sender analysis"
35id: "0129a805-2fe2-5a40-81bc-b3459085aa23"