WannaCry was a 2017 ransomware worm that spread through an old Windows file-sharing flaw.
This guide is for anyone who has heard of WannaCry and wants to know what happened and what it teaches. You do not need to be technical to use the lessons: if your organisation has old computers that nobody updates, the same gap may still be open.
In short
- WannaCry locked files on Windows computers around the world on 12 May 2017 and asked for payment.
- It spread by itself, from computer to computer, using a leaked attack tool called EternalBlue.
- Microsoft had published a fix two months earlier. Computers that were missing it, or too old to get it, were hit.
- The lessons still apply: install updates, replace or fence off old systems, and keep backups away from your network.
What you will learn
- Explain what WannaCry and EternalBlue were in plain words.
- Describe how a worm spreads without anyone clicking.
- Spot the old, unpatched computers that a worm like this needs.
- Ask the right questions about updates and backups at work.
- File-locking attack (ransomware)
- harmful software that locks your files and demands payment to unlock them.
- Self-spreading program (worm)
- harmful software that copies itself to other computers without anyone's help.
- Attack tool (exploit)
- a piece of code built to use a flaw in software.
What is WannaCry?
Think of a cold going round an office. One person brings it in, and it passes from desk to desk without anyone choosing to share it.
WannaCry worked in a similar way. It was ransomware, which means it locked the files on a computer and showed a demand for payment. It was also a worm. Once it was on one computer, it looked for others nearby and copied itself to them.
To jump between computers, it used EternalBlue. This was an exploit, a tool built to use a weak spot in software. The weak spot was in an old version of Windows file sharing, called SMB version 1. SMB is the system Windows uses to share files and printers.[5]
Where the comparison stops working: a cold can reach anyone. WannaCry could only spread to computers that still had the weak spot open. Computers with the fix installed were far less exposed.
Why does it matter?
WannaCry showed how one missed update can stop real services. It is still used to teach why updates matter.
In England, at least 81 of the 236 NHS hospital trusts were affected. NHS England estimated that more than 19,000 appointments were cancelled.[1]
If you run a small business
What could happen: one old computer in the back office lets a worm reach every shared drive.
Check this: ask whether any computer can no longer get Windows updates.
If you are new to IT work
What could happen: an update that is put off "until next month" leaves a known hole open.
Check this: find out how quickly urgent security updates are installed.
If you manage a team or a clinic
What could happen: locked computers mean staff cannot see bookings, records or test results.
Check this: ask whether backups are kept somewhere the office network cannot reach.
Next: Ransomware for Beginners
What does it look like?
Here is a made-up snapshot of a small office's computer list. It shows the kind of gap WannaCry needed.
Example only. All values are made up.
# office computer list (EXAMPLE) PC-RECEPTION-0000 Windows 11 updates: on file sharing v1: off PC-ACCOUNTS-0000 Windows 10 updates: on file sharing v1: off PC-XRAY-FAKE Windows 7 updates: none file sharing v1: ON (1) SERVER-FILES-0000 Windows updates: paused file sharing v1: ON (2) All machines on one network, no internal blocks (3)
- In a real file, this line would show an old computer that no longer gets updates, with the old file sharing switched on.
- Updates paused for months on the shared file server.
- Every computer can talk to every other one, so a worm can move freely.
Why this is risky: a worm only needs one open door. Once inside, it can reach every computer on the same network.
The safer way: install security updates promptly. Turn off the old file sharing where nothing needs it, which Microsoft recommends.[5] Replace computers that no longer get updates, or put them on a separate part of the network.
How does it work?
Here is the story in order, from the fix to the outbreak.
- The fix comes first. On 14 March 2017 Microsoft published a security update for flaws in the old file sharing. It said an attacker could run their own code on a computer, usually without a password.[2]
- The tool leaks. In April 2017 a group calling itself the Shadow Brokers published a set of attack tools. Microsoft said EternalBlue was one of the tools fixed by its March update.[3]
- The worm is released. On 12 May 2017 WannaCry began to spread worldwide.[1] On each new computer it scanned for others with the file-sharing door open, and used EternalBlue to get in.[4]
- Files are locked. It locked files and asked for about 300 US dollars in Bitcoin, a digital currency.[4]
- The spread slows. A security researcher found and switched on a kill switch, a check built into the worm that made it stop locking files.[1]
- The clean-up. Microsoft released fixes even for old versions of Windows it no longer supported, such as Windows XP.[4]


