Skip to content

Commit 728aea0

Browse files
adding toolshell attack chain rules for exploit and RCE
1 parent f348e92 commit 728aea0

File tree

2 files changed

+117
-0
lines changed

2 files changed

+117
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
[metadata]
2+
creation_date = "2025/07/23"
3+
integration = ["network_traffic"]
4+
maturity = "production"
5+
updated_date = "2025/07/23"
6+
7+
[rule]
8+
author = ["Elastic"]
9+
description = """
10+
Detects potential remote code execution (RCE) attempts targeting IIS web servers running SharePoint via malicious VIEWSTATE payloads in HTTP POST requests. Attackers may exploit insecure deserialization in the VIEWSTATE parameter to execute arbitrary code. This rule identifies suspicious requests containing VIEWSTATE data and other indicators of exploitation, specifically those associated with the Toolshell exploit chain. Toolshell leverages vulnerabilities (CVE-2025-53770 and CVE-2025-53771) for initial access, enabling adversaries to deploy a webshell, steal machine keys, sign VIEWSTATE payloads offline, and subsequently send signed payloads to the server to achieve code execution.
11+
"""
12+
from = "now-9m"
13+
index = ["logs-network_traffic.http*"]
14+
language = "kuery"
15+
license = "Elastic License v2"
16+
max_signals = 10
17+
name = "Potential VIEWSTATE RCE Attempt on SharePoint/IIS"
18+
risk_score = 73
19+
rule_id = "99c9af5a-67cf-11f0-b69e-f661ea17fbcd"
20+
setup = """
21+
### Network Traffic Setup
22+
23+
This rule requires network traffic logs to be collected from HTTP endpoints, focusing on IIS web servers and SharePoint sites. Ensure logging captures HTTP request and response details, including headers and request bodies for POST requests. Monitoring VIEWSTATE content is critical for detecting deserialization attacks.
24+
"""
25+
severity = "high"
26+
tags = [
27+
"Domain: Network",
28+
"Tactic: Initial Access",
29+
"Use Case: Threat Detection",
30+
"Data Source: Network Traffic",
31+
"Data Source: Network Traffic HTTP Logs",
32+
]
33+
timestamp_override = "event.ingested"
34+
type = "query"
35+
query = '''
36+
data_stream.dataset : "network_traffic.http" and
37+
network.direction: "ingress" and
38+
http.request.method: "POST" and
39+
http.request.body.content: *__VIEWSTATE=* and
40+
http.request.headers.content-type: "application/x-www-form-urlencoded" and
41+
http.request.body.bytes >= 20 and
42+
http.response.headers.server: Microsoft-IIS*
43+
'''
44+
45+
[[rule.threat]]
46+
framework = "MITRE ATT&CK"
47+
48+
[[rule.threat.technique]]
49+
id = "T1203"
50+
name = "Exploitation for Client Execution"
51+
reference = "https://attack.mitre.org/techniques/T1203/"
52+
53+
[rule.threat.tactic]
54+
id = "TA0002"
55+
name = "Execution"
56+
reference = "https://attack.mitre.org/tactics/TA0002/"
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
2+
3+
[metadata]
4+
creation_date = "2025/05/23"
5+
integration = ["network_traffic"]
6+
maturity = "production"
7+
updated_date = "2025/05/23"
8+
9+
[rule]
10+
author = ["Elastic"]
11+
description = """
12+
Identifies potential exploitation of CVE-2025-53770 and CVE-2025-53771 in IIS web servers on SharePoint sites.
13+
Toolshell is an exploit chain that leverages vulnerabilities in SharePoint/IIS to gain unauthorized access
14+
and execute commands. This rule detects HTTP requests that match specific patterns indicative of the exploit attempt.
15+
"""
16+
from = "now-9m"
17+
index = ["logs-network_traffic.http*"]
18+
language = "kuery"
19+
license = "Elastic License v2"
20+
max_signals = 10
21+
name = "Potential Toolshell Initial Exploit (CVE-2025-53770 & CVE-2025-53771)"
22+
risk_score = 47
23+
rule_id = "6e4f6446-67ca-11f0-a148-f661ea17fbcd"
24+
setup = """
25+
### Network Traffic Setup
26+
27+
This rule requires network traffic logs to be collected from HTTP endpoints, specifically focusing on IIS web servers. Ensure that your network traffic logging is configured to capture HTTP request and response details, including request and response headers. Additionally, request bodies are necessary for content-type `application/x-www-form-urlencoded` to detect potential exploit attempts.
28+
"""
29+
severity = "medium"
30+
tags = [
31+
"Domain: Network",
32+
"Tactic: Initial Access",
33+
"Use Case: Exploit Detection",
34+
"Data Source: Network Traffic",
35+
"Data Source: Network Traffic HTTP Logs",
36+
]
37+
timestamp_override = "event.ingested"
38+
type = "query"
39+
query = '''
40+
data_stream.dataset : "network_traffic.http" and
41+
url.path: /_layouts*ToolPane.aspx and
42+
http.request.referrer: *SignOut.aspx and
43+
http.request.headers.content-type: "application/x-www-form-urlencoded" and
44+
network.direction: "ingress" and
45+
http.request.method: "POST" and
46+
request: (*MSOTlPn_Uri* and *DisplayMode*) and
47+
http.request.body.bytes > 5000
48+
'''
49+
50+
[[rule.threat]]
51+
framework = "MITRE ATT&CK"
52+
53+
[[rule.threat.technique]]
54+
id = "T1190"
55+
name = "Exploit Public-Facing Application"
56+
reference = "https://attack.mitre.org/techniques/T1190/"
57+
58+
[rule.threat.tactic]
59+
id = "TA0001"
60+
name = "Initial Access"
61+
reference = "https://attack.mitre.org/tactics/TA0001/"

0 commit comments

Comments
 (0)