Skip to content

Commit 925f1bc

Browse files
authored
Refactor link detection rules for Punycode characters (#3502)
1 parent 709e42e commit 925f1bc

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

detection-rules/link_contains_punycode_characters.yml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,13 @@ authors:
99
severity: "medium"
1010
source: |
1111
type.inbound
12-
and any(body.links, .href_url.domain.punycode is not null and .href_url.domain.valid == true)
1312
and (
14-
(
15-
// include automated emails
16-
sender.display_name == "WordPress"
17-
or sender.email.local_part == "wordpress"
18-
)
19-
20-
or (
21-
(
22-
profile.by_sender().prevalence in ("new", "outlier")
23-
and not profile.by_sender().solicited
24-
)
25-
or (
26-
profile.by_sender().any_messages_malicious_or_spam
27-
and not profile.by_sender().any_messages_benign
28-
)
13+
any(body.links,
14+
.href_url.domain.punycode is not null and .href_url.domain.valid == true
2915
)
16+
or any(body.links, strings.starts_with(.href_url.domain.domain, "xn--"))
3017
)
31-
and not profile.by_sender().any_messages_benign
18+
3219
tags:
3320
- "Attack surface reduction"
3421
attack_types:

0 commit comments

Comments
 (0)