ToolShell was a wave of 2025 attacks on company SharePoint servers that stole the servers' secret keys.
This guide is for anyone whose organisation runs its own servers, or who works with the people who do. You do not need a technical background. The main lesson is simple: after a break-in, fixing the flaw is only half the job.
In short
- In July 2025, attackers broke into SharePoint servers that companies run themselves. Microsoft said its online SharePoint service was not affected [1].
- Many attackers first stole the server's secret keys, called machine keys [2][3].
- With those keys, an attacker could get back in even after the server was updated [3].
- Microsoft said it was critical to update, then change the keys and restart the web server [1].
What you will learn
- Explain what happened in the ToolShell attacks in plain words.
- Describe why a stolen server key outlasts a security update.
- Check that your team changes keys after a server break-in.
- Ask whether old servers are still reachable from the internet.
- Fix from the maker (security update or patch)
- a change that closes a known flaw in software.
- Server's secret key (machine key)
- a secret a web server uses to sign and protect the data it trusts.
- Hidden back door file (web shell)
- a small file an attacker places on a web server to run commands on it.
What are the ToolShell attacks?
Think of losing your house keys. Fixing the broken window the burglar used does not help if they also took your keys. You need to change the locks too.
SharePoint is Microsoft software that organisations use to share files and run internal sites. Some run it on their own servers. In July 2025, attackers used flaws in these self-run servers to get in. Microsoft says it saw attempts as early as 7 July 2025 [2].
The security firm Eye Security spotted large-scale attacks on the evening of 18 July 2025 [3]. It scanned over 23,000 SharePoint servers and found more than 400 systems actively compromised [3].
Where the comparison stops working: a missing house key is easy to notice. A copied server key leaves no gap, so the owner may not know it has gone.
Why does it matter?
Many teams treat "we installed the update" as the end of an incident. ToolShell showed why that can leave the door open.
If you look after servers
What could happen: you update a server after a break-in, but the attacker still holds its keys and returns.
Check this: your incident plan includes changing every key and password the server held.
If you manage an IT team or budget
What could happen: an old server nobody has updated in years sits open to the internet.
Check this: you know which servers are past their support date and whether they face the internet.
If you are new to IT work
What could happen: you see "patched" on a ticket and assume the risk is over.
Check this: ask whether any secrets on the server need changing as well.
What does it look like?
Here is a made-up incident ticket. It shows the step that is easy to miss.
Example only. All values are made up.
Ticket EXAMPLE-0000 Server: files.example.invalid [done] Security update installed (1) [done] Back door file removed (2) [ ] Server machine keys changed (3) [ ] Web server restarted after change (4) [ ] Other passwords on server changed (5) Status: CLOSED (FAKE)
- The flaw is closed for new attackers.
- The attacker's file is gone, but it may already have sent the keys out.
- Not done. In a real file, this line would record when the keys were replaced.
- Microsoft says to restart the web server after changing keys [1].
- Other secrets on the server, such as service account passwords, may also have been read.
Why this is risky: the ticket is closed while the attacker may still hold working keys.
The safer way: keep the ticket open until every key and secret the server held has been changed.
How does it work?
Here is the pattern Microsoft, CISA and Eye Security described, in plain steps.
- A flaw is used. Attackers sent crafted requests to self-run SharePoint servers that had not yet been fixed [2].
- A back door file is placed. Attackers uploaded a file named spinstall0.aspx. Microsoft says it held commands to fetch the server's machine key data [2].
- The keys are stolen. The file sent the keys back to the attacker [2].
- The keys open the door again. With the keys, an attacker can create data the server accepts as genuine. Eye Security says this lets an attacker stay in even after patching [3].
- Changing the keys closes it. New keys make anything signed with the old ones useless to the attacker [3].

