Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
WannaCry spread itself across the internet on 12 May 2017 using a leaked intelligence agency exploit, reached around 200,000 machines, and disrupted a third of NHS trusts in England.

How the WannaCry Attack Worked
On the morning of Friday 12 May 2017, ransomware began appearing on computers worldwide without anyone opening an attachment. WannaCry was a worm as well as ransomware, and that combination is why it reached roughly 200,000 machines across 150 countries within two days. It is also the incident that put cybersecurity on the front page of every British newspaper, because of what it did to the National Health Service.
WannaCry spread using EternalBlue, an exploit for a flaw in version 1 of the Server Message Block protocol, tracked as CVE-2017-0144. The exploit had been developed by the United States National Security Agency and was published by the group calling itself the Shadow Brokers on 14 April 2017.
Microsoft had already issued a patch. Bulletin MS17-010 was released on 14 March 2017, two months before the outbreak and a month before the exploit became public. The attack therefore did not use a zero-day; it used an unapplied patch, which is a very different kind of failure.
Once a host was infected, the malware installed the DOUBLEPULSAR backdoor, encrypted files with a 2048-bit RSA and AES combination, displayed a ransom demand of 300 US dollars in Bitcoin rising to 600 after three days, and scanned both the local network and random internet addresses on port 445 for further victims. No user interaction was needed at any point.
Before encrypting, the malware attempted to resolve a long, meaningless domain name. If the lookup succeeded, it stopped. The British researcher Marcus Hutchins registered the domain on the afternoon of 12 May, which halted propagation globally within hours.
The mechanism was probably intended as a sandbox check, since many analysis environments answer every DNS query. Its existence is a reminder that significant outcomes can turn on implementation details rather than on defensive capability, and that organisations which block all outbound DNS except through a proxy inadvertently prevented their own machines from reaching the switch.
The National Audit Office investigation, published in October 2017, set out the English figures: 81 of the 236 hospital trusts were disrupted, 34 of them locked out of devices, along with 603 primary care and other NHS organisations including 595 general practices. More than 19,000 appointments and operations were cancelled, five accident and emergency departments diverted patients, and the Department of Health and Social Care later estimated the cost at £92 million, comprising roughly £19 million in lost output and £73 million in IT restoration.
The NAO was direct about the cause. NHS Digital had issued warnings in March and April 2017 about the need to patch, and they had not been acted upon. None of the 88 trusts NHS Digital had assessed had passed the Cyber Essentials Plus standard. A commonly repeated claim that the NHS fell because of Windows XP is largely wrong: the great majority of affected devices ran unpatched Windows 7.
In December 2017 the Foreign Office and the NCSC publicly attributed the attack to North Korea, specifically the group known as Lazarus. The financial return was negligible, around 140,000 US dollars in total, which is one reason some analysts regard the release as poorly controlled rather than carefully planned.
The incident reshaped UK public sector security policy. NHS organisations were required to move to supported operating systems, the Data Security and Protection Toolkit replaced the previous governance regime, and the central NHS security operations centre was expanded. More broadly, it established three propositions now treated as baseline:
The uncomfortable part of the legacy is that unpatched SMBv1 and exposed port 445 are still found during assessments years later, usually on a forgotten server that nobody owns. Finding those systems before someone else does is a core objective of our Penetration Test Services.
No. Microsoft released the patch for the underlying SMBv1 vulnerability in MS17-010 on 14 March 2017, two months before the outbreak and a month before the exploit was published by the Shadow Brokers. Organisations that had applied the update were protected. The incident is a patching and asset management failure rather than a case of an unknown vulnerability.
Before encrypting, the malware tried to resolve a specific nonsense domain name and stopped if the lookup succeeded, most likely as a check for analysis sandboxes. A British researcher registered that domain on 12 May 2017, which halted worldwide propagation within hours. Machines that could not reach external DNS directly were unaffected by the switch and continued to encrypt.
Largely no, despite the widespread claim. The National Audit Office found that the great majority of affected NHS devices were running unpatched Windows 7 rather than Windows XP, which accounted for a small proportion of the estate. The real cause was that the available patch had not been deployed, despite warnings issued by NHS Digital in March and April 2017.
The same pattern remains viable wherever a remotely exploitable service is exposed and unpatched. Assessments still find SMBv1 enabled and port 445 reachable in enterprise networks years later, usually on unowned legacy systems. The defences are unchanged: accurate asset inventory, prompt patching of network-facing services, disabling obsolete protocols, and segmentation to contain automated spread.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.