INFRA-WANNACRY-2017
Windows · SMB · Microsoft Windows (SMBv1 / EternalBlue)
Résumé
On the morning of 12 May 2017, WannaCry became the fastest-spreading ransomware in history, encrypting files on more than 230,000 Windows machines across 150-plus countries in a single day and demanding a few hundred dollars in Bitcoin per machine. It needed no phishing and no clicks. It was a worm: it spread itself from one unpatched computer to the next using EternalBlue, an exploit for a flaw in Windows' ancient SMBv1 file-sharing protocol that the US National Security Agency had quietly stockpiled and that a group called the Shadow Brokers had leaked weeks earlier. Microsoft had shipped a patch (MS17-010) two months before, but the unpatched and the end-of-life machines, most famously across the UK's National Health Service, which diverted ambulances and cancelled thousands of operations, were swept up regardless. The global rampage was then halted almost by accident when a 22-year-old researcher registered a single gibberish domain for about ten dollars, not yet knowing it was the worm's kill switch. WannaCry is the textbook lesson in patching fast and killing legacy protocols, with a stranger-than-fiction ending.
How it worked
WannaCry was two old ideas bolted together: ransomware and a network worm.
The ransomware part was ordinary. Once on a machine it encrypted documents, photos, and databases, dropped a red ransom note demanding around $300 in Bitcoin (rising to $600, then threatening deletion), and locked the screen. Ransomware like this was already common by 2017.
What made WannaCry catastrophic was the worm wrapped around it. It carried two leaked NSA cyberweapons: EternalBlue, an exploit for a remote-code-execution flaw in the SMBv1 file-sharing protocol (CVE-2017-0144), and DoublePulsar, a backdoor it installed to run its payload. With these, an infected machine scanned its own network and the wider internet for other Windows hosts with port 445 open, exploited them with no user interaction at all, and copied itself across. One unpatched laptop plugged into a hospital network could seed the whole estate in minutes. The exploit had been a zero-day hoarded by the NSA for several years; when the Shadow Brokers dumped it publicly in April 2017, it became a weapon anyone could fire, and a month later someone did.
The damage
WannaCry did not steal data or target anyone in particular; it just burned through everything reachable, which made its victim list almost random and global. Spain's Telefónica, FedEx, the German rail operator Deutsche Bahn, Renault and Nissan car plants (which halted production), Russia's interior ministry, and universities in China all went down.
The defining casualty was the UK's National Health Service. WannaCry knocked out computers, MRI scanners, and blood-storage fridges across at least 80 hospital trusts and hundreds of GP surgeries. Ambulances were diverted, an estimated 19,000 appointments and operations were cancelled, and the UK's National Audit Office later put the direct cost to the NHS at about £92 million, roughly £20 million in lost output during the week of the attack and £72 million on IT recovery afterward. The NAO's verdict was damning: the attack was unsophisticated and entirely preventable, and NHS bodies had been warned about exactly this SMB vulnerability weeks earlier. So severe was the outbreak that Microsoft took the rare step of shipping an emergency patch for Windows XP, Windows 8, and Server 2003, operating systems it had already stopped supporting. Worldwide damage estimates run from $4 billion to $8 billion.
The accidental kill switch
WannaCry's global spread was stopped, by luck, within hours, by a then-22-year-old British researcher named Marcus Hutchins (known online as MalwareTech). Reverse-engineering the worm on the day of the outbreak, he noticed it tried to contact one specific, unregistered, gibberish domain before doing anything else, and exited if the domain answered. Following his usual practice of sinkholing malware to track it, he registered the domain for about $10.69, only to realise afterwards that doing so had switched the worm off: every new infection now reached a live domain, read it as "stop," and shut itself down. The whole episode took about seven hours from the worm's first spread to the kill switch taking hold, though it did nothing for machines already encrypted. In a twist that became its own cautionary tale, Hutchins was arrested in the US months later on unrelated charges tied to banking malware he had written years earlier as a teenager.
Who was behind it
In December 2017 the United States, joined by the United Kingdom, Canada, Australia, New Zealand, and Japan, publicly attributed WannaCry to North Korea, specifically the Lazarus Group, the same state-backed crew tied to the 2014 Sony Pictures hack and the 2016 theft from Bangladesh's central bank. Security firms had already found code shared between WannaCry and earlier Lazarus malware. The result is one of the strangest provenance chains in security history: a North Korean ransomware worm, built on a cyberweapon stolen from the American NSA and leaked by a still-unidentified group, that ended up paralysing British hospitals. The ransom, tellingly, brought in only around $130,000 (about 51 Bitcoin across 327 payments), a trivial sum next to the damage, which suggests WannaCry may have been released before it was even finished.
Why WannaCry still matters
WannaCry is the case everyone points to when they say "patch faster," because the patch was already there. MS17-010 had shipped two months earlier; nearly every victim was hit through a hole that a single update would have closed. It is also the moment "wormable" re-entered the vocabulary: a vulnerability that lets malware spread with no human in the loop turns a slow problem into an instant, global one. And it kept on giving, the very same EternalBlue exploit went on to power NotPetya six weeks later and BadRabbit after that. The lessons are unglamorous and still routinely ignored: patch network-facing flaws on a clock, retire legacy protocols like SMBv1, segment the network, and keep offline backups so recovery never depends on paying a stranger.
Comment le corriger
- Apply MS17-010 to every supported Windows host; for end-of-life systems (XP, Server 2003) apply Microsoft's separate emergency update or retire them behind strict compensating controls, since MS17-010 itself never covered those.
- Disable SMBv1 entirely; it is obsolete and was the propagation channel.
- Isolate infected hosts, rebuild them, and restore from clean offline backups; do not pay, the keys are unreliable and you are funding the next attack.
- Block inbound SMB (TCP 445) at the network edge and between internal segments.
Comment l’éviter
- Patch internet-facing and laterally-reachable vulnerabilities on a short, enforced SLA; a two-month-old fix saved no one who skipped it.
- Remove or tightly segment end-of-life and unmaintainable systems that can no longer be patched.
- Disable legacy protocols like SMBv1 and restrict SMB to the few places that genuinely need it.
- Keep tested, offline, immutable backups so ransomware recovery never depends on paying.
- Segment the network so a single wormable flaw cannot reach the entire estate.
Références
- https://www.nao.org.uk/reports/investigation-wannacry-cyber-attack-and-the-nhs/
- https://learn.microsoft.com/en-us/security-updates/securitybulletins/2017/ms17-010
- https://www.securityweek.com/microsoft-issues-emergency-patch-response-massive-ransomware-outbreak/
- https://trumpwhitehouse.archives.gov/briefings-statements/press-briefing-on-the-attribution-of-the-wannacry-malware-attack-to-north-korea-121917/
- https://en.wikipedia.org/wiki/WannaCry_ransomware_attack
Vulnérabilités liées
Tout Infra →- HIGHINFRA-USBLITER8-2026
usbliter8, published on 18 June 2026 by a research group called Paradigm Shift, is an unpatchable BootROM exploit for Apple's A12 and A13 chips, the silicon inside the iPhone XS, XR and 11 families plus the Apple Watch Series 4 and 5. It is the long-awaited successor to checkm8, the 2019 exploit that broke every Apple chip from the A5 to the A11 and was assumed to be the end of that road. The bug lives in the SecureROM, the very first code an Apple device runs at power on, which is etched into the silicon at the factory and can never be altered by any software update. usbliter8 abuses a hardware flaw in the Synopsys DWC2 USB controller: a mismatch in how the controller tracks its DMA memory while buffering USB Setup packets lets an attacker walk a write pointer backwards through memory and overwrite arbitrary SRAM, ending in full code execution inside the most trusted code on the chip. From there it can boot unsigned firmware and step outside Apple's chain of trust entirely, stamping the string PWND into the device's USB serial number as proof of control. The catch is that it is not a remote attack: it needs physical possession of the device, DFU recovery mode, a USB connection and a small RP2350 microcontroller board, and nothing it changes survives a reboot. It also does not break the Secure Enclave, so a device protected by a strong passcode keeps its user data encrypted even after the boot chain has been taken over. Apple cannot repair the affected chips; the only real remedy is newer hardware, because the A14 and later configure the controller correctly and are out of reach.
- HIGHCVE-2026-31431
Copy Fail (CVE-2026-31431), disclosed on 29 April 2026 by the security firm Theori, is a Linux kernel flaw that turns any unprivileged local user into root with a 732-byte Python script and no luck required. Despite a name that sounds like a clipboard bug, it has nothing to do with copy and paste: it is a failed copy deep in the kernel's crypto code. A nine-year-old optimization in the AF_ALG crypto socket interface let an attacker steer the kernel into writing four attacker-chosen bytes into the page cache, the in-memory copy of files that the CPU actually executes. Patch the cached pages of a setuid-root binary like /usr/bin/su, run it, and you are root. The exploit is a straight-line logic flaw with no race condition and no hardcoded kernel addresses, so the exact same script runs at roughly 100 percent reliability across Ubuntu, RHEL, SUSE, Amazon Linux and every other distribution built since 2017. Worse, because the page cache is shared by the whole machine, it crosses container boundaries: one poisoned page in a Kubernetes pod can compromise neighbouring tenants and the host. The disk file is never touched, so file-integrity scanners stay silent. It rates CVSS 7.8 (High), was added to CISA's Known Exploited Vulnerabilities catalog on 1 May 2026, and is notable for how it was found: an AI-assisted code scan surfaced a bug that had been silently exploitable for nearly a decade in about one hour.
- CRITICALINFRA-NOTPETYA-2017
On 27 June 2017 NotPetya became the most destructive cyberattack in history, causing more than $10 billion in global damage. It looked like ransomware but was a wiper: even victims who paid could not recover, because its encryption kept nothing needed to decrypt. It entered through a poisoned update to M.E.Doc, a Ukrainian tax application, then spread inside networks at machine speed using the EternalBlue and EternalRomance SMB exploits plus Mimikatz to harvest credentials and move laterally, so even fully patched machines fell once one neighbour was compromised. The blast radius was global: Maersk had to reinstall roughly 45,000 PCs and 4,000 servers and was saved only because a single domain controller in Ghana had been offline during a power cut and held a clean copy of Active Directory; Merck's losses reached about $1.4 billion. The US, UK, and allies attributed it to Russia's GRU (Sandworm). It is the lesson in patching, stopping credential reuse, segmentation, and truly offline backups.
- CRITICALCVE-2025-1974
IngressNightmare was a chain of five vulnerabilities in the Ingress-NGINX Controller for Kubernetes disclosed on 24 March 2025 by the Wiz Research team, the most severe being CVE-2025-1974 (CVSS 9.8), which enabled unauthenticated remote code execution from the pod network. Wiz estimated about 43% of cloud environments were vulnerable and identified over 6,500 publicly exposed clusters, including Fortune 500 organizations. The controller's validating admission webhook ran as an unauthenticated HTTP endpoint reachable by any workload on the pod network, accepting attacker-supplied AdmissionReview requests containing crafted Ingress objects. The supporting CVEs (CVE-2025-24514 auth-url, CVE-2025-1097 auth-tls-match-cn, CVE-2025-1098 mirror UID, CVE-2025-24513 path bypass) injected unsanitized NGINX configuration directives via annotations into a temporary config the controller validated with nginx -t. The attacker uploaded a shared-library payload by abusing NGINX client-body buffering (an oversized Content-Length keeps the request file descriptor open in ProcFS) and then used the injected ssl_engine directive to load that library during validation, achieving code execution in the controller pod whose service account could read all cluster secrets across namespaces, enabling full cluster takeover.
- HIGHCLOUD-ENVFILE-EXTORTION-2024
On August 15, 2024, Palo Alto Networks Unit 42 detailed a large-scale extortion campaign that compromised cloud environments by harvesting exposed environment variable files. Attackers scanned at least 110,000 domains and collected over 90,000 unique variables, including roughly 7,000 cloud service credentials and 1,515 social media credentials, with their infrastructure probing around 230 million targets. The vector was a web server misconfiguration: .env files inside the web root were served as plaintext over HTTP because the servers had no rule denying access to dotfiles, exposing the long-lived AWS IAM access keys hardcoded inside. The initial IAM principals lacked full admin but retained permission to create roles and users, so attackers called CreateRole and attached AdministratorAccess to escalate, then spun up Lambda functions across regions to automate further internet-wide scanning. They used the victims' own AWS accounts to exfiltrate and delete S3 objects, then uploaded ransom notes demanding payment. The failure chain combined exposed dotfiles, long-lived hardcoded credentials, and over-permissioned IAM, not any cloud-provider flaw.
- CRITICALCLOUD-BUCKET-MONOPOLY-2024
In research disclosed to AWS on February 16, 2024 and presented at Black Hat USA and DEF CON 32 in August 2024, Aqua Security's Nautilus team described a class of S3 bucket-name takeover attacks they called Bucket Monopoly, affecting CloudFormation, Glue, EMR, SageMaker, Service Catalog, and CodeStar. These services auto-created S3 buckets with predictable names built from static prefixes plus the account ID and region, such as cf-templates-{hash}-{region}, aws-glue-assets-{account-id}-{region}, and sagemaker-{region}-{account-id}, where account IDs are discoverable from ARNs, access keys, and public repos. Because S3 bucket names are globally unique, an attacker could pre-create a victim's predictably named bucket in a region the victim had not yet used (a Shadow Resource), then the victim's service would later read attacker-controlled content from it. This enabled data tampering, information disclosure, remote code execution by injecting malicious Glue or CloudFormation content, and in some cases full account takeover via planted admin roles; AWS remediated by adding randomized suffixes to bucket names and enforcing aws:ResourceAccount conditions. The class also covers reuse of abandoned or dangling bucket names that a victim configuration still references.