Edward Snowden, the former NSA contractor who in 2013 leaked details of America's surveillance programs, has blamed the intelligence agency for not preventing the global cyber attack on Friday.

Hacking tools believed to belong to the US National Security Agency that were leaked online last month appear to be the root cause of the hack that crippled the NHS and spread across the world.

Some cyber security experts and privacy advocates said the massive attack reflected a flawed approach by the United States to dedicate more cyber resources to offence rather than defence, a practice they argued makes the internet less secure.

"Despite warnings, (NSA) built dangerous attack tools that could target Western software," Mr Snowden said. "Today we see the cost."