WannaCry is a ransomware worm that spread worldwide on 12 May 2017, encrypting files on unpatched Windows computers and demanding $300 in bitcoin. It spread on its own using EternalBlue, an exploit for a flaw in the Windows SMB file-sharing protocol, so one infected computer could infect others on the same network without anyone clicking anything.
Key takeaways
- WannaCry was a self-spreading ransomware worm, not a phishing campaign — it used the EternalBlue SMB flaw to move between computers.
- Microsoft had released the MS17-010 patch two months earlier, on 14 March 2017, yet unpatched systems were still hit in huge numbers.
- A researcher stopped the first outbreak within hours by registering a hidden kill-switch domain, but later variants removed it.
On Friday 12 May 2017, computers around the world started locking up within hours of each other. Files were encrypted, screens showed a ransom demand, and hospitals, car factories and telecoms were hit at the same time. Nobody had to click a bad link. WannaCry spread by itself.
What is WannaCry?
WannaCry is a ransomware worm that encrypts files on a Windows computer and demands payment in bitcoin to decrypt them. It is also known as WannaCrypt, Wanna Decryptor and WCry.
Most ransomware arrives by phishing email or a malicious download. WannaCry was different: it carried its own transport mechanism. Once it infected one computer, it scanned the local network and the wider internet for other vulnerable Windows machines and infected them too, without any human action.
That self-spreading design is why the outbreak moved so fast. CISA reported tens of thousands of infections in more than 150 countries within hours, and later estimates put the total above 200,000 systems in a day, with some counts above 300,000 computers overall. For a wider view of how ransomware attacks unfold, see our guide to spear phishing, which is the delivery method most modern ransomware still relies on.
How does WannaCry work?
WannaCry works in three stages: it checks a hidden kill-switch domain, encrypts the victim's files, and then spreads to other computers using the EternalBlue exploit. Each stage happens automatically.
When the malware first runs, it tries to contact a long, nonsensical domain name hard-coded in its code. If that domain exists, the worm stops. If it does not exist, the ransomware proceeds to encrypt documents, photos, databases and other files, appending extensions such as .WNCRY or .WNRY, and displays a ransom note demanding $300 in bitcoin, later rising to $600.
It also tries to delete backup copies. Microsoft's analysis, cited in later write-ups, found WannaCry running commands to delete volume shadow copies, which is why offline backups matter so much against ransomware.
What is EternalBlue and how did it spread WannaCry?
EternalBlue is an exploit for a flaw in Microsoft's implementation of the Server Message Block (SMB) protocol, specifically SMBv1. It lets an attacker run code remotely on a vulnerable Windows computer.
The flaw is catalogued as CVE-2017-0144, and Microsoft fixed it in Security Bulletin MS17-010 on 14 March 2017, about two months before WannaCry struck. EternalBlue was developed by the US National Security Agency and was stolen and leaked by a group called the Shadow Brokers in April 2017.
SMB is the protocol Windows uses to share files and printers on a network, usually over TCP port 445. Because the flaw allowed remote code execution, a worm could infect a machine simply by sending it a crafted SMB packet — no password, no click and no download required. That is what made WannaCry a worm rather than ordinary ransomware.
What happened on 12 May 2017?
The outbreak began on the morning of 12 May 2017 and spread across more than 150 countries within hours. It was halted the same day when a researcher registered the kill-switch domain.
CISA's alert says initial reports began around 4:00 AM EDT on 12 May 2017. By that afternoon, the attack had hit the UK's National Health Service, Spain's Telefonica, car maker Renault, shipping firm FedEx and many others. The UK National Audit Office later found at least 81 of the 236 NHS trusts in England were affected, along with 595 GP practices, and estimated that more than 19,000 appointments were cancelled.
That same day, researcher Marcus Hutchins, then known online as MalwareTech, noticed the unregistered domain in the malware's code and registered it for about $10.69. Computers that could reach the domain stopped encrypting and spreading, which slowed the outbreak dramatically within hours. Microsoft then released patches on 13 May 2017 even for out-of-support systems such as Windows XP, Windows 8 and Windows Server 2003.
WannaCry vs other ransomware: what made it different?
Most ransomware needs a person to make a mistake. WannaCry needed only an unpatched computer. That single difference explains both its speed and its lesson.
| WannaCry | Typical ransomware | |
|---|---|---|
| Delivery | Self-spreading worm via EternalBlue | Phishing email, malicious download or stolen credentials |
| Needs a click? | No | Usually yes |
| Speed | 200,000+ systems in about a day | Spreads as fast as victims act |
| Ransom | $300 in bitcoin, rising to $600 | Varies widely, often far higher today |
| Main fix | MS17-010 patch, disable SMBv1 | Phishing defenses, MFA, endpoint protection |
| Kill switch | Yes, in the original version | Rarely |
Later ransomware groups learned from WannaCry but went the other way: instead of noisy worms, they use stolen credentials and quiet lateral movement, then encrypt everything at once. The defense is the same in both cases — patch quickly, segment networks and keep offline backups.
Who was behind WannaCry?
The attack is widely attributed to North Korea, specifically the Lazarus Group, although attribution was initially unconfirmed. The US government later publicly attributed WannaCry to North Korea.
CISA's original alert noted that the US government had updated it to reflect public attribution. Akamai's summary of the attack likewise describes it as believed to have been launched by North Korea or the Lazarus Group. Attribution in cyberattacks is rarely proven in court, but the technical and intelligence evidence pointed in that direction, and the US Department of Justice later charged a North Korean programmer in connection with WannaCry and other attacks.
Is WannaCry still a threat in 2026?
Yes, in a narrower sense. The original outbreak is over, but EternalBlue remains a live threat on unpatched systems, and later WannaCry variants removed the kill switch.
Akamai notes that newer versions of WannaCry removed the kill-switch domain, so registering a domain no longer stops them. Any Windows system that still runs SMBv1 without the MS17-010 patch — often an old server, a medical device, an industrial controller or a forgotten virtual machine — can still be infected by EternalBlue-based malware, including later worms such as NotPetya, which also used the exploit in June 2017.
That is why security teams still scan for MS17-010. The vulnerability is old, the patch is old, and the risk now comes from systems nobody remembers to patch. If you run a small business, our small business cybersecurity checklist covers patching and backups alongside the other basics.
How do you protect against WannaCry?
Patching is the single most important step, followed by disabling SMBv1, blocking port 445 at the edge, and keeping offline backups. CISA's alert lists these as its recommended prevention steps.
- Apply MS17-010. Install the March 2017 update on every Windows system, including old ones. Microsoft released emergency patches for Windows XP and Server 2003 for a reason.
- Disable SMBv1. Modern Windows does not need it. Turn it off on servers and workstations unless a legacy application genuinely requires it.
- Block port 445 externally. SMB should never be reachable from the internet. Block TCP 445 at your firewall, and consider blocking it between internal segments too.
- Segment your network. If one machine is infected, segmentation limits how many others it can reach.
- Back up offline and test restores. WannaCry tried to delete shadow copies, so backups that are always connected can be encrypted too.
- Do not pay the ransom. CISA warned that paying does not guarantee your files will be released — it only guarantees the attackers get your money.
What should you do if you are infected with WannaCry?
Disconnect the infected computer from the network immediately, do not pay, and restore from a clean offline backup after the system is cleaned. Speed limits how far the worm spreads.
- Isolate the machine. Unplug the network cable or turn off Wi-Fi so it cannot infect others.
- Do not pay the ransom. There is no guarantee of decryption, and payment funds further attacks.
- Report it. In the US, report ransomware to the FBI's Internet Crime Complaint Center at ic3.gov, and tell your IT team or managed provider.
- Clean and patch before reconnecting. Remove the malware, apply MS17-010, disable SMBv1, then restore files from a backup made before the infection.
- Check the rest of the network. Scan other machines for the same vulnerability, because a worm rarely infects just one host.
The bottom line
WannaCry proved that a single unpatched flaw can become a global incident in hours, without any phishing at all. The patch existed for two months before the outbreak, yet hundreds of thousands of systems were still vulnerable.
The lesson has not changed: patch quickly, retire unsupported systems, disable protocols you do not need, and keep backups you can actually restore. CISA's WannaCry alert lists the same prevention steps, starting with the MS17-010 patch.
Check your own exposure with the free security headers checker.
Then work through the patching and backup steps in our small business cybersecurity checklist.
Frequently asked questions
What is WannaCry in simple terms?
WannaCry is ransomware that also acts like a worm. It locks your files by encrypting them and demands bitcoin to unlock them, and it can spread from one computer to another on its own, without anyone opening an attachment or clicking a link.
How did WannaCry spread?
It spread through EternalBlue, an exploit for a flaw in the Windows SMBv1 file-sharing protocol. A vulnerable computer exposed on a network could be infected remotely, and the worm then scanned for more vulnerable computers to infect.
How much ransom did WannaCry demand?
The original ransom was $300 in bitcoin, rising to $600 if it was not paid within a set time. CISA and other authorities advised victims not to pay, because payment did not guarantee the files would be released.
Is WannaCry still a threat today?
The original outbreak was stopped, but the underlying SMB flaw still matters. Unpatched systems remain vulnerable to EternalBlue-based attacks, and later WannaCry variants removed the kill switch, so patching and disabling SMBv1 are still important.
What was the WannaCry kill switch?
Before encrypting files, WannaCry checked whether a long, unregistered domain name existed. Researcher Marcus Hutchins registered that domain on 12 May 2017, and infected computers that could reach it stopped spreading the worm.
Did WannaCry affect the NHS?
Yes. The UK National Audit Office found at least 81 of the 236 NHS trusts in England were affected, along with 595 GP practices, and more than 19,000 appointments were estimated to have been cancelled.
How do I protect against WannaCry?
Install the MS17-010 patch, keep Windows updated, disable SMBv1 if you do not need it, block SMB port 445 at the network edge, segment your network, and keep offline backups you have tested.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against CISA alert TA17-132A, Microsoft Security Bulletin MS17-010 as cited by CISA, and the UK National Audit Office findings on the NHS impact.
How we write and fact-check →