The Petya ransomware that spread across the globe Tuesday was made possible thanks to EternalBlue – a hacking tool used by the NSA to exploit a Windows vulnerability it left open for five years, Edward Snowden and security experts have said.

If you're a journalist writing about this, remember this worm spreads based on a vulnerability NSA kept unfixed for years. #EternalBluehttps://t.co/9Eb4agkRsp — Edward Snowden (@Snowden) June 27, 2017

Symantec confirms global #Petya ransomware attack hitting computers today (hospitals, supermarkets, banks) uses NSA's #ETERNALBLUE exploit. pic.twitter.com/wDuHoRcFCr — Edward Snowden (@Snowden) June 27, 2017

According to cybersecurity company Kaspersky Lab, the latest ransomware attacks are a variation on the original Petya, which has been around since last year. “This appears to be a complex attack which involves several attack vectors,” Kaspersky Lab said Tuesday. “We can confirm that a modified EternalBlue exploit is used for propagation at least within the corporate network.”

Listen, people can disagree on surveillance. But when @NSAGov's focus on offense over defense shuts down US hospitals, it's time to act. https://t.co/4LL0CHFKOO — Edward Snowden (@Snowden) June 27, 2017

How many times does @NSAGov's development of digital weapons have to result in harm to civil infrastructure before there is accountability? https://t.co/VOu28Ce9ee — Edward Snowden (@Snowden) June 27, 2017

“How many times does @NSAGov's development of digital weapons have to result in harm to civil infrastructure before there is accountability?” Snowden tweeted. “Listen, people can disagree on surveillance. But when NSAGov’s focus on offense over defense shuts down US hospitals, it’s time to act.”

The NSA’s hacking team, Equation Group (or Tailored Access Operations), lost control of its trove of hacking exploits and, last August, a group calling themselves the Shadow Brokers announced it had access to those tools.

READ MORE: Shadow Brokers hackers release NSA hacking tools to punish Trump for ‘abandoning’ his base



In April, the group released some of the tools, which were verified by Snowden and The Intercept. The release included an exploit called EternalBlue, which uses a Microsoft Windows Server Message Block (SMB) vulnerability to access computer systems.

READ MORE: Shadow Brokers launches monthly subscription service offering nuclear, banking secrets



The NSA had discovered a vulnerability in Microsoft Windows software and chose to keep it open for years, instead of telling Microsoft, so it could use it to its advantage.

The Equation Group then created or purchased EternalBlue malicious code. An NSA source told the WP that using EternalBlue was “like fishing with dynamite.”

Microsoft only released a patch for the vulnerability in March, even though in 2014, the Obama administration guaranteed it would disclose serious vulnerabilities and exploits to US manufacturers, as a result of Snowden’s own NSA leaks.

According to the Shadow Brokers, it released a screenshot from the Equation Group’s lost disk of tools in January, with the understanding that the Equation Group would then tell Microsoft and the vulnerability would be patched.

Eternal Blue was used in the WannaCry global ransomware attack in May. The malicious code was combined with a code that allowed it to spread quickly.

READ MORE: Ransomware virus plagues 100k computers across 99 countries