RatHat
- Type
- Banking trojan
- Capabilities
- Credential theftKeyloggingExfiltrationPersistencePrivilege escalationDefense evasion
- Delivery
- PhishingSmishingMalvertisingLanding pageLure
- Platforms
- Android
RatHat is an Android banking trojan that combines credential theft, surveillance, and remote device control. It is distributed through smishing, malicious advertisements, and phishing download pages, including counterfeit Google Play pages offering applications disguised as legitimate software. Campaigns have targeted Europe, Latin America, and Southeast Asia, with infections also observed in Russia and Belarus. Its financial targets include banking and cryptocurrency applications, Alipay, and WeChat Pay.
After obtaining Accessibility access, RatHat automates Android settings interactions to enable wireless debugging, reads the pairing details, and connects to the device’s local Android Debug Bridge service. This grants Android shell-user privileges rather than root access. Operators can then deploy an independent Go-based control service and an FRP reverse-proxy component for remote command execution, screen capture, and touch injection. The independent service can remain active after removal of the visible malicious application until reboot and can reinstall the application and restore permissions. RatHat also obstructs uninstallation and hides or changes its application identity.
RatHat steals credentials through HTML overlays targeting financial applications, logs Accessibility text changes, and intercepts SMS messages and notifications containing authentication codes. Its shell component collects raw touchscreen events, enabling reconstruction of PINs, passwords, and unlock patterns. Operators can retrieve contacts, photographs, files, and application information. On supported Android versions, native screen-capture and input utilities permit remote operation without the usual screen-recording prompt or indicator; Android 14 and later require an alternative app-based capture mechanism with user consent.
RatHat integrates Google Gemini Flash models to interpret interface descriptions when fixed navigation rules fail during wireless-debugging setup. A separate operator-panel feature analyzes stolen SMS messages to estimate account balances and prioritize victims. Observed AI functionality does not establish autonomous execution of fraudulent transfers. Its evolving management consoles support malware generation, signing, publishing, scheduled rebuilding to evade hash-based detection, and administration of separate deployments.
Techniques & procedures
51 distinct techniques documented for this family, organized by ATT&CK tactic.
Resource Development
1 technique
Resource Development
RatHat is primarily distributed through deceptive phishing sites promoted via malvertising.
Initial Access
3 techniques
Initial Access
The malware is reported to be distributed through malicious advertising, SMS messages and phishing websites that promote APK downloads outside Google Play.
“Attackers distribute it through malicious adverts and phishing text messages” and “V6 ... added phishing download-page templates.”
“The campaign relies on deceptive download pages promoted through text-message phishing, malicious advertising and third-party forums.”
Execution
6 techniques
Execution
RatHat installs an AI-assisted agent that runs system commands to steal information.
“After gaining a shell via the local ADB daemon, the malware drops and executes an agent written in Go.”
“With accessibility access, the malware silently taps through Developer Options, turns on Wireless Debugging, and reads the six-digit pairing code straight off the screen. It then pairs with the infected device.”
“RatHat ... is installed through a dropper that carries two encrypted assets, abusing native SessionInstaller APIs to bypass restrictions.”
“[It relies] on an automated multi-stage infection pipeline to break out of Android’s application sandbox and gain shell-level execution.”
“Fake apps lure victims into granting Accessibility access” and operators can “build, package, sign and publish malicious apps without leaving the console.”
Persistence
4 techniques
Persistence
“Once pairing succeeds, an operator can deploy a separate service written in Go with one click. It runs independently of the app...”
The malware monitors the foreground application and, upon detecting a targeted package, triggers the corresponding HTML injection mechanism.
“After receiving Accessibility access, RATHat navigates the phone’s settings, enables wireless debugging and reads the pairing code displayed on screen.”
The local-service is running outside the package lifecycle... if the app is not confirmed, then the app is reinstalled... granting every runtime permission automatically and re-granting Accessibility.
Privilege Escalation
7 techniques
Privilege Escalation
“Once pairing succeeds, an operator can deploy a separate service written in Go with one click. It runs independently of the app...”
The malware monitors the foreground application and, upon detecting a targeted package, triggers the corresponding HTML injection mechanism.
“After receiving Accessibility access, RATHat navigates the phone’s settings, enables wireless debugging and reads the pairing code displayed on screen.”
The local-service is running outside the package lifecycle... if the app is not confirmed, then the app is reinstalled... granting every runtime permission automatically and re-granting Accessibility.
RatHat uses the accessibility permissions users grant it to navigate your phone’s menu system and unlock Wireless Debugging ... then grants itself ADB Shell permissions. This effectively grants the malware admin access to your device.
Once the service is granted, SystemHelperService becomes the engine for every automated system change... Unlock Developer Options... Enable Wireless Debugging... scrape the 6-digit ADB Pairing Code and dynamic port.
The app can request Device Admin rights, which grants it the capability to wipe the device if an uninstall attempt is made.
Stealth
9 techniques
Stealth
“V6 obscured its frontend code” and “Scheduled rebuilding produces fresh files while keeping the underlying implant unchanged, helping campaigns evade detection methods that depend on recognizing previously recorded file hashes.”
The container tampering layer consists of declaring some files as directories in the zip, or setting the ZIP general-purpose encryption bit on some files. These modifications are ignored by Android libziparchive but not by unzip, apktool and other tools.
“Fake apps lure victims into granting Accessibility access,” and earlier campaigns used “cryptocurrency trading and adult entertainment decoys.”
“Scheduled rebuilding produces fresh files while keeping the underlying implant unchanged, helping campaigns evade detection methods that depend on recognizing previously recorded file hashes.”
“The Go agent abuses its execution in a shell environment to use the standard Android debugging tool getevent to read the raw device file the kernel writes to.”
The malware also contains four anti-analysis layers and one anti-debug layer to bypass Android’s security controls.
“The removal gap is important: deleting the visible app does not immediately stop the independent service, which survives until reboot.”
“The second stage is a DEX file loaded directly into memory through reflection.”
“Anti-Debugging: Checks for debuggers, Frida, Xposed, root indicators, and emulators.”
Defense Impairment
1 technique
Defense Impairment
RatHat actively prevents victims from uninstalling the malware. When an uninstall confirmation screen appears, the malware can intercept the process and cancel the removal and display a fake Google Play overlay, which shows a fraudulent error message.
Credential Access
7 techniques
Credential Access
“The service can ... inject touches using Android testing tools” and “Fake screens placed over targeted apps capture entered information.”
“The malware implements keylogging through three specialized mechanisms: it monitors accessibility text-change events ... reads browser address bars ... [and] can record, at the hardware level, where the user’s finger touched the screen.”
“Fake screens placed over targeted apps capture entered information.”
“RatHat also uses WebView-based HTML overlays that appear over targeted banking and crypto apps, presenting fake interfaces designed to capture users’ login credentials.”
“Combine that with SMS interception for 2FA codes and you’ve got full account takeover.”
An SMS receiver and notification listener work in tandem to intercept 2FA/OTP codes... /api/data/messages [carries] SMS bodies.
“cert.pem Device ADB certificate collected and uploaded by the malware” and “private.key Device ADB private key collected and uploaded by the malware.”
Discovery
5 techniques
Discovery
“[A] second component [is] scraping URLs straight out of browser address bars.”
The malware also contains four anti-analysis layers and one anti-debug layer to bypass Android’s security controls.
“The removal gap is important: deleting the visible app does not immediately stop the independent service, which survives until reboot.”
„Командите што ги испраќа C2 серверот ... овозможувајќи ... да собираат ... листа на инсталирани апликации.“
“Anti-Debugging: Checks for debuggers, Frida, Xposed, root indicators, and emulators.”
Lateral Movement
3 techniques
Lateral Movement
“RatHat uses automated taps to enable Developer Options and Wireless Debugging… then pairs with the phone’s local ADB service.”
“With accessibility access, the malware silently taps through Developer Options, turns on Wireless Debugging, and reads the six-digit pairing code straight off the screen. It then pairs with the infected device.”
“It pairs with the local Android Debug Bridge service, gaining access as the shell user, identified by Android as UID 2000.”
Collection
8 techniques
Collection
“Alongside remote control, the panel exposes stolen messages, credentials, contacts, photographs and files.”
“The service can ... inject touches using Android testing tools” and “Fake screens placed over targeted apps capture entered information.”
“The malware implements keylogging through three specialized mechanisms: it monitors accessibility text-change events ... reads browser address bars ... [and] can record, at the hardware level, where the user’s finger touched the screen.”
“Fake screens placed over targeted apps capture entered information.”
“RatHat also uses WebView-based HTML overlays that appear over targeted banking and crypto apps, presenting fake interfaces designed to capture users’ login credentials.”
“The service can capture screen content ... using Android testing tools without the usual screen-recording prompt or indicator.”
“[It] intercepts SMS messages.”
C2 commands allow collection of "credentials, files, lock screen PIN, pattern, or password, screen captures, keystrokes ... and a list of installed applications."
Command and Control
7 techniques
Command and Control
“[RatHat] establishes a covert communication channel with the command-and-control (C&C) server for remote access.”
“It runs independently of the app, opens a local HTTP server on port 7912 and remains reachable through a reverse tunnel to the attacker’s infrastructure.”
RatHat installs ... a proxy client that tunnels that stolen information back to the hacker.
“A deploy button starts a separate program written in Go that stays reachable through a reverse tunnel, a connection the phone opens to the operator's server.”
“Once pairing succeeds, an operator can deploy a separate service written in Go with one click” and “Downloaded testing tools retain recognizable filenames in the temporary deployment directory.”
The application authenticates against the local device's ADB daemon, thereby securing shell-level access... staging and launching both the Go Agent and the FRP Client.
“It runs independently of the app, opens a local HTTP server on port 7912 and remains reachable through a reverse tunnel to the attacker’s infrastructure.”
Exfiltration
1 technique
Exfiltration
Endpoints carry overlay-harvested credentials, lock-screen credential sync, SMS bodies, installed-application inventory, files, ADB certificates, logs, screen-monitoring data, and chunked video uploads.
Impact
1 technique
Impact
“RatHat can intercept and cancel uninstallation attempts.”
Observables
15 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
36 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.