Original URL: https://www.theregister.com/2010/06/28/google_remote_android_application_install/

Google can kill or install apps on citizen Androids

Vanished 'RootStrap' masqueraded as movie preview

By Cade Metz

Posted in Security, 28th June 2010 10:02 GMT

Google has the power to not only remove applications from users' Android phones, but remotely install them as well.

Last week, Google told the world it had exercised its Android "Remote Application Removal Feature," reaching out over the airwaves and lifting two applications from citizen handsets, and as pointed out by the man who built this pair of vanished applications – security researcher Jon Oberheide – the company can use the same persistent handset connection to install applications as well.

When Google announced that it had actually used its "kill switch" to remove Oberheide's applications, it didn't mention Oberheide – or his applications – by name. It merely said that it had removed "two free applications built by a security researcher for research purposes" and that "these applications intentionally misrepresented their purpose in order to encourage user downloads, but they were not designed to be used maliciously, and did not have permission to access private data — or system resources beyond permission.INTERNET."

The announcement came by way of a blog post from Android security lead Rich Cannings. "After the researcher voluntarily removed these applications from Android Market, we decided, per the Android Market Terms of Service, to exercise our remote application removal feature on the remaining installed copies to complete the cleanup," Cannings said.

With a blog post of his own, Oberheide – who works for the Ann Arbor, Michigan-based security startup Scio Security – later revealed that Google has removed a pair of applications he used to demonstrate how easy it would be to bootstrap a rootkit onto Android phones via the Android Market, Google's version of the App Store. Oberheide built an application dubbed RootStrap that periodically phoned home to retrieve native code that executed outside of Dalvik, the Android Java virtual machine. Then he distributed the tool through the Market in the guise of another application – Twilight Eclipse Preview – which purported to be a sneak peek of the upcoming Twilight teen vampire flick.

"An attacker could use such an approach to gain a large install base for a seemingly innocent application and then push down a local privilege escalation exploit as soon as a new vulnerability is discovered in the Linux kernel and root the device," Oberheide wrote. "Since carriers are fairly conservative in pushing out OTA [over the air] patches for their devices, an attacker could easily push out their malicious payload before the devices were patched."

Oberheide had delivered a talk on this proof-of-concept bootstrap at the SummerCon security conference in New York. The talk was written up by Forbes, and this alerted Google. Forbes quotes Google's Rich Cannings, who pointed out that unless they exploit a bug in the OS, Android apps are limited to the permissions set by users.

Though Google says that Oberheide voluntarily removed the apps from the Android Market, Oberheide tells The Reg that the company essentially told him that if he didn't remove them, they would be removed for him. He also tells us that Google alerted him before it started removing the apps from phones, but that he didn't receive the notification until after they'd been removed.

Oberheide, it turns out, has gotten to know Google's Rich Cannings at various security conferences, and it was Cannings who asked him to remove the applications from the Market. With his blog post, Oberheide also says that according to Cannings, this is the first time Google has used its REMOVE_ASSET mechanism. Unlike some, Oberheide isn't fussed about Google's kill switch. But he does take issue with its INSTALL_APP mechanism.

Both mechanisms operate over a persistent TCP/SSL/XMPP connection that Google maintains between its servers and Android handsets via a service called GTalkService. "If an attacker is able to MITM [man in the middle] this SSL GTalkService connection for a particular device, it may be possible to spoof these INSTALL_ASSET messages to deliver a malicious application payload. If Google’s GTalkService servers were compromised, the malicious impact would obviously be a bit more widespread," he says.

"You better believe that myself and others are taking a careful look at these code paths."

He adds that the INSTALL_ASSET is invoked every time the user installs an application on their own through the Android Market – meaning it's a fundamental part of Google's setup. "Instead of downloading the APK [Android package] from the Market, clicking ‘Install’ will trigger Google’s servers to push a INSTALL_ASSET message down the GTalkService pipe. Upon receiving this message, your phone will download and install the APK," he says.

We still say the kill switch is more unsettling – little different from Amazon's Orwellian ability to remotely remove books from the Kindle. Amazon may say it won't use the thing, but it can be legally compelled to do so. Or it may use it for fear of legal action.

It's unclear whether Google's "kill switch" can remove applications that were not download through the Android Market. But Oberheide tells us he's working to reverse engineer the tool, in an effort to determine whether it can. ®