RatHat: New Android malware uses your smartphone via artificial intelligence

Written by Jason Miller

The researchers of Zimperium zLabs have spotted a new Android malware called RatHatcapable of employing artificial intelligence models to take remote control of infected devices. The threat, distributed via SMS, malvertising and phishing portals in the form of APK files outside the Google Play Store, aims to steal banking data, OTP codes and login credentials for crypto apps. According to technical analysis, Chinese-language instructions in prompts sent to LLMs link the code to East Asian-oriented attack groups.

Improperly exploiting the permissions of Accessibility of Android, RatHat independently activates the Developer Options and the Wireless Debugging. This mechanism allows it to obtain a highly privileged local shell without requiring a physical connection to an external computer, with an attack scheme similar to that of the ToxicPanda and RedHook families. Once ADB access is gained, the trojan installs the agent in Go liblocal-service.sodesigned to bypass limits on battery consumption and maintain persistence in the system by operating a double mutual protection with the main malware.

A second agent, called, operates alongside this component libmedia_codec.sowhich acts as an FRP reverse-proxy client to ensure a seamless communication channel to the attackers’ servers. On the data theft front, RatHat projects HTML overlays to capture home banking service credentials. The attack intercepts SMS messages, notifications containing one-time codes, unlock PINs, and screen tracking sequences, even going so far as to extract URLs directly from the browser’s address bar.

An automation engine driven by LLM models

The real differentiator of the malware is the integration of an AI-driven user interface automation engine. The malware converts the interface tree structure to XML format and sends it to a remote artificial assistant. The processing allows the system to identify the xy coordinates of the buttons, interpret the text displayed on the screen, and generate dynamic commands such as SCROLL_DOWN. According to the report published by the Zimperium laboratories, this technique makes the interaction significantly more flexible and elusive than the old rigid scripts with fixed coordinates.

In an attempt to thwart manual removal, RatHat intercepts the application uninstall confirmation window, cancels the operation, and overlays a fake Google Play Store screen with a fictitious error. The malware developers have also integrated several anti-analysis obfuscation techniques, including manipulation of APK containers and insertion of a disproportionate Android manifest from 61MB peppered with invalid DEX pseudo-instructions to crash the decompilation tools used by analysts.

The presence of AI-based mechanisms does not change the fundamental rules of digital hygiene. The manual installation of APK files outside of official channels and the granting of Accessibility permissions to unknown applications remain the two primary access doors for this type of vectors. The use of integrated automatic scanning systems such as PlayProtect remains the only active device capable of identifying anomalies in system files.

Jason Miller

I'm Jason Miller, and I've been passionate about technology and storytelling for over a decade. As a lead writer at Herald Editorials, I strive to bring clarity and creativity to complex tech topics. When I'm not writing, you'll find me exploring the latest gadgets or hiking in the great outdoors.