Skip to content

Commit c86e0c4

Browse files
authored
Update link_microsoft_low_reputation.yml (#3425)
1 parent 9d93c0d commit c86e0c4

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

detection-rules/link_microsoft_low_reputation.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,25 @@ source: |
88
// suspicious link
99
and any(body.links,
1010
(
11-
.href_url.domain.root_domain not in $tranco_1m
11+
.href_url.domain.tld == "ru"
12+
or .href_url.domain.root_domain not in $tranco_1m
1213
or .href_url.domain.domain in $free_file_hosts
1314
or .href_url.domain.root_domain in $free_file_hosts
1415
or .href_url.domain.root_domain in $free_subdomain_hosts
1516
or .href_url.domain.domain in $url_shorteners
1617
or .href_url.domain.domain in $social_landing_hosts
18+
// account for URL rewrites
19+
or (
20+
any(.href_url.query_params_decoded["domain"],
21+
strings.parse_domain(.).tld == "ru"
22+
or strings.parse_domain(.).root_domain not in~ $tranco_1m
23+
or strings.parse_domain(.).domain in~ $free_file_hosts
24+
or strings.parse_domain(.).root_domain in~ $free_file_hosts
25+
or strings.parse_domain(.).root_domain in~ $free_subdomain_hosts
26+
or strings.parse_domain(.).domain in~ $url_shorteners
27+
or strings.parse_domain(.).domain in~ $social_landing_hosts
28+
)
29+
)
1730
or
1831
1932
// mass mailer link, masks the actual URL
@@ -49,7 +62,6 @@ source: |
4962
"microsoft.com",
5063
"aka.ms",
5164
"msftauthimages.net",
52-
"mimecastprotect.com",
5365
"office.com",
5466
"microsoftproject.com"
5567
)
@@ -71,13 +83,16 @@ source: |
7183
.file_type in $file_types_images
7284
and any(ml.logo_detect(.).brands, strings.starts_with(.name, "Microsoft"))
7385
)
74-
or strings.istarts_with(strings.replace_confusables(body.current_thread.text), "Microsoft ")
86+
or strings.istarts_with(strings.replace_confusables(body.current_thread.text),
87+
"Microsoft "
88+
)
7589
or (
7690
regex.imatch(strings.replace_confusables(body.current_thread.text),
7791
'[\n\s]*[o0O]ff[il1]ce\b.*'
7892
)
79-
and not regex.icontains(strings.replace_confusables(body.current_thread.text),
80-
'office (for lease|rent|sale)'
93+
and not regex.icontains(strings.replace_confusables(body.current_thread.text
94+
),
95+
'office (for lease|rent|sale)'
8196
)
8297
)
8398
or any(ml.logo_detect(file.message_screenshot()).brands,
@@ -253,7 +268,7 @@ source: |
253268
"*renewal*"
254269
)
255270
)
256-
271+
257272
or (
258273
any(attachments,
259274
.file_type in $file_types_images

0 commit comments

Comments
 (0)