The National Security Agency (NSA) is denying reports that it infected millions of computers around the world with malware by posing as Facebook and other sites.

In a statement released on Thursday, the spy agency said that it uses its technical tools “only to support lawful and appropriate foreign intelligence operations, all of which must be carried out in strict accordance with its authorities.”

“NSA does not use its technical capabilities to impersonate U.S. company websites,” the agency said. “Nor does NSA target any user of global Internet services without appropriate legal authority. Reports of indiscriminate computer exploitation operations are simply false.”

ADVERTISEMENT

Earlier this week, the Intercept website reported that documents provided by former NSA contractor Edward Snowden showed the agency used “implants” to break into some computers and retrieve data from foreign networks, as part of a program codenamed Turbine.

In some cases, the agency allegedly pretended to be a Facebook server and used the site to break into a targeted computer’s hard drive. In others, it sent out spam emails with bugs that allowed the agency to secretly record audio or take pictures from a computer’s webcam.

The agency’s goals for the program, according to one document, were to “relieve the user from needing to know/care about the details. For example, a user should be able to ask for ‘all details about application X’ and not need to know how and where the application keeps files, registry entries, user application data, etc.”

The NSA’s surveillance practices have come under fire from civil liberties advocates, the tech sector and the broader public after Snowden leaked thousands of classified documents to the media last year.

On Thursday, Facebook CEO Mark Zuckerberg blasted the Obama administration in a post on his site, claiming that the government’s actions were posing a threat to the Internet.

“The US government should be the champion for the internet, not a threat,” he wrote. “They need to be much more transparent about what they're doing, or otherwise people will believe the worst.”