Checkpoint researchers discovered several vulnerabilities in Android application developer tools that put any organisation that does Java/Android development at risk of an outsider gaining access to their system.
The vulnerability affects cross-platform users that use Android Studio, IntelliJ, Eclipse and APKTool and the most common Android Integrated Development Environment (IDES), according to the ParseDroid – Targeting The Android Development & Research Community report.
Researchers said the attacks could be used to target any Android developer in any organisation and that there are a lot of open source tools that are using APKTool (Android Application Package Tool).
Researchers examined the APKTool and found it contained a XML External Entity (XXE) vulnerability in its source code cause by the configured XML parser of APKTool not disabling external entity references when parsing an XML file within the program.
The vulnerable function is called “loadDocument” and is being used in both core functionalities - ‘Build' and ‘Decompile' - of APKTool, the report said. As a result, the entire OS file system of the APKTool user is exposed and could allow attackers to retrieve any file on the victim's PC by using a malicious “AndroidManifest.xml” file that exploits an XXE vulnerability.
“The Proof of Concept demonstrates Xml External Entity (XXE) and Path Traversal which are very common in the wild, it is possible to find numerous vulnerabilities related to that kind of attacks,” Researchers Eran Vaknin, Gal Elbaz, Alon Boxiner, and Oded Vanunu said in the report. “Regarding to IDEs: An attacker has to upload a malicious crafted library to a public repository (which we have done), or to target a developer and send him the malicious library specifically.”
An attacker has to generate malicious APK, upload it to the store or send it specifically to the target, researchers added.
In another attack, researchers demonstrated how attackers could use public repositories to target developers by uploading malicious AAR (Android Archive Library) to them and waiting for victims to unknowingly download them.
When the victim imports the AAR from a known repository into the Android Studio project it would lead to malicious payload execution and allow file content to be sent to an attacker's server. In a separate scenario the APKtool can be exploited to attack services and users by injecting a backdoor into the APK file using the “path traversal” vulnerability.
The vulnerabilities have been reported to Google, Jetbrains, Eclipse and APKTool owner and as of the time this article was written, Google, Jetbrains and APKTool owner have fixed and released a patched version.