Skip to content

Commit 110fc0b

Browse files
MSAdministratorCI Botaidenmitchellmorriscode
authored
Update phaas_impact_solutions.yml (#3755)
Co-authored-by: CI Bot <hello@sublimesecurity.com> Co-authored-by: Aiden Mitchell <me@aidenmitchell.ca> Co-authored-by: Sam Scholten <sam@sublimesecurity.com>
1 parent e449996 commit 110fc0b

File tree

1 file changed

+43
-26
lines changed

1 file changed

+43
-26
lines changed

detection-rules/phaas_impact_solutions.yml

Lines changed: 43 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,50 @@ severity: "medium"
88
source: |
99
type.inbound
1010
and (
11-
(
12-
length(attachments) >= 1
13-
and any(attachments,
14-
.size < 10000
15-
and .file_extension == "htm"
16-
and (
17-
regex.icontains(file.parse_html(.).raw,
18-
"const (?:urlParts|fakeEvent|progressBar|segments)"
19-
)
20-
or any([file.parse_html(.).raw],
21-
strings.icontains(., "impact?")
22-
or strings.icontains(., "/impact")
23-
)
24-
)
25-
)
11+
// attached html/svg
12+
any(filter(attachments, .file_type in ("html", "svg")),
13+
regex.count(file.parse_text(.).text,
14+
'const (?:urlParts|fakeEvent|progressBar|progressInterval|segments|statusText|statusText|securityNotice|statusMessages|challengeForm|challengeRunning|challengeSuccess|successText|verifyingText|encodedTarget|baseDomain|newDynamicParam|statusElement)\s*='
15+
) >= 3
16+
or (
17+
strings.icontains(file.parse_text(.).text, 'const baseDomain')
18+
and strings.icontains(file.parse_text(.).text, 'const port')
19+
and strings.icontains(file.parse_text(.).text, 'const path')
20+
)
21+
or strings.icontains(file.parse_text(.).text, 'impact?')
22+
or regex.contains(file.parse_text(.).text, '\d/impact')
2623
)
27-
or (
28-
any(body.links,
29-
(
30-
strings.icontains(.href_url.url, "impact?")
31-
or strings.icontains(.href_url.url, "/impact")
32-
)
33-
and (
34-
strings.icontains(.href_url.url, ":8443")
35-
or strings.icontains(.href_url.url, ":2087")
36-
)
37-
)
24+
25+
// attached EMLs with html/svg attachments
26+
or any(filter(attachments,
27+
.content_type == "message/rfc822" or .file_extension == "eml"
28+
),
29+
any(filter(file.parse_eml(.).attachments,
30+
.file_type in ("html", "svg")
31+
),
32+
regex.count(file.parse_text(.).text,
33+
'const (?:urlParts|fakeEvent|progressBar|progressInterval|segments|statusText|statusText|securityNotice|statusMessages|challengeForm|challengeRunning|challengeSuccess|successText|verifyingText|encodedTarget|baseDomain|newDynamicParam|statusElement)\s*='
34+
) >= 3
35+
or (
36+
strings.icontains(file.parse_text(.).text, 'const baseDomain')
37+
and strings.icontains(file.parse_text(.).text, 'const port')
38+
and strings.icontains(file.parse_text(.).text, 'const path')
39+
)
40+
or strings.icontains(file.parse_text(.).text, 'impact?')
41+
or regex.contains(file.parse_text(.).text, '\d/impact')
42+
)
43+
)
44+
45+
// direct body links
46+
or any(body.links,
47+
(
48+
strings.icontains(.href_url.url, "impact?session_")
49+
or strings.icontains(.href_url.url, "/impact")
50+
)
51+
and (
52+
strings.icontains(.href_url.url, ":8443")
53+
or strings.icontains(.href_url.url, ":2087")
54+
)
3855
)
3956
)
4057
attack_types:

0 commit comments

Comments
 (0)