A third-party advertising framework integrated in hundreds of Android apps contains a vulnerability that could allow hackers to steal sensitive information from users’ phones, according to security researchers from antivirus firm Bitdefender.
The framework is called HomeBase SDK (software development kit) and is developed by Widdit, based in Ramat Gan, Israel. It allows Android developers to monetize their apps by displaying ads and custom content on the phone’s lock screen.
HomeBase SDK is one of the many mobile advertising frameworks available to Android developers, but according to the Bitdefender researchers it has an insecure update mechanism that could put users at risk when their phones connect to the Internet over insecure or compromised networks.
Every time an application that uses HomeBase is executed, the SDK code embedded into it connects to a remote server using an unencrypted connection to get the latest version of the SDK, the Bitdefender researchers said Tuesday in a blog post. If an updated SDK is found it is downloaded in the form of a JAR (Java Archive) file and executed, they said.
Since the communication with the update server is done via plain HTTP with no SSL encryption, an attacker could intercept the application’s request as it travels over an insecure wireless network or a compromised network gateway and serve back a malicious JAR file, according to the Bitdefender researchers.
In addition, the authenticity of the downloaded file is not verified, so the host app has no way of knowing whether the JAR file actually came from Widdit or not, they said.
A malicious JAR file supplied by an attacker would be able to use the permissions granted to the host app, which is another problem, because the HomeBase SDK forces apps to ask for an extensive list of permissions on installation.
”A malicious JAR file could read and export contacts, get the accounts on the device, access the user’s location and report it, record audio, read SMS contents and read the user’s browsing history and bookmarks, among others,” Bogdan Botezatu, a senior e-threat analyst at Bitdefender, said via email.
If the application has any other permissions in addition to the ones required by the HomeBase SDK, the malicious JAR file would be able to use those as well, Botezatu said.
The Bitdefender researchers claim they successfully tested a man-in-the-middle attack in a controlled environment against an app with the HomeBase SDK and managed to make it execute a malicious JAR with phone calling and SMS hijacking capabilities.
”The application downloaded and ran the JAR file and executed the malicious code without objection, as it had been granted phone calling and SMS interception permission upon installation,” they said.
The researchers claim the HomeBase SDK doesn’t actually need all of the permissions it requests, but Widdit disagrees.
”As a rich and robust lock screen platform, HomeBase does require a relatively high number of permissions in order for it to deliver its full experience in an optimal way,” Noam Mor, the head of media relations at Widdit said via email. “That being said, our platform is very flexible and allows developers the option to exclude some of the permissions if they wish to request less permissions (but affect functionality).”
Mor pointed to a blog post where the permissions required by the HomeBase SDK are explained.
While the SDK’s permissions will remain in place, the company plans to resolve the security issues with the update mechanism that could allow attackers to abuse them.
”As part of our security enhancement efforts we are in the process of migrating to SSL based communication,” Mor said. “This step will prevent unwanted or malicious access to the remote update, and migration completion is scheduled for the end of this month.”
The implementation of code integrity verification has also been put on the development roadmap for the first quarter of 2014 in order to prevent any other possible vulnerabilities with the updates, Mor said.
Widdit is in contact with the Bitdefender researchers and appreciates their feedback, the representative said. Widdit takes security very seriously, but hasn’t received any reports of attacks like the ones described by Bitdefender, he said.
A simple way to mitigate this type of attack would be for the company to sign their updates with a digital certificate which could then be used by the embedded SDK to verify their authenticity, Botezatu said. “If the certificate is not valid or is missing, then the application should not execute the downloaded code.”
According to Bitdefender, 1,122 out of 1,640 applications that use the HomeBase SDK and were collected by the company over time from Google Play, are no longer in the marketplace.
”We don’t have a clear date when each application has been taken down, nor do we know the reason,” Botezatu said. “All we know is that they are not online anymore.”
”We aren’t aware of any Play Store suspensions at all,” Mor said. “We do realize that a large part of the developers who work with us use several monetization solutions. We’re also aware of the fact that a lot of monetization companies are banned by Google due to it’s new ToS [terms of service]. We can only conclude that those apps were banned because of the fact they implemented their app with other SDKs.”
Google did not immediately respond to an inquiry on whether it ever removed applications from Google Play specifically because they used Widdit’s HomeBase SDK.