← All articles SOC Operations

CVE-2025-53770 SharePoint ToolShell RCE: Detection for On-Prem

By Ammar Khan, CEH · October 24, 2026 · CybernytronX Research
CVE-2025-53770 SharePoint ToolShell RCE: Detection for On-Prem

On 19 July 2025 Microsoft published emergency guidance for a deserialization vulnerability in on-premises SharePoint Server tracked as CVE-2025-53770, the exploit chain publicly nicknamed "ToolShell". The flaw lets an unauthenticated attacker POST a crafted __VIEWSTATE payload to /_layouts/15/ToolPane.aspx and execute code in the w3wp.exe worker process, and Microsoft confirmed it was exploited in the wild against internet-facing farms. This guide walks SOC analysts and platform owners through the affected builds, the post-exploitation pattern Microsoft and CISA documented, and concrete Sigma, YARA and Suricata logic you can deploy today to find both the initial request and the MachineKey exfiltration that follows.

Background: what ToolShell actually is

CVE-2025-53770 is a deserialization of untrusted data flaw (CWE-502) in Microsoft SharePoint Server 2016, 2019 and Subscription Edition. An unauthenticated remote attacker can send a specially crafted request to a ToolPane endpoint and cause the SharePoint worker process to deserialize attacker-controlled data, resulting in remote code execution in the context of the IIS application pool identity. Microsoft's MSRC update guide for CVE-2025-53770 rates it Critical with a CVSS 3.1 base score of 9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

The vulnerability was chained with CVE-2025-53771, an information-disclosure/path issue used to harvest the ASP.NET ValidationKey and DecryptionKey from the farm. Once those keys are known, the attacker can forge __VIEWSTATE blobs that the target SharePoint server will happily deserialize — persistence that survives patching unless the keys are rotated. Microsoft's Threat Intelligence blog on the SharePoint exploitation documents this MachineKey-theft pattern as the distinctive ToolShell tradecraft.

"Microsoft is aware of active exploitation of CVE-2025-53770 in internet-facing SharePoint Server deployments." — MSRC update guide, July 2025. CISA added the CVE to its Known Exploited Vulnerabilities catalog with a remediation due date for U.S. federal agencies.

Affected versions and the patch matrix

All supported on-premises SharePoint Server builds that expose the ToolPane endpoint to untrusted networks are in scope. SharePoint Online (Microsoft 365) is not affected because Microsoft already applied the service-side fix. The table below reflects the July 2025 and August 2025 security updates published by Microsoft; always verify against the SharePoint Server 2019 security update KB5002768 and the corresponding Subscription Edition and 2016 KBs linked from the MSRC guide.

If you cannot patch immediately, Microsoft's advisory recommends enabling AMSI (the SharePoint AMSI feature) and Defender AV on the SharePoint servers, and blocking ToolPane.aspx at the edge. Neither is a substitute for the CU.

Attacker TTPs mapped to MITRE ATT&CK

Public reporting from Microsoft, Palo Alto Unit 42 and CISA describes a consistent chain. The table maps the observed steps to ATT&CK technique IDs so you can pivot from detection logic to threat hunting queries.

Initial access and execution

Credential access and persistence

Detection: Sigma, YARA and Suricata

The rules below are written to compile against current Sigma, YARA 4.x and Suricata 7.x. Tune the process-image and path lists to your environment before enabling in production.

Sigma — suspicious child process of w3wp.exe

title: Suspicious Child Process of SharePoint w3wp.exe
id: 4f1c2a7e-8b3d-4c9a-9e21-7d6f0a1b2c33
status: experimental
description: Detects command shells or scripting hosts spawned by the SharePoint IIS worker process, consistent with ToolShell post-exploitation.
logsource:
  category: process_creation
  product: windows
detection:
  selection_parent:
    ParentImage|endswith: '\\w3wp.exe'
  selection_child:
    Image|endswith:
      - '\\cmd.exe'
      - '\\powershell.exe'
      - '\\pwsh.exe'
      - '\\cscript.exe'
      - '\\wscript.exe'
      - '\\mshta.exe'
  filter_maintenance:
    CommandLine|contains:
      - 'Get-SPShellAdmin'
      - 'Add-SPSolution'
  condition: selection_parent and selection_child and not filter_maintenance
falsepositives:
  - Legitimate SharePoint timer jobs or custom solutions
level: high
tags:
  - attack.t1190
  - attack.t1059.001
  - attack.t1059.003

YARA — ToolShell viewstate webshell indicators

rule SharePoint_ToolShell_ViewState_Webshell
{
  meta:
    author = "CybernytronX"
    description = "Detects ASPX webshells and viewstate gadget strings associated with CVE-2025-53770"
    reference = "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2025-53770"
    date = "2025-07-22"
  strings:
    $aspx   = "<%@ Page Language=\"C#\"" ascii nocase
    $vs1    = "__VIEWSTATE" ascii
    $g1     = "TypeConfuseDelegate" ascii
    $g2     = "TextFormattingRunProperties" ascii
    $g3     = "ObjectDataProvider" ascii
    $g4     = "System.Windows.Data" ascii
    $sp1    = "Microsoft.SharePoint" ascii
  condition:
    $aspx and $vs1 and 2 of ($g*) and $sp1 and filesize < 2MB
}

Suricata — ToolPane POST with viewstate body

