Law enforcement agencies across the globe are taking a page out of the cybercriminal handbook, using targets' own phones and computers to spy on them with methods traditionally associated with the world's most malicious hackers, two computer security groups said Tuesday.
Drawing on a cache of leaked documents and months of forensic work, two reports about the private Italian firm Hacking Team expose a global network of malicious software implants operated by police and spy agencies in dozens of countries. They also suggest that the lines between high-tech police work and malicious hacking are blurring.
"In the past, the distinction was pretty easy: If it's malware, there's someone bad behind it," said Costin Raiu, a senior security researcher at Russian anti-virus firm Kaspersky. "The notion of good guys and bad guys is becoming diluted."
The reports by Kaspersky and the Toronto-based Citizen Lab help complete the picture of state-sanctioned surveillance sketched by Edward Snowden's sensational revelations about the National Security Agency and its international allies.
While many of Snowden's revelations dealt with the mass monitoring of communication as it flows across the globe, Hacking Team brags about more aggressive forms of monitoring that let authorities turn people's phones and laptops into eavesdropping tools.
Hacking Team, based in Milan, did not return several messages seeking comment.
On its website, the company takes pains to present itself as one of the good guys. In a moody promotional video with a gravelly voice-over, it boasts of being able to steal text messages, eavesdrop on Skype calls and take control of hundreds of thousands of targeted devices at a time.
Hacking Team's customer policy says it sells only to governments, which it screens for human rights concerns. A company-established panel of technical experts and legal advisers checks out every potential client, Hacking Team says, and while it realizes that its software can be abused, "we take a number of precautions to limit the potential for that abuse."
Those precautions haven't prevented copies of Hacking Team's malicious software from being used to target more than 30 activists and journalists, according to a tally maintained by Citizen Lab, a research group based at the University of Toronto's Munk School of Global Affairs.
Citizen Lab's report provided an unusual level of insight into how the malware operates, showing how devices can be compromised through booby-trapped emails or infected USB sticks, or even pushed onto handsets by a pliant telephone company.
Screenshots released by Citizen Lab appear to show a control panel complete with on-off switches for recording text messages, calls, keystrokes and visited websites. Other options open to Hacking Team's customers include the ability to force infected phones to take regular pictures or video and to monitor the position of an infected handset via Google Maps, effectively turning a target's phone into both a hidden camera and a tracking device.
Hacking Team built its programs for stealth. The spy software implanted on iPhones is calibrated to avoid draining the phone's battery, both Citizen Lab and Kaspersky said. On BlackBerrys, it can be programmed to ship stolen data via Wi-Fi to avoid jacking up the phone bill. The spyware even comes with a special "crisis" mode that will cause it to self-destruct if it's in danger of being detected.
"The victim's got almost no chances of figuring out that their iPhone is infected," Kaspersky malware expert Sergey Golovanov said in an interview.
Hacking Team does not say who its customers are, but researchers can draw inferences from the network of servers tasked with controlling its spyware.
In its report, Kaspersky says its scans uncovered 326 Hacking Team command servers based in more than 40 countries, including 64 servers in the United States, 49 in Kazakhstan and 35 in Ecuador. Other countries hosting multiple servers include the United Kingdom, Canada and China.
Kaspersky's report cautions that hosting a Hacking Team command server doesn't necessarily mean officials in that country are using its software, although it said that would be logical due to the complications of controlling spyware from another nation's territory.
Hints about who is using these programs can also be found by studying how victims got infected.
Citizen Lab found Hacking Team software hiding in an Android phone application ostensibly designed to provide Arabic-language news from Saudi Arabia's Qatif region, the scene of protests in the wake of the 2011 Arab Spring revolutions. The Saudi Embassy in London did not immediately return a call seeking comment.
Steven Bellovin, a Columbia University academic who has written about hacking in the law enforcement context, described the reports' findings as credible. In an email exchange, he said there was nothing inherently wrong about police using malware to infect their targets, noting that both police and criminals do carry guns.
"The hacking tools fall into the same category. They're dual use," he said.
But Bellovin said there need to be strict rules - and open debate - about the law enforcement uses of malicious software before government-commissioned viruses are unleashed on the Internet.
"None of that seems to be present here," he said.