Proof-of-concept exploit available for Android app signature check vulnerability

Technical details about a vulnerability allowing rogue modifications of legitimate Android apps were publicly disclosed

Technical details and a proof-of-concept exploit have been published for a recently announced Android vulnerability that potentially affects millions of devices and allows attackers to turn legitimate apps into Trojan programs.

Last Wednesday security researchers from mobile security firm Bluebox Security announced that a vulnerability exists in the way Android verifies the digital signatures of application packages (APKs), allowing attackers to modify them without breaking their digital signatures.

The Bluebox researchers only provided a high-level description of the bug and its potential impact, keeping the technical details for an upcoming presentation at the Black Hat security conference in Las Vegas.

Since then, developers of CyanogenMod, a community-built Android firmware version, have identified where the bug is located and even merged a patch from Google into their code.

Using the information from the public CyanogenMod bug entry, Pau Oliva Fora, a mobile security engineer at security firm ViaForensics, developed a proof-of-concept Linux shell script that can be used to modify an app in a way that exploits the flaw. The code makes use of the APKTool program and was released Monday on Github.

"It's a problem in the way Android handles APKs that have duplicate file names inside," Oliva Fora said Tuesday via email. "The entry which is verified for signature is the second one inside the APK, and the entry which ends up being installed is the first one inside the APK -- the injected one that can contain the malicious payload and is not checked for signature at all."

The Bluebox researchers said last week that Google made changes to Google Play in order to detect apps modified in this way and that a patch has already been shared with device manufacturers. This only leaves users who install applications from sources other than Google Play -- a process known as sideloading -- potentially vulnerable.

"I think it's a very serious vulnerability, and everyone with an unpatched device should be cautious about what they install, especially if it doesn't come from an official distribution channel," Oliva Fora said.

The vulnerability presents benefits for Android malware authors because it allows them to add malicious code to legitimate app packages and have them properly update the original applications if they are installed on the targeted devices, the researcher said.

Android malware authors are already distributing malicious apps that masquerade as popular games or applications though a variety of methods, including through third-party app stores. This vulnerability could make this social engineering technique more efficient.

Fortunately, APKs modified in this way should be very easy to detect by antivirus vendors, Oliva Fora said. "They just have to look for duplicate file names inside an APK file."

It would have been better if technical details about the vulnerability had not been disclosed until Black Hat, as Bluebox Security originally intended, the researcher said. However, "I'm sure that Jeff Forristal's [the Bluebox CTO] Black Hat talk will not disappoint, even if the details of the vulnerability are known," he said.

"A coordinated disclosure usually makes sure most users are safe when the details of the vulnerability are disclosed, but due to the nature of the Android ecosystem, vendors and carriers will not deploy a patch for abandoned devices and sadly many devices will remain vulnerable forever," Oliva Fora said.

Join the CSO newsletter!

Error: Please check your email address.

Tags viaForensicsBluebox SecurityAndroid OSsecuritymobile securitymobileExploits / vulnerabilitiesmalwaremobile applications

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