Tools used by the National Security Agency could be behind a massive cyberattack that has stretched to 74 countries.

More than 45,000 attacks in 74 countries Friday have been attributed to malicious ransomware called WannaCry, according to figures from the Russian cybersecurity firm Kaspersky Labs.

The brand of ransomware being used appears to be linked to the NSA. A hacking group called "Shadow Brokers" said earlier this year that it stole WannaCry from the NSA and then offered it for sale.

The ransomware can lock out users from their computer files unless they pay $300 in the online currency bitcoin, according to a report from the BBC.

The Spanish government reported that the attack affects Windows systems. It also can infect connected Windows systems on the same network that didn't properly get an update.

"Infection of a single computer can end up compromising the entire corporate network," the government's Computer Emergency Readiness Team said Friday.

A hack of the National Health Service in England was also reportedly attributed to the ransomware. The attack caused hospitals across the country to cancel procedures and appointments.