Microsoft said that after updating, it was critical to change the SharePoint machine keys and restart the web server on every SharePoint server [1]. The US agency CISA advised changing the keys before the update, then again after it [4].
CISA also said that SharePoint Server 2013 and earlier versions are past their support date. It advised taking such servers off the internet if they face it [4].
Microsoft linked the attacks to two China-based state groups and a third China-based group. From 18 July 2025, Microsoft saw that third group using the flaws to deploy ransomware [2].
Machine keys are a kind of non-human identity. They prove to the server that data came from the server itself. Like any secret, once copied they keep working until someone replaces them.
A worked example
This story is made up to show the idea.
Mira Thorne is the IT lead at a regional housing charity. The charity runs its own file-sharing server in a small server room.
After reading about ToolShell, Mira checks her team's last incident. A year ago, an old web server was broken into. The team installed the update, deleted a strange file and closed the ticket.
Mira asks a simple question. What secrets did that server hold? Her team lists them. There is the server's own signing key, a password for a database account and a key for the backup service. None were changed after the break-in.
She does not panic. She schedules a quiet evening and changes each secret one at a time, testing as she goes. She restarts the web server after the key change, following the maker's guidance. Then she checks the activity records available to her for any sign the old secrets were used.
Next, Mira fixes the process. The team's incident checklist gains a new line: "List and change every secret this system held." A ticket cannot close until that line is ticked.
Finally, she finds one server still running software past its support date. It faces the internet. She moves it behind the charity's VPN while she plans a replacement.
Mira's takeaway is short. Updating fixes the hole. Changing the keys locks out whoever already got through.
Myths and mistakes
| What people think | What is true |
|---|---|
| Once the update is installed, we are safe. | Eye Security warned that patching alone is not enough if keys were stolen [3]. |
| Removing the back door file ends the attack. | The file may already have sent the keys out. Change the keys as well. |
| Cloud and self-run SharePoint were both hit. | Microsoft said only self-run SharePoint servers were affected, not SharePoint Online [1]. |
| Old servers are fine if nobody uses them much. | CISA advised taking end-of-life SharePoint servers off the internet [4]. |
| Machine keys never need changing. | Like any secret, a key should be changed when it may have been seen. |
What can I do this week?
- List the servers your organisation runs itself, and which face the internet.
- Mark any running software past its support date.
- Add "change every secret this system held" to your incident checklist.
- Check that security updates for internet-facing servers are installed promptly.
- Pick one important server and list the keys and passwords stored on it.
Checklist
- We know which servers we run ourselves.
- Internet-facing servers get security updates promptly.
- Servers past their support date are off the internet or replaced.
- Our incident checklist includes changing keys and secrets.
- Incident tickets stay open until secrets are changed.
- We keep a list of the keys and secrets each server holds.
- We follow the maker's guidance on restarts after changing keys.
Common questions
Was SharePoint Online affected?
No, according to Microsoft. It said the flaws applied to SharePoint servers that organisations run themselves, and that SharePoint Online in Microsoft 365 was not affected [1]. Organisations that run their own servers needed to act.
Why does a stolen key still work after an update?
The update fixes the flaw used to get in. It does not change the server's keys. Someone holding a copy of the keys can make data the server accepts as genuine, so they may get back in another way [3].
What did Microsoft tell customers to do?
Microsoft told customers to install its updates and make sure its built-in malware scanning was switched on. After that, it said it was critical to change the SharePoint machine keys and restart the web server on all SharePoint servers [1].
How many servers were broken into?
Eye Security scanned over 23,000 SharePoint servers worldwide and found more than 400 systems actively compromised [3]. The true number may differ, because scans only see servers that face the internet. Its later update said over 8,000 systems remained exposed online.
What does this have to do with non-human identities?
A machine key is a secret that a server uses to prove data is its own. It is a non-human identity. The ToolShell lesson applies to every such secret: if it may have been copied, replace it.
Where next?
Ready for the detail? Read the breach analysis: ToolShell SharePoint Exploitation 2025. It sets out the timeline, the flaws involved and the full key-rotation steps [1].
Also useful:
- ASP.NET Machine Key Exposure
- Leaked Secret Response for Beginners
- Web Shells for Beginners
- Zero Day Vulnerabilities for Beginners
Related NHI Mgmt Group resources: Non-Human Identities for Beginners, Secrets Management for Beginners and Key Management for Beginners.
Key terms
- Machine key
- A secret a web server uses to sign and protect data it later trusts.
- Web shell
- A file an attacker places on a web server to run commands on it.
- Patch management
- Finding, testing and installing security updates in good time.
- Credential rotation
- Replacing a key or password with a new one so the old copy stops giving access.
- Persistence
- Ways an attacker keeps access after the first break-in.
- Non-human identity (NHI)
- A digital identity used by software, such as a service account, API key or certificate, rather than a person.
- Ransomware
- Software that locks files and demands payment.
Sources and further reading
- Microsoft Security Response Center, "Customer guidance for SharePoint vulnerability CVE-2025-53770", first published 19 July 2025, updated to 23 July 2025. https://www.microsoft.com/en-us/msrc/blog/2025/07/customer-guidance-for-sharepoint-vulnerability-cve-2025-53770 (accessed 2 Dec 2026).
- Microsoft Threat Intelligence, "Disrupting active exploitation of on-premises SharePoint vulnerabilities", Microsoft Security Blog, 22 July 2025. https://www.microsoft.com/en-us/security/blog/2025/07/22/disrupting-active-exploitation-of-on-premises-sharepoint-vulnerabilities/ (accessed 2 Dec 2026).
- Eye Security, "SharePoint Under Siege", Eye Security Labs, July 2025. https://labs.eye.security/sharepoint-under-siege/ (accessed 2 Dec 2026).
- CISA, "UPDATE: Microsoft Releases Guidance on Exploitation of SharePoint Vulnerabilities", alert, 20 July 2025, updated 6 August 2025. https://www.cisa.gov/news-events/alerts/2025/07/20/update-microsoft-releases-guidance-exploitation-sharepoint-vulnerabilities (accessed 2 Dec 2026).