Skip to content

Commit 259500a

Browse files
[Test Rules] [PR sublime-security#4515] modified rule: VIP impersonation: Fake thread with display name match, email mismatch
1 parent 4adb7ec commit 259500a

1 file changed

Lines changed: 21 additions & 23 deletions

File tree

detection-rules/4515_vip_impersonation_fake_thread.yml

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ source: |
99
strings.icontains(body.html.display_text,
1010
strings.concat("From: ", .display_name, " <")
1111
)
12+
or strings.icontains(body.html.display_text,
13+
strings.concat("From: ",
14+
strings.concat(.first_name,
15+
" ",
16+
.last_name
17+
),
18+
" <"
19+
)
20+
)
1221
or strings.icontains(body.html.display_text,
1322
strings.concat("From: ",
1423
strings.concat(.last_name,
@@ -18,16 +27,6 @@ source: |
1827
" <"
1928
)
2029
)
21-
or any(regex.extract(.display_name,
22-
'\A(?P<name>.+?)\s*[\((][^))]*[))]\s*\z'
23-
),
24-
strings.icontains(body.html.display_text,
25-
strings.concat("From: ",
26-
.named_groups["name"],
27-
" <"
28-
)
29-
)
30-
)
3130
)
3231
and not (
3332
strings.icontains(body.html.display_text,
@@ -38,6 +37,17 @@ source: |
3837
">"
3938
)
4039
)
40+
or strings.icontains(body.html.display_text,
41+
strings.concat("From: ",
42+
strings.concat(.first_name,
43+
" ",
44+
.last_name
45+
),
46+
" <",
47+
.email,
48+
">"
49+
)
50+
)
4151
or strings.icontains(body.html.display_text,
4252
strings.concat("From: ",
4353
strings.concat(.last_name,
@@ -49,18 +59,6 @@ source: |
4959
">"
5060
)
5161
)
52-
or any(regex.extract(.display_name,
53-
'\A(?P<name>.+?)\s*[\((][^))]*[))]\s*\z'
54-
),
55-
strings.icontains(body.html.display_text,
56-
strings.concat("From: ",
57-
.named_groups["name"],
58-
" <",
59-
..email,
60-
">"
61-
)
62-
)
63-
)
6462
)
6563
)
6664
and any([body.current_thread.text, body.html.display_text, body.plain.raw],
@@ -89,4 +87,4 @@ detection_methods:
8987
id: "a067b4db-294b-5177-ab12-0671ec5c7d63"
9088
og_id: "11cc3e28-65db-5c7e-9436-9d0a700da971"
9189
testing_pr: 4515
92-
testing_sha: 3c7644f9963fb214445fd5add76ce8f949a4acf0
90+
testing_sha: c9ede5003470372be79cb7ad142656d7202a6329

0 commit comments

Comments
 (0)