New RatHat Android Malware Deploys AI to Automate Device Control and Steal Banking Credentials

Reviewed byNidhi Govil

5 Sources

Share

Zimperium discovered RatHat, an AI-powered Android malware linked to China-based threat actors that abuses accessibility permissions to gain shell-level control. The banking trojan uses generative AI to navigate device interfaces, record screen touches, and steal credentials from apps like WeChat Pay and Alipay. With 162 infected apps found, the malware persists even after uninstall attempts, requiring a factory reset for complete removal.

RatHat Emerges as AI-Powered Android Malware Threat

Mobile security firm Zimperium has uncovered RatHat, a sophisticated Android malware that weaponizes artificial intelligence to automate device control and steal sensitive financial data

1

2

. The China-based threat actors behind this campaign have developed a banking trojan that fundamentally changes how malware operates on compromised devices. Unlike traditional Android malware that relies on hardcoded scripts, RatHat employs an AI-powered subsystem that interprets live screen layouts in real-time, making it significantly more adaptable and harder to detect

3

. Researchers have identified 162 infected apps in the wild, with command-and-control infrastructure spread across a dozen servers

1

. The malware primarily targets popular Chinese payment platforms like WeChat Pay and Alipay, though it can compromise any financial application.

Source: CNET

Source: CNET

How RatHat Infiltrates Android Devices

RatHat spreads through multiple distribution channels including smishing campaigns, malvertising, and deceptive third-party download portals that mimic the Google Play Store

2

5

. The infection begins when victims download what appears to be a legitimate app, such as Google Chrome, from a fake website designed to look like the official app store. Once installed, the malicious application requests accessibility services permissions while maintaining its disguise as a trusted program

1

. This social engineering tactic proves highly effective because users often grant these permissions without fully understanding the implications. The malware then abuses accessibility permissions to navigate the device's menu system autonomously, enabling Developer Options and activating Wireless Debugging without any user interaction

2

.

AI-Driven Automation Powers Advanced Credential Theft

What distinguishes RatHat from conventional Android malware is its integration with generative AI for operational control

4

. The malware serializes the device's live Android Accessibility tree into XML format and transmits it to a popular AI assistant, which Zimperium researchers found uses prompts written in Chinese

3

. This AI component identifies center coordinates of interface elements, determines actual on-screen text, and returns navigation instructions such as 'SCROLL_DOWN' to guide the malware's actions

2

. This AI to automate device control eliminates the need for operators to hardcode specific app layouts, allowing RatHat to adapt instantly when banking apps redesign their interfaces

5

. The system provides remote control capabilities without requiring real-time operator interaction, making the malware more autonomous and dangerous than traditional banking trojans.

Source: Mashable

Source: Mashable

Multi-Stage Architecture Enables Shell-Level Access

RatHat's technical architecture consists of three core components working in concert to maintain persistent control

3

. The malicious Android application serves as the initial entry point, while a Go-based agent (liblocal-service.so) executes commands with ADB shell privileges. Through Wireless Debugging and ADB pairing, the malware breaks out of Android's standard application sandbox to gain shell-level execution context

2

. This technique, similar to methods seen in ToxicPanda and RedHook malware families, grants RatHat admin-level access to the entire device. The third component, an FRP reverse-proxy client (libmedia_codec.so), establishes a persistent tunnel to attacker-controlled servers, creating a general-purpose backdoor that carries whatever commands operators want to execute

3

.

Screen Recording and Keylogging Capture Sensitive Data

Once established on a device, RatHat deploys multiple data collection mechanisms that records your screen touches to steal passwords and other credentials

4

. The malware captures raw touch input directly from the touchscreen, allowing it to recreate PIN codes and pattern unlock codes

1

. It also implements screen recording using Android's MediaProjection API and maintains a hardware-level keylogger executed by the Go Agent

3

. The malware intercepts SMS messages and notifications to capture one-time passwords, records text-change events, and extracts URLs from browser address bars. It displays HTML overlays atop targeted banking and cryptocurrency applications to perform credential theft in real-time

2

. This comprehensive surveillance operates silently in the background without triggering immediate red flags that would alert victims.

Advanced Persistence Defeats Standard Removal Methods

RatHat incorporates sophisticated anti-removal techniques that make it exceptionally difficult to eliminate

5

. When users attempt to uninstall the malicious app, RatHat intercepts the uninstall confirmation screen, cancels the procedure, and displays a fake Google Play overlay containing a bogus error message

2

. The malware's dual-agent architecture provides bidirectional restoration capabilities—the Go Agent restores the main malware if removed, while the malware reinstalls the agent if it's stopped

2

. Even after successful app uninstallation, attackers retain shell access through independent native daemons that persist outside the application lifecycle. Sav Wheeler from Malwarebytes confirmed that simply uninstalling the app proves ineffective because the malware maintains admin access through hidden secondary files

1

. The only reliable removal method requires a complete factory reset of the device.

Source: Hacker News

Source: Hacker News

Anti-Analysis Techniques Evade Security Detection

The developers of this new AI-powered malware have embedded multiple layers of anti-analysis and anti-debug checks to sidestep detection by security software

3

. RatHat employs container tampering by declaring certain files as directories in the package or setting ZIP encryption flags that confuse standard analysis tools while remaining functional on Android devices. The malware includes a manifest bomb—a bloated 61MB Android manifest file with undocumented chunk headers that cause automated analysis pipelines to crash or time out

2

. DEX bytecode poisoning introduces pseudo-instructions with invalid attributes that break disassembly tools, while dual string-encryption using Base64 encoding resists code analysis

3

. These sophisticated evasion techniques demonstrate the advanced capabilities of the China-based threat actors behind the campaign.

Protection Strategies and Detection Methods

Android users can protect themselves by following several critical security practices. Never download APK files from third-party app stores or click links in SMS messages from unknown sources

1

. Verify that you're using the official Google Play app by checking for address bars at the top of the screen—legitimate apps don't have URL bars. Denying accessibility services permissions serves as the critical final defense against mobile malware, as the software remains largely powerless without these advanced system privileges

1

. Wheeler noted that while downloading malicious applications is risky, following standard anti-phishing practices and avoiding accessibility permissions largely removes the threat. For detection, users should run antivirus scans using tools like Malwarebytes, which can identify RatHat infections

1

. Zimperium emphasizes that RatHat's multi-tiered architecture and real-time AI decision loops illustrate why traditional signature-based mobile security controls prove insufficient against modern threats

3

. Regular device scans with Google Play Protect and maintaining skepticism about app permission requests remain essential defensive measures.

Today's Top Stories

© 2026 TheOutpost.AI All rights reserved