New RatHat Android Malware Uses AI and ADB to Steal Banking Credentials and OTPs

The malware uses artificial intelligence, Accessibility Service abuse, and Android Debug Bridge (ADB) pairing to steal banking credentials, payment PINs, one-time passwords, and lock-screen data.

RatHat is spread through smishing messages, malicious advertisements, phishing websites, and third-party download portals.

Victims are lured into manually installing APK files disguised as legitimate apps, including streaming services, browsers, and financial applications.

Unlike common Android malware, RatHat does not rely only on its malicious app. It uses a multi-stage infection chain to gain shell-level access, deploy native tools, and remain active even after the victim removes the original application.

RatHat Steals Banking OTPs

After installation, RatHat attempts to convince victims to enable its Accessibility Service. It uses localized HTML pages and financial or network-related lures to obtain the permission.

Once granted, the malware automates several sensitive actions. It opens Developer Options, taps the Build Number setting seven times, enables Wireless Debugging, and reads the ADB pairing code and port number displayed on the device screen.

Phishing site distributing RatHat malware (Source: zimperium)
Phishing site distributing RatHat malware (Source: zimperium)

RatHat then uses its embedded ADB library to pair with the device’s local ADB daemon. This gives the threat actors shell-level access without requiring a computer connected through USB.

The malware deploys two Go-based binaries disguised as Android native libraries. One, named liblocal-service.so, acts as a privileged local agent and runs from the /data/local/tmp directory.

The second, libmedia_codec.so, is a Fast Reverse Proxy client that creates a persistent tunnel between the infected phone and the attacker’s command-and-control server.

RatHat also includes an AI-driven UI automation feature. It serializes the device’s Accessibility tree into XML and sends selected data to a generative AI assistant.

The AI can identify screen coordinates, retrieve visible text, and suggest navigation actions such as scrolling. This allows the malware to adapt its actions in real time instead of following fixed automation scripts.

Enable Wireless debugging and get pairing code (Source: zimperium)
Enable Wireless debugging and get pairing code (Source: zimperium)

RatHat targets banking, cryptocurrency, payment, and messaging apps using fake HTML overlays. When a targeted app is opened, the malware displays a fraudulent screen designed to capture usernames, passwords, card details, and PINs.

It can also intercept SMS messages and notifications to steal OTPs and two-factor authentication codes. Its Accessibility-based keylogger tracks text-change events, including masked password fields.

The malware can additionally capture browser URLs from Chrome, Brave, Opera, Edge, DuckDuckGo, Samsung Internet, and other browsers. A more advanced feature uses the shell-level getevent tool to monitor raw touch data from /dev/input.

This enables RatHat to track screen coordinates and reconstruct PINs or unlock patterns using keypad layouts stored in its configuration, Zimperium said.

Indicators of Compromise

IOC / Artifact TypeIndicatorDescription / Detection Value
Malware familyRatHatAndroid banking Trojan with Accessibility abuse, local ADB pairing, AI-assisted UI automation, and persistent reverse tunneling
Native payloadliblocal-service.soGo-based privileged local agent masquerading as an Android native library

Note: IP addresses and domains are intentionally defanged (e.g., [.]) to prevent accidental resolution or hyperlinking. Re-fang only within controlled threat intelligence platforms such as MISP, VirusTotal, or your SIEM.

Join 16,000+ SOC teams using ANY.RUN to streamline threat investigations and reduce manual effort. Explore for your team 

Varshini
Varshini
Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies..

Trending News

Related Stories