Researchers believe hacking tools developed by the US National Security Agency were used in a global cyberattack that hit international shipper FedEx, disrupted Britain's health system and infected computers in nearly 100 countries.
Cyber extortionists tricked victims into opening malicious malware attachments to spam emails that appeared to contain invoices, job offers, security warnings and other legitimate files.
The ransomware encrypted data on the computers, demanding payments of US$300 ($437) to US$600 to restore access. Security researchers said they observed some victims paying via the digital currency bitcoin, though they did not know what per cent had given in to the extortionists.
Researchers with security software maker Avast said they had observed 57,000 infections in 99 countries with Russia, Ukraine and Taiwan the top targets.
The most disruptive attacks were reported in Britain, where hospitals and clinics were forced to turn away patients after losing access to computers.
International shipper FedEx said some of its Windows computers were also infected.
Only a small number of US-headquartered organisations were hit because the hackers appear to have begun the campaign by targeting organisations in Europe, said Vikram Thakur, research manager with security software maker Symantec.
By the time they turned their attention to the US, spam filters had identified the new threat and flagged the ransomware-laden emails as malicious, Thakur said.
Private security firms identified the ransomware as a new variant of "WannaCry" that had the ability to automatically spread across large networks by exploiting a known bug in Microsoft's Windows operating system.
The hackers, who have not come forward to claim responsibility or otherwise been identified, likely made it a "worm", or self-spreading malware, by exploiting a piece of NSA code known as "Eternal Blue" that was released last month by a group known as the Shadow Brokers, researchers with several private cyber security firms said.
"This is one of the largest global ransomware attacks the cyber community has ever seen," said Rich Barger, director of threat research with Splunk, one of the firms that linked WannaCry to the NSA.
Extra stress for British patients
Hospitals across Britain found themselves without access to their computers or phone systems because of yesterday's cyberattack.
Many cancelled all routine procedures and asked patients not to come to the hospitals unless it was an emergency.
Some chemotherapy patients were even sent home because their records could not be accessed.
Patrick Ward, a 47-year-old sales director, said his heart operation, which was scheduled for overnight, was cancelled at St Bartholomew's Hospital in London.
Tom Griffiths, who was sent home from Bart's Hospital in London where he was to receive chemotherapy treatment, said a nurse showed him her computer screen, which carried an image of a padlock.
"Both staff and patients were frankly pretty appalled that somebody, whoever they are, for commercial gain or otherwise, would attack a healthcare organisation," he said. "It's stressful enough for someone going through recovery or treatment for cancer."
Krishna Chinthapalli, a doctor at Britain's National Hospital for Neurology & Neurosurgery who wrote a paper on cybersecurity for the British Medical Journal, warned that British hospitals' old operating systems and store of confidential patient information made them an ideal target for blackmailers.