A probe by Citizen Lab at the University of Toronto and computer security firm Kaspersky Lab has uncovered a massive network of mobile malware for all phone types that is sold by an Italian firm to police forces around the world.

The malware, dubbed Remote Control System (RCS), was produced by a company called Hacking Team. It can subvert Android, iOS, Windows Mobile, Symbian and BlackBerry devices. The study found 320 command-and-control (C&C) servers for RCS running in over 40 countries, presumably by law enforcement agencies.

Kaspersky has developed a fingerprinting system to identify the IP addresses of RCS C&C servers and found the biggest host is here in the Land of the Free, with 64 discovered. Next on the list was Kazakhstan with 49, Ecuador has 35, just beating the UK which hosts 32 control systems.

"The presence of these servers in a given country doesn't mean to say they are used by that particular country's law enforcement agencies," said Sergey Golovanov, principal security researcher at Kaspersky Lab. "However, it makes sense for the users of RCS to deploy C&Cs in locations they control – where there are minimal risks of cross-border legal issues or server seizures."

The Milan-based firm that developed RCS boasts on its website that its malware can crack any mobile operating system and remain undetected while doing so. Based on documents leaked to Citizen Lab, the firm may be correct in its claims.

The documents detail how the RCS system works. Once a target is identified by cops or g-men the malware is sent out and installed, either by tricking the user with a spearphishing attack or by exploiting vulnerabilities in the target's operating system.

The Hacking Team has devoted a lot of time to hacking Android systems with great success. But the documents suggest that it has also found a way to crack Apple's iOS, albeit with a rather tricky attack vector.

It appears that RCS won't work against iOS phones unless they have been jailbroken. But, if an unjailbroken iPhone is hooked up to an infected computer, then a remote-operated jailbreak can be carried out without the owner's knowledge using a tool like Evasi0n – then the malware can be installed easily.

Once on a target's mobile, the RCS software can intercept and record all phone calls, SMS messages, chat conversations from apps such as Viber, WhatsApp and Skype, grab any files or pictures on the handset, spy on the calendar, look up the user's location, and take screenshots whenever the operator specifies, as well as harvesting data from third-party applications like Facebook.

The malware's operator runs the code from behind an anonymizing firewall and the code can be tailored to provide little or no evidence that surveillance is taking place. The code is optimized to avoid running down the handset's battery, and can even get around the mobile data usage statistics displayed by the operating system.

While Hacking Team says that its software should only be used to track down criminal targets, Citizen Lab says it has found samples of the code aimed at political targets in Saudi Arabia, Malaysia, Morocco and Ethiopia.

"This type of exceptionally invasive toolkit, once a costly boutique capability deployed by intelligence communities and militaries, is now available to all but a handful of governments," said Citizen Lab.

"An unstated assumption is that customers that can pay for these tools will use them correctly, and primarily for strictly overseen, legal purposes. As our research has shown, however, by dramatically lowering the entry cost on invasive and hard-to-trace monitoring, the equipment lowers the cost of targeting political threats." ®