alert http any any -> $HOME_NET any ( \
  msg:"Possible SharePoint ToolShell CVE-2025-53770 exploitation attempt"; \
  flow:established,to_server; \
  http.method; content:"POST"; \
  http.uri; content:"/_layouts/15/ToolPane.aspx"; nocase; \
  http.request_body; content:"__VIEWSTATE"; nocase; \
  classtype:web-application-attack; \
  sid:2025071901; rev:1; )

The Suricata rule is intentionally coarse — it will fire on legitimate ToolPane edits too. Pair it with a threshold in threshold.config (e.g. threshold gen_id 1, sig_id 2025071901, type limit, track by_src, count 3, seconds 60) to cut noise from legitimate site authors.

Mitigation: patch, rotate keys, and harden IIS

Patching is necessary but not sufficient. Because ToolShell steals MachineKeys, any farm that may have been exposed must treat those keys as compromised.

  1. Install the current CU for your SharePoint build from the MSRC advisory, including language packs. Re-run Windows Update until Get-SPProduct -Local reports the expected patch level on every farm member.
  2. Rotate the ASP.NET MachineKey per Microsoft's guidance in the SharePoint security update guidance. Use Update-SPMachineKey and then Invoke-SPOMachineKeyValidation to push the new keys to all servers in the farm.
  3. Enable AMSI on every SharePoint server (Enable-SPManagedAccountAMSI or the equivalent feature in Central Administration) so that malicious viewstate payloads are scanned at deserialization time.
  4. Block the ToolPane endpoint at the edge if your site owners do not use it: ToolPane.aspx is rarely needed from the public internet. A WAF or IIS request-filtering rule that returns 403 for /_layouts/15/ToolPane.aspx from untrusted networks removes the attack surface entirely.
  5. Hunt for webshells under C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\TEMPLATE\LAYOUTS and _vti_bin. Compare file hashes against a known-good baseline; any .aspx file modified after 1 July 2025 is suspect.
  6. Review IIS logs for POSTs to ToolPane.aspx with response code 200 and large request bodies (> 50 KB) from non-corporate ASNs.

Why this matters for defenders

ToolShell is a useful case study in why "patch the CVE" is an incomplete response. The exploit chain is two vulnerabilities, but the durable damage is the stolen MachineKey: once an attacker has it, they can forge viewstate on a fully patched farm, and the only reliable remediation is key rotation plus webshell eviction. Security teams that patched in July 2025 but did not rotate MachineKeys should assume their farm is still forgeable. CISA's KEV listing and Microsoft's Threat Intelligence blog both emphasise the same point: the exploitation is opportunistic and internet-wide, not targeted at a single sector, so any on-prem SharePoint farm with a public IP is in scope. The detection logic above is designed to catch both the initial ToolPane request and the post-exploitation child processes that follow, giving SOC analysts a chance to contain before the attacker pivots into the corporate network.

Sources

Frequently Asked Questions

Is SharePoint Online affected by CVE-2025-53770?

No. Microsoft applied the fix service-side for SharePoint Online in Microsoft 365. The vulnerability affects on-premises SharePoint Server 2016, 2019 and Subscription Edition deployments that expose the ToolPane endpoint. Verify your build against the MSRC advisory.

We patched in July 2025 — are we safe from ToolShell?

Not necessarily. If your farm was internet-facing before patching, assume the ASP.NET MachineKey was harvested. Rotate the MachineKey with Update-SPMachineKey, then run Invoke-SPOMachineKeyValidation to confirm propagation, and sweep for webshells under LAYOUTS and _vti_bin.

Does blocking ToolPane.aspx break legitimate SharePoint functionality?

ToolPane is used by site owners editing web parts. Most enterprises do not need it exposed to the public internet. Block it at the edge for untrusted networks and allow it only from the corporate VPN or admin jump hosts. Test with a pilot site before broad rollout.

What log sources do I need to detect ToolShell?

At minimum: IIS access logs from every SharePoint WFE (for POSTs to ToolPane.aspx with large viewstate bodies), Windows Security 4688 / Sysmon Event ID 1 on the SharePoint servers (for w3wp.exe child processes), and file-integrity monitoring on the LAYOUTS directory. Sysmon Event ID 11 (file create) helps catch dropped .aspx webshells.

Is the Suricata rule in this article production-ready?

It is a starting point. The rule fires on any POST to ToolPane.aspx with a viewstate body, which includes legitimate edits. Apply a threshold in threshold.config and pair it with the Sigma process-creation rule for higher-fidelity alerting.

What should we do if we find a webshell?

Isolate the WFE from the network, capture volatile evidence (memory image, IIS logs, w3wp.exe process tree), rotate MachineKeys and any service-account credentials that touched the farm, and follow your incident-response plan. CISA's KEV listing and Microsoft's blog provide the baseline scoping guidance.

Need expert help with this?

If your SharePoint farm was internet-facing before the July 2025 patch window, a clean patch scan is not proof of safety. CybernytronX can run a focused ToolShell compromise assessment — MachineKey exposure review, webshell sweep, IIS log hunting — and help you build the SOC detections above into your SIEM. Our Ethereon AI threat-detection platform can ingest SharePoint and Sysmon telemetry and surface the w3wp.exe anomalies that matter. Reach the team at cybernytronx.com/contact.html.

AK

Ammar Khan — Founder, CybernytronX

Certified Ethical Hacker (CEH), B.S. Cybersecurity, Google Certified. 5+ years pentesting, creator of Ethereon AI threat detection. Has remediated 50+ environments and recovered 20+ compromised domains. Hire CybernytronX →

← Back to all articles