This article is more than 1 year old
Finally, someone's fixed THAT Android hole. Was it your mobe network? No
Free app beats carriers to the punch, which isn't that hard
A new tool attempts to close down the master-key vulnerability in Google Android that allows malicious software to masquerade as legit apps.
Free utility ReKey hooks into the underlying operating system to defend fandroids who may be fretting about exactly when an official patch will arrive from their smartphone manufacturer or network carrier.
The so-called master-key vulnerability discovered by Bluebox Security affects nearly all Android devices; it allows hackers to take over devices by tricking users into installing rogue apps that carry the same digital signatures as legitimate applications.
The problem stems from the ability to pack files with the same filename inside Android application installer bundles. The free operating system's cryptographic verifier validates the first version of any repeated file in an APK archive, but the installer extracts and deploys the last version, which could easily be a modified file with backdoor code.
Thus, a legit app could be hijacked to install malware on a device even though the system declares the downloaded software unmolested.
A similar (though less potent) vulnerability discovered by Chinese security researchers from Android Security Squad also allows attackers to smuggle untrusted code into Android application installer files.
The Chinese attack focuses on classes.dex APK files that are smaller than 64K. By modifying an extra field length to 0xFFFD, it is possible to fool the integrity check and smuggle malicious code into an installation file, Kaspersky Lab's Threatpost reports.
ReKey, developed by mobile security firm Duo Security and Northeastern University's System Security Lab, is designed to squash both these vulnerabilities without waiting for security updates from mobile carriers, which can take months or longer to arrive.
Last year, Duo reported that more than 50 per cent of Android devices worldwide have unpatched vulnerabilities. With the recently disclosed security bugs, that number will spike to 99 per cent until carriers are able to adequately patch their subscribers' devices, we're told.
Google has reportedly developed an Android update that addresses both the Bluebox master key vulnerability and the similar Chinese flaw. Almost all Android devices are vulnerable to the Bluebox master-key hole, since the vulnerability has existed since Android 1.6 (Donut), but only the Samsung Galaxy S4 has been patched to protect against it - hence the need for a third-party fix like ReKey.
Jon Oberheide, CTO of Duo Security, told El Reg that ReKey provided notification of attempted attacks featuring dodgy APKs as well as blocking the Bluebox master key and similar malware padding attacks.
"The app is powered by a Dalvik bytecode instrumentation framework," Oberheide explained. "In other words, we can reliably hook or interpose upon any code implemented in the Android framework (assuming we have sufficient privilege of course). To fix the master key hole, we hook the vulnerable routines in Android's package manager in order to block the attack vector.
"As a nice side effect of the hooking mechanism, we can detect when someone attempts to install a maliciously crafted APK, block it, and notify the user (currently, the user will see a popup notifying them that an attempted attack took place)."
Years ago security tools developers used to produce third-party fixes to defend against Windows zero-day vulnerabilities. Duo Security and computer scientists at Northeastern University have teamed up to do something similar to tackle this pressing Android security issue. Oberheide, who agreed that the aforementioned comparison was apt, said that the ReKey application was low impact and could be left on devices even after an Android operating system update is applied.
"Determina and eEye used to release patches for critical Windows vulnerabilities before Microsoft got around to it," Oberheide said. "[There's] a very similar idea here.
"Since ReKey only patches in-memory (and then re-patches upon boot of the device), it is non-destructive and makes no permanent changes to the user's device. When the official patch is delivered to the device, it can interoperate peacefully."
The ReKey app was released on Tuesday and is available to download at rekey.io as well as through the Google Play Store.
A blog post by Duo Security with more context and technical information about ReKey can be found here.
"The security of Android devices worldwide is paralysed by the slow patching practices of mobile carriers and other parties in the Android ecosystem," Oberheide concluded. "We are excited to bring forward innovative technology like ReKey that puts security controls back into the hands of users and enterprises." ®