Skip to content

Commit 4f4bf63

Browse files
[Test Rules] [PR #4563] added rule: Link: PDF with suspicious Request for Quote or Purchase (RFQ|RFP)
1 parent dc3fe70 commit 4f4bf63

1 file changed

Lines changed: 71 additions & 0 deletions

File tree

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: "Link: PDF with suspicious Request for Quote or Purchase (RFQ|RFP)"
2+
description: "Detects messages with reply or forward subjects containing links that display as PDF files but redirect to free file hosting platforms or self-service creation domains, specifically targeting Request for Quotation (RFQ) or Request for Purchase (RFP) terminology."
3+
type: "rule"
4+
severity: "high"
5+
source: |
6+
type.inbound
7+
and (subject.is_reply or subject.is_forward)
8+
and length(body.previous_threads) <= 1
9+
and length(body.links) > 0
10+
// no PDF attachments
11+
and length(filter(attachments, .file_type == "pdf")) == 0
12+
// the display_text ends in .pdf and goes to a free file host
13+
and any(body.current_thread.links,
14+
strings.iends_with(.display_text, '.pdf')
15+
and (
16+
(
17+
.href_url.domain.domain in $free_file_hosts
18+
or .href_url.domain.root_domain in $free_file_hosts
19+
or .href_url.domain.domain in $self_service_creation_platform_domains
20+
or .href_url.domain.root_domain in $self_service_creation_platform_domains
21+
or .href_url.domain.root_domain == "html.cafe"
22+
)
23+
// suspicious sender behaviour
24+
or (
25+
sender.email.email in map(recipients.to, .email.email)
26+
or (
27+
length(recipients.to) == 0
28+
or (
29+
all(recipients.to, .email.domain.valid == false)
30+
and all(recipients.cc, .email.domain.valid == false)
31+
)
32+
)
33+
)
34+
)
35+
// the display text references a Request for Quotation (RFQ) or Request for Purchase (RFP)
36+
and (
37+
regex.icontains(.display_text,
38+
'(?:\bR\.?F\.?P\b|\bR\.?F\.?Q\b)|(?:Request.for.(?:Quot(e|ation)|Purchas(e|ing)))'
39+
)
40+
)
41+
// negate links which make use of google icons inside of a bounding box
42+
// filter down to the link with the same display text
43+
and not any(filter(html.xpath(body.html,
44+
'//a[img[@src] or .//img[@src]][.//div[contains(@style, "border:1px solid")] or ancestor::div[contains(@style, "border:1px solid")]]'
45+
).nodes,
46+
// the display text is the link we're inspecting
47+
..display_text == .display_text
48+
),
49+
// inside this is a reference to the google icon
50+
strings.icontains(.raw, 'gstatic.com/docs/doclist/images/')
51+
)
52+
)
53+
54+
55+
attack_types:
56+
- "BEC/Fraud"
57+
- "Malware/Ransomware"
58+
tactics_and_techniques:
59+
- "Free file host"
60+
- "Social engineering"
61+
- "Evasion"
62+
detection_methods:
63+
- "Content analysis"
64+
- "Header analysis"
65+
- "HTML analysis"
66+
- "Sender analysis"
67+
- "URL analysis"
68+
id: "8e5bef4f-3133-5335-97db-f2d366a772fb"
69+
og_id: "9b0e6a27-5f3f-5e9f-ab63-e481e4bd30c1"
70+
testing_pr: 4563
71+
testing_sha: 6837e5221d28076a4b4dad05fb31dca7c5de997b

0 commit comments

Comments
 (0)