Two researchers at Fortinet have demonstrated during the last Black Hat Europe conference how to hide a malicious Android APK in images.
Mobile devices are continuously under attacks, cyber criminals are improving their technique to attack mobile users and increase the profits.
A new technique recently disclosed, allows attackers to hide encrypted malicious Android applications inside images, the method allows threat actors to evade detection by antivirus products and according the experts potentially also the checks run by Google Play. The new attack technique was developed by Axelle Apvrille, a security researcher at Fortinet, in collaboration with reverse engineer Ange Albertini. The researchers presented their proof-of-concept last week during the last Black Hat Europe security conference.
The script elaborates the input, “without altering the information it contains, so that the input encrypted with the provided key and a generated initialization vector (IV) turns into the output.” The two researchers at Fortinet applied the concept to Android application packages (APKs) files, they created a proof-of-concept wrapping application that displays a PNG image of Anakin Skywalker, one of the characters of Star Wars saga. The app they developed is able to decrypt the image with a particular key in order to obtain a second Android APK file that it will install.
During their presentation at the BlackHat, the researcher used an encrypted APK that once extracted by the principal app displays a picture of Darth Vader, in a real attack scenario the hackers could run a malicious application to control the Smartphone or to steal user’s, including SMS messages, photos and contacts.
During the presentation the Android device displayed a permission request when the wrapper application tried to install the decrypted APK file, but as explained by Apvrille this behavior is easy to avoid invoking a method called DexClassLoader. Another interesting thing is that the malicious APK could be also downloaded from a remote server without triggering any alert due the to the encryption applied.
As explained the researchers there is anyway a condition to satisfy in order to successfully run the attack, some data needs to be appended at the end of the original application, but the APK format does not allow to append any data after a marker called the End of Central Directory (EOCD), which is a sort of end of the file.
Because of fragmentation in the Android ecosystem, especially when it comes to firmware updates, many devices will likely remain vulnerable to this attack for a long time, giving Android malware authors ample time to take advantage of it. The researchers speculated that the vulnerability will probably remain active for a long time on many devices because the fragmentation in the Android ecosystem and different patch management of various vendors.