Xamalicious Android malware distributed through the Play Store


Xamalicious Android malware distributed through the Play Store

Pierluigi Paganini
Xamalicious Android malware distributed through the Play Store December 27, 2023

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.

Xamalicious

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. “

Follow me on Twitter: @securityaffairs and Facebook and Mastodon

Pierluigi Paganini

(SecurityAffairs – hacking, Android)







Source link