Skip to main content

Wolfcore Cyber Security

How EternalBlue (MS17-010) works: the SMBv1 flaw behind WannaCry and how to stay protected

Written by Ruben Selby, founder and penetration tester at Wolfcore. Last reviewed 18 November 2026.

In one sentence: EternalBlue is the name for an attack on a flaw in the old Windows file-sharing protocol SMBv1 that let an attacker run their own code on an unpatched machine with no password, and it let the WannaCry ransomware spread by itself in 2017.

What it is

Server Message Block (SMB) is how Windows shares files and printers. Version 1 is the oldest. On 14 March 2017 Microsoft published security bulletin MS17-010, rated Critical for all supported Windows releases at the time. It says the most severe of the flaws could allow remote code execution if an attacker sends specially crafted messages to an SMBv1 server. The bulletin covers six CVEs, CVE-2017-0143 to CVE-2017-0148. Microsoft stated it had identified no mitigating factors.

“EternalBlue” is the name given to an exploit for these flaws. MITRE’s profile of WannaCry describes the ransomware as having worm-like features that spread across a network using the SMBv1 exploit EternalBlue.

This page explains the mechanism at the level a manager or IT lead needs. It does not contain exploit code.

How it works

  1. Find a target. The attacker looks for machines answering on SMB, TCP port 445. MITRE technique T1210, Exploitation of Remote Services, describes this pattern: look for vulnerable or unpatched services, especially for lateral movement inside networks. It names SMB and RDP among the well-known examples.
  2. Send crafted SMBv1 messages. The unpatched server mishandles specially crafted requests, per Microsoft’s bulletin. No username or password is needed.
  3. Run code on the machine. The flaw lets the attacker execute their own code remotely. In the WannaCry case that code was the ransomware.
  4. Spread. Because the worm scans for the next vulnerable machine, one infected PC reaches others without anyone clicking anything. The attacker’s goal in WannaCry was to encrypt files and demand payment.

What the patch does: Microsoft’s update corrects how SMBv1 handles those requests. What it does not do: remove SMBv1 itself. That is a separate step.

Who it affects and how badly

Any organisation with unpatched Windows systems that expose SMBv1 on a reachable network, or that run old systems that no longer get updates. Sites that keep old Windows machines for specialist equipment are the ones most likely to still have exposure.

  • Small business: one unpatched PC or old server can encrypt shared files. Worst case: days of downtime and no backup.
  • Mid-sized: a flat network lets it spread to every Windows machine. Worst case: a whole site stopped.
  • Regulated and public sector: worst case is cancelled services and regulator scrutiny.

Real examples

The National Audit Office investigated the WannaCry attack on the NHS in England. Its report says NHS Digital issued critical alerts in March and April 2017 warning organisations to patch. On 12 May 2017, NHS England identified 45 organisations including 37 trusts as infected, and in total at least 81 of 236 trusts were affected, plus a further 603 primary care and other organisations, including 595 GP practices. NHS England identified 6,912 appointments cancelled and estimated over 19,000 would have been cancelled in total. The NAO said all infected organisations had unpatched or unsupported Windows operating systems, and that managing firewalls facing the internet would have protected them whether or not they had patched. Source: https://www.nao.org.uk/reports/investigation-wannacry-cyber-attack-and-the-nhs/

Diagram

Infected PCUnpatched, port 445: infectedUnpatched, port 445: infectedPatched, SMBv1 off: safeNo password or click needed

What we check on a test

On an internal test we check which hosts answer on port 445, whether SMBv1 is enabled, and whether MS17-010 patches are missing, using safe non-destructive checks. We look at network design: whether a workstation can reach every server over SMB, and whether old systems sit on the same network as modern ones. On an external test we check that 445 is not reachable from the internet. We do not run destructive exploits, and any exploit-level check is agreed in writing before it happens.

Rules and regulators

  • UK: the NAO report above is the UK public record of the NHS impact. For the patching rule that Cyber Essentials sets, see cyber-essentials-14-day-patch-rule.
  • EU, US and Armenia: breach-notification and security-of-processing rules (for example GDPR Article 32 in the EU, state breach laws and sector rules in the US, and the Personal Data Protection Law in Armenia) apply if ransomware takes or exposes personal data. Check which apply to you; we have not summarised them here.

How to detect it

  1. Run a vulnerability scan with an up-to-date scanner, such as Nessus, and look for MS17-010 findings. The free Wolfcore scan covers internet-facing web items only.
  2. Ask Windows whether SMBv1 is on. Microsoft documents Get-SmbServerConfiguration | Format-List EnableSMB1Protocol for this.
  3. Check firewall rules for port 445 reaching the internet, and block it.
  4. Inventory old Windows systems that no longer receive updates.
  5. Watch for sudden file renames, ransom notes, or many machines talking SMB to each other unexpectedly.

How to fix or prevent it

  1. Install the MS17-010 update or later cumulative updates on every Windows system that can still be patched.
  2. Disable SMBv1. Microsoft says SMBv1 is not installed by default on Windows Server 2019 and later.
  3. Block TCP 445 at the internet border, as the NAO noted internet-facing firewall management would have protected organisations.
  4. Retire or isolate systems that cannot be patched, on their own network segment.
  5. Segment the network so a workstation cannot reach every file server.
  6. Keep offline, tested backups.

FAQ

What is MS17-010? Microsoft’s March 2017 security bulletin for flaws in SMBv1.

Which flaw does EternalBlue refer to? An exploit for the SMBv1 flaws fixed in MS17-010, used by WannaCry according to MITRE.

Would a firewall have helped the NHS? The NAO said managing internet-facing firewalls would have guarded organisations against infection.

Related terms

Back to the Hacking Techniques hub. Related entries: port 445 smb, smb signing, ransomware, patch management, cyber essentials 14 day patch rule, how to check which ports are open on your network.

Sources opened for this entry

Microsoft Security Bulletin MS17-010, MITRE ATT&CK S0366 (WannaCry) and T1210, NAO WannaCry report, Microsoft Learn SMBv1 detect and disable page.

See also: Port 4444 Open: Why It Is Flagged and How to Respond, Event ID 5140 and 5145: Network Share Access Explained.

How Wolfcore helps

A Wolfcore penetration test finds this the way an attacker would, by hand, not with a scanner. See penetration testing and start with the free web vulnerability scan. Prices are on the pricing page. Many intrusions start with a stolen or guessed login, so it also pays to test your staff with a phishing simulation or try Phishy with the free trial.

Wolfcore

Would your staff click a phishing email?

Run a real, safe phishing test on your team with Phishy. Free for 14 days, up to 10 staff, no card. We help you set it up.

Start a free phishing testFree website security scanor book a 30 minute call