Who was behind it? In December 2017 the UK government named a North Korean group, known as the Lazarus Group. The National Cyber Security Centre judged it highly likely to be responsible.[6] The NHS did not pay the ransom, according to the UK's National Audit Office.[1]
A worked example
Umar Castell is the practice manager at a fictional dental surgery with four rooms. His IT is looked after by a part-time contractor, Dario Ulrich.
Umar reads about WannaCry while training a new receptionist, and asks Dario a simple question. "Could that happen to us?"
Dario makes a list of every computer. Most are up to date. But the computer that runs the X-ray machine still uses Windows 7. The maker of the X-ray software has never said it works on anything newer, so nobody wanted to touch it.
Umar remembers the office cold. One person who is unwell can pass it to everyone. So he asks what can be done today, while they wait for a proper answer.
Dario checks and finds the old file sharing switched on. He turns it off, and the X-ray software still works. Next he moves the X-ray computer onto its own small network, with a firewall that lets it talk only to the image store. A firewall is a filter that decides which network traffic is allowed through.
Then they look at backups. The nightly backup copies to a drive that stays plugged in, so a worm could lock it too. Dario adds a second copy that is kept offline and tests that a file can be restored from it.
Last, Umar writes to the X-ray supplier to ask when a supported version will be ready. He puts the reply date in the diary.
The surgery is not perfect yet. But the one open door now leads to a small room, not the whole building.
Myths and mistakes
| What people think | What is true |
|---|---|
| WannaCry used a brand new flaw nobody could have fixed. | Microsoft published the fix in March 2017, two months before the outbreak.[2] |
| Someone had to click a bad link on every computer. | As a worm, it could move between computers on its own once it was inside a network.[4] |
| It is history, so it does not matter now. | Old computers with the old file sharing switched on may still exist. The lesson about updates still holds. |
| Paying the ransom is the quickest fix. | The NHS did not pay. Tested backups kept off the network are what let you restore.[1] |
| An old computer is fine if it still works. | A computer that no longer gets security updates keeps every known hole open. Replace it or fence it off. |
What can I do this week?
- List every computer and note which ones no longer get security updates.
- Check that automatic updates are switched on and not paused.
- Ask your IT person whether the old Windows file sharing (SMB version 1) is still switched on anywhere.
- Check that at least one backup is kept offline, and try restoring one file from it.
Checklist
- Security updates are installed promptly on every Windows computer and server.
- No computer runs a version of Windows that no longer gets updates, or each one is fenced off.
- The old file sharing (SMB version 1) is switched off where nothing needs it.
- File sharing is blocked from the internet at the network edge.
- The office network is split so one infected computer cannot reach everything.
- At least one backup copy is kept offline or separate from the network.
- Restores from backup are tested on a regular schedule.
- Staff know who to tell straight away if a ransom message appears.
Common questions
What is the difference between WannaCry and EternalBlue?
EternalBlue was the attack tool and WannaCry was the harmful software that used it. EternalBlue opened the door through a flaw in old Windows file sharing. WannaCry walked through that door, locked the files and then used the same tool to reach the next computer.
Is WannaCry still a threat today?
Less than in 2017, but the gap it used can still exist. Fixed and supported computers are far less exposed. The risk stays with old computers that have the old file sharing switched on and no updates. Any that remain are worth finding and fixing.
Why were hospitals hit so hard?
Many NHS bodies had computers that were unpatched or running versions of Windows that were no longer supported. The National Audit Office said they shared the same weakness. It said fairly simple steps, such as managing firewalls facing the internet, could have protected them.
What was the kill switch?
It was a check written into WannaCry that made it stop locking files when a certain condition was met. A security researcher spotted it and switched it on, which slowed the outbreak. Later copies of similar malware may not have such a switch, so it is not a defence to rely on.
Did paying the ransom get files back?
We do not recommend relying on it. Paying gives no promise that files will be unlocked, and it funds criminals. The NHS did not pay. The dependable route back is a tested backup that the attack could not reach. See Ransomware for Beginners.
Where next?
Ready for the detail? Read the practitioner guide: EternalBlue (MS17-010). It goes further into the six flaws the fix covered, how to find computers still using the old file sharing, and how to remove it safely.
Also useful:
- Famous Malware Outbreaks for Beginners
- Network Segmentation for Beginners
- The 3-2-1 Backup Rule for Beginners
Related NHI Mgmt Group resources: SMB Protocol Security and Signing Guide · Patch Management Guide · Vulnerability Management Guide
Key terms
- Ransomware
- Harmful software that locks files and demands payment to unlock them.
- Worm
- Harmful software that copies itself to other computers without anyone's help.
- Exploit
- A piece of code built to use a flaw in software.
- SMB
- The system Windows uses to share files and printers over a network. Version 1 is old and should be switched off.
- Patch
- An update from the software maker that fixes a flaw.
- Kill switch
- A built-in check that makes harmful software stop when a condition is met.
- Bitcoin
- A digital currency, often asked for in ransom demands.
Sources and further reading
- Investigation: WannaCry cyber attack and the NHS. National Audit Office, 27 October 2017. https://www.nao.org.uk/reports/investigation-wannacry-cyber-attack-and-the-nhs/, accessed 28 Nov 2026.
- Microsoft Security Bulletin MS17-010: Security Update for Microsoft Windows SMB Server (4013389). Microsoft, 14 March 2017. https://learn.microsoft.com/en-us/security-updates/securitybulletins/2017/ms17-010, accessed 28 Nov 2026.
- Protecting customers and evaluating risk. Microsoft Security Response Center, 15 April 2017. https://www.microsoft.com/en-us/msrc/blog/2017/04/protecting-customers-and-evaluating-risk, accessed 28 Nov 2026.
- Alert TA17-132A: Indicators Associated With WannaCry Ransomware. CISA (US Cybersecurity and Infrastructure Security Agency), 2017. https://us-cert.cisa.gov/ncas/alerts/TA17-132A, accessed 28 Nov 2026.
- How to detect, enable and disable SMBv1, SMBv2 and SMBv3 in Windows. Microsoft Learn, Microsoft. https://learn.microsoft.com/en-us/windows-server/storage/file-server/troubleshoot/detect-enable-and-disable-smbv1-v2-v3, accessed 28 Nov 2026.
- Foreign Office Minister condemns North Korean actor for WannaCry attacks. UK Government (GOV.UK), 19 December 2017. https://www.gov.uk/government/news/foreign-office-minister-condemns-north-korean-actor-for-wannacry-attacks, accessed 28 Nov 2026.