Android vulnerability allows malware to compromise most devices and apps

Attackers can impersonate trusted developers to gain powerful privileges on the OS, researchers from Bluebox Security said

The majority of Android devices currently in use contain a vulnerability that allows malware to completely hijack installed apps and their data or even the entire device.

The core problem is that Android fails to validate public key infrastructure certificate chains for app digital signatures, said Jeff Forristal, chief technology officer of Bluebox Security, a San Francisco company whose researchers discovered the issue.

According to Google's documentation, Android applications must be signed in order to be installed on the OS, but the digital certificate used to sign them does not need to be issued by a digital certificate authority. "It is perfectly allowable, and typical, for Android applications to use self-signed certificates," the documentation says.

However, Android contains hard-coded certificates from several developers so it can give apps created by those developers special access and privileges inside the OS, Forristal said.

One such certificate belongs to Adobe and gives apps signed by it, or by certificates issued by it, the power to inject code into other installed apps. Forristal believes this behavior exists to allow other apps to use Adobe's Flash Player plug-in.

A typical certificate chain validation process would use cryptography to check the signature relationships between all certificates in the chain. A certificate chain can contain intermediary certificates, so the system would start by validating if the certificate used to sign the app was indeed signed by the next certificate in the chain. Then it would validate whether that certificate was signed by the next one, and so on, until reaching the trusted Adobe certificate.

According to Forristal, Android does not do that, so an attacker can sign a malicious app with a certificate that appears to be signed by the hard-coded Adobe certificate, but actually isn't. As long as the Adobe certificate is present in the app's certificate chain, the system will take code from the app and inject it into other installed apps, Forristal said.

The injected code essentially becomes part of the other apps, inheriting their permissions. It has access to all data stored by those apps, it can see their network traffic and can perform all actions that those apps are authorized to perform on the device, he said.

The attack can only be used to hijack apps that use the WebView component on Android versions older than 4.4, known as KitKat. WebView is a feature commonly used by apps to display Web content using the browser engine built into Android.

In Android KitKat, the WebView component is based on the Chromium open-source browser and no longer supports this plug-in code injection, Forristal said.

Even so, the attack affects a large number of users. According to Google's statistics from the beginning of July, around 88 percent of devices that use Google Play run Android versions older than 4.4.

"It is very, very easy for malware to use this attack -- it is silent, transparent, with no notifications to users," Forristal said. The malicious app doesn't need any special permissions. It just needs to contain WebView code inside of it, which it can actually download after installation, he said.

Abusing the Adobe certificate is also not the only possible attack vector, as Android has at least two other hard-coded certificates that grant applications special access.

One is a certificate for mobile device management technology developed by a company called 3LM that was acquired in early 2011 by Motorola Mobility, before Google acquired Motorola Mobility.

The 3LM device management extensions are not part of the Android Open Source Project (AOSP), but are included in various devices that were produced and shipped by Sony, HTC, Motorola, Samsung, LG and a couple of other smaller manufacturers, Forristal said.

Any application with the 3LM certificate in its certificate chain can use the device management extensions to silently install new apps, change system settings and take control of the device, he said.

Finally, a third hard-coded certificate is used by Google Wallet and provides access to the hardware-based NFC (near-field communication) secure element that's used to store sensitive information like credit card numbers during payment processing.

The Bluebox security researchers didn't have time to analyze the impact of this attack vector in detail, but its mere existence likely violates the Android security model for the NFC secure element, Forristal said.

The certificate chain validation vulnerability, which Bluebox has dubbed Fake ID, was reported to Google in April and a patch was made available to device manufacturers, according to Forristal.

"After receiving word of this vulnerability, we quickly issued a patch that was distributed to Android partners, as well as to AOSP," a Google representative said Tuesday via email. "Google Play and Verify Apps have also been enhanced to protect users from this issue. At this time, we have scanned all applications submitted to Google Play as well as those Google has reviewed from outside of Google Play and we have seen no evidence of attempted exploitation of this vulnerability."

Motorola has released updates with the patch for some devices and more vendors will probably do the same over the coming weeks, Forristal said.

However, due to the fragmentation of the Android ecosystem, update availability and delivery vary widely between different manufacturers and carriers. Some affected devices are most likely not even supported anymore and will never receive a patch for this issue.

Bluebox has released a free application that can check whether a device is vulnerable to the fake ID attacks.

Forristal plans to discuss the vulnerability in more detail during a presentation at the Black Hat security conference in Las Vegas next week.

Join the CSO newsletter!

Error: Please check your email address.

Tags Bluebox SecurityLG Electronicsmobile securityMotorola MobilitysonyExploits / vulnerabilitiesmalwarepkisamsunghtcGooglesecurity

More about Adobe SystemsGoogleHTCindeedLGMotorolaNFCSamsungSony

Show Comments

Featured Whitepapers

Editor's Recommendations

Solution Centres

Stories by Lucian Constantin

Latest Videos

  • 150x50

    CSO Webinar: Will your data protection strategy be enough when disaster strikes?

    Speakers: - Paul O’Connor, Engagement leader - Performance Audit Group, Victorian Auditor-General’s Office (VAGO) - Nigel Phair, Managing Director, Centre for Internet Safety - Joshua Stenhouse, Technical Evangelist, Zerto - Anthony Caruana, CSO MC & Moderator

    Play Video

  • 150x50

    CSO Webinar: The Human Factor - Your people are your biggest security weakness

    ​Speakers: David Lacey, Researcher and former CISO Royal Mail David Turner - Global Risk Management Expert Mark Guntrip - Group Manager, Email Protection, Proofpoint

    Play Video

  • 150x50

    CSO Webinar: Current ransomware defences are failing – but machine learning can drive a more proactive solution

    Speakers • Ty Miller, Director, Threat Intelligence • Mark Gregory, Leader, Network Engineering Research Group, RMIT • Jeff Lanza, Retired FBI Agent (USA) • Andy Solterbeck, VP Asia Pacific, Cylance • David Braue, CSO MC/Moderator What to expect: ​Hear from industry experts on the local and global ransomware threat landscape. Explore a new approach to dealing with ransomware using machine-learning techniques and by thinking about the problem in a fundamentally different way. Apply techniques for gathering insight into ransomware behaviour and find out what elements must go into a truly effective ransomware defence. Get a first-hand look at how ransomware actually works in practice, and how machine-learning techniques can pick up on its activities long before your employees do.

    Play Video

  • 150x50

    CSO Webinar: Get real about metadata to avoid a false sense of security

    Speakers: • Anthony Caruana – CSO MC and moderator • Ian Farquhar, Worldwide Virtual Security Team Lead, Gigamon • John Lindsay, Former CTO, iiNet • Skeeve Stevens, Futurist, Future Sumo • David Vaile - Vice chair of APF, Co-Convenor of the Cyberspace Law And Policy Community, UNSW Law Faculty This webinar covers: - A 101 on metadata - what it is and how to use it - Insight into a typical attack, what happens and what we would find when looking into the metadata - How to collect metadata, use this to detect attacks and get greater insight into how you can use this to protect your organisation - Learn how much raw data and metadata to retain and how long for - Get a reality check on how you're using your metadata and if this is enough to secure your organisation

    Play Video

  • 150x50

    CSO Webinar: How banking trojans work and how you can stop them

    CSO Webinar: How banking trojans work and how you can stop them Featuring: • John Baird, Director of Global Technology Production, Deutsche Bank • Samantha Macleod, GM Cyber Security, ME Bank • Sherrod DeGrippo, Director of Emerging Threats, Proofpoint (USA)

    Play Video

More videos

Blog Posts

Market Place