Asia's Source for Enterprise Network Knowledge

Monday, April 22nd, 2019

Security

Check Point warns of vulnerability in Xiaomi pre-installed security app

First iOS trojan exploiting Apple DRM design flaws infects any iOS device
Check Point Research recently discovered a vulnerability in one of the preinstalled apps in one of the world’s biggest mobile vendors, Xiaomi, which with almost 8% market share ranks third in the mobile phone market.
 
Ironically, it was the pre-installed security app, ‘Guard Provider’ (com.miui.guardprovider), which should protect the phone by detecting malware, which actually exposes the user to an attack.
 
Briefly put, due to the unsecured nature of the network traffic to and from Guard Provider, a threat actor could connect to the same Wi-Fi network as the victim and carry out a Man-in-the-Middle (MiTM) attack. Then, as part of a third-party SDK update, he could disable malware protections and inject any rogue code he chooses such to steal data, implant ransomware or tracking or install any other kind of malware.
 
Check Point responsibly disclosed this vulnerability to Xiaomi, which released a patch shortly after.
 
Three 3rd Party SDKs in One – How the Attack Works
 
The Xiaomi ‘Guard Provider’ is a pre-installed app in all mainstream Xiaomi phones that uses several third-party Software Development Kits (SDKs) as part of the security service it offers, including various types of the device protection, clearing and boosting.
 
The app includes three different antivirus brands built in that the user can choose from to keep their phone protected: Avast, AVL and Tencent. Upon selecting the app, the user selects one of these providers as the default Anti-Virus engine to scan the device.
 
Before explaining the potential attack scenario, it is important to point out that there are actually some hidden disadvantages in using several SDKs within the same app. Because they all share the app context and permissions, these main disadvantages are that:
  1. A problem in one SDK would compromise the protection of all the others.
  2. The private storage data of one SDK cannot be isolated and can therefore be accessed by another SDK.
 
With the case of Xiaomi Guard Provider, the research shows how a Remote Code Execution (RCE) attack is possible when integrating two SDKs with problematic behavior.
 
Briefly put, due to Guard Provider’s network traffic from any Xiaomi device being unsecured, this allows it to be intercepted via a Man-in-the-Middle (MiTM) attack and inject rogue code as part of a third-party SDK update.
 
How then can users protect themselves?
 
The short answer for users is to immediately uninstall offensive apps, to check Permissions for each of the apps in their phones, and see which particular apps may be out of line and demanding too many permisisons. Be paranoid and install from only Google Play at the very least. But for pre-installed apps such as this, they often cannot be uninstalled, then perhaps the minimum a user can do is to disable all forms of connectivity (LTE/3G and WIFI) and permissions to such apps, and "force stop" the app from running. A more robust cybersecurity app may need to be installed as well for more comprehensive protection