Xamalicious Android malware distributed through the Play Store

Researchers discovered a new Android malware dubbed Xamalicious that can take full control of the device and perform fraudulent actions.

McAfee Mobile Research Team discovered a new Android backdoor dubbed Xamalicious that can take full control of the device and perform fraudulent actions.

The malware has been implemented with Xamarin, an open-source framework that allows building Android and iOS apps with .NET and C#.

Xamalicious relies on social engineering to gain accessibility privileges, then it connects to C2 to evaluate whether or not to download a second-stage payload. The malicious payload is dynamically injected as an assembly DLL at runtime level to take full control of the device and perform a broad range of fraudulent actions such as clicking on ads and installing apps.

The second stage payload uses the powerful accessibility services granted during the first stage to take full control of the infected device. The malicious code also supports a self-update mechanism for the main APK, which makes the threat very versatile.  

The experts discovered a link between Xamalicious and the ad-fraud app “Cash Magnet” which fraudsters use to generate revenue by instructing the devices to click ads, installs apps, and other actions.

The researchers believe that the developers behind this backdoor are financially motivated.

The usage of the Xamarin framework allowed threat actors to remain under the radar for a long time. The authors also implemented different obfuscation techniques and custom encryption to avoid detection.

McAfee identified about 25 different malicious apps, some of which have been uploaded on Google Play since mid-2020. The researchers estimated that the malicious apps were downloaded at least 327,000 times.

The malware-laced apps masqueraded as health, games, horoscope, and productivity apps. Google promptly removed the malware-laced apps from Google Play.

“Based on the number of installations these apps may have compromised at least 327,000 devices from Google Play plus the installations coming from third-party markets that continually produce new infections based on the detection telemetry of McAfee clients around the world.” reads the report published by McAfee. “Android/Xamalicious trojans are apps related to health, games, horoscope, and productivity. Most of these apps are still available for download in third-party marketplaces.”

To circumvent analysis and detection, the malware encrypts all C2 communications. This encryption goes beyond HTTPS protection, utilizing a JSON Web Encryption (JWE) token encrypted with RSA-OAEP and a 128CBC-HS256 algorithm. However, the researchers noticed RSA key values employed by Xamalicious are hardcoded in the decompiled malicious DLL, enabling the decryption of transmitted information if the C2 infrastructure is accessible during the analysis.

Most of the infections are in the USA, Brazil, Argentina, the UK, Spain, and Germany

“Android applications written in non-java code with frameworks such as Flutter, react native and Xamarin can provide an additional layer of obfuscation to malware authors that intentionally pick these tools to avoid detection and try to stay under the radar of security vendors and keep their presence on apps markets.” concludes the report. “Avoid using apps that require accessibility services unless there is a genuine need for use. If a new app tries to convince you to activate accessibility services claiming that it’s required without a real and reasonable reason and requesting to ignore the operative system warning, then it’s a red flag.

Android malware distributed through the Google Play Store can pose significant risks to users’ privacy, security, and the functionality of their devices. Malicious apps can perform various harmful activities, including stealing sensitive information, displaying intrusive ads, compromising device performance, and even gaining unauthorized access to personal data. Here are some dangers of Android malware distributed through the Play Store:

  1. Data Theft: Malicious apps may collect personal information, such as contact lists, login credentials, financial data, or other sensitive information, which can be used for identity theft, financial fraud, or sold on the dark web.
  2. Financial Loss: Some malware can initiate premium service subscriptions, make unauthorized transactions, or manipulate banking apps, resulting in financial losses for the user.
  3. Privacy Breaches: Malware might access sensitive data like photos, messages, or location information, compromising users’ privacy and potentially leading to blackmail or other privacy breaches.
  4. Device Compromise: Certain malware can take control of the device, install additional harmful software, or exploit security vulnerabilities to gain unauthorized access, compromising the device’s integrity and security.

To protect themselves from Android malware distributed through the Play Store, users can take the following precautions:

  1. Download Apps from Trusted Sources: Stick to downloading apps only from the official Google Play Store. Avoid third-party app stores or unofficial sources, as they are more likely to host malicious apps.
  2. Check App Permissions: Review the permissions requested by apps before installing them. Be cautious if an app requests unnecessary or excessive permissions that seem unrelated to its functionality.
  3. Read App Reviews and Ratings: Check the reviews and ratings of apps before downloading them. Look for red flags like negative reviews, low ratings, or complaints about suspicious behavior.
  4. Keep Software Updated: Ensure that your Android device’s operating system, as well as apps, are regularly updated to the latest versions. Updates often include security patches that protect against known vulnerabilities.
  5. Use Security Software: Install reputable antivirus or mobile security software on your Android device. These applications can detect and prevent malware infections.
  6. Enable Google Play Protect: Google Play Protect is a built-in security feature that scans apps on your device and helps identify and remove potentially harmful applications.
  7. Be Cautious with Links and Attachments: Avoid clicking on suspicious links or downloading attachments from unknown sources, especially via emails, messages, or pop-up ads.

By following these practices and being vigilant about the apps they download and the permissions they grant, Android users can significantly reduce the risk of falling victim to malware distributed through the Play Store. Regularly reviewing device settings and staying informed about potential threats also helps maintain a more secure mobile experience.