Triada
- Type
- Backdoor
- Capabilities
- Credential theftCrypto theftPersistencePrivilege escalationProcess injection
- Delivery
- Cracked software
- Platforms
- Android
Triada is a modular Android backdoor family first discovered in 2016. Early variants spread as ordinary applications and exploited Android vulnerabilities to obtain root privileges. More recent variants predominantly arrive preinstalled in device firmware or system applications, compromising devices before they reach their owners. Affected systems include inexpensive Android smartphones and tablets, including newly purchased devices deployed in corporate fleets.
Triada operates with system privileges, embeds itself in core operating-system processes, and injects malicious modules directly into the memory of both system and user-installed applications. Its modular architecture allows operators to download additional payloads and extend functionality according to their objectives. Known modules intercept calls and SMS messages, steal messaging and social-network credentials, substitute browser links, steal cryptocurrency, and turn infected devices into reverse proxies. Some campaigns have used Triada to install xHelper, enabling concealed subscription fraud that consumes victims’ prepaid airtime.
Firmware-resident infections provide persistence that ordinary application removal and standard operating-system cleanup cannot reliably eliminate. Distribution involves compromised firmware supply chains, including malicious firmware supplied by contractors or infected components incorporated during device assembly. The original BADBOX operation used a firmware-level Triada backdoor; this relationship does not establish that later BADBOX iterations use Triada. The family affects both individual consumers and organizations, exposing communications, accounts, financial assets, and device network connections to abuse.
Associated threat actors
1 distinct threat actor Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
"...redirect unsuspecting site users to ... malware, including an Android malware called Triada in one case."
Techniques & procedures
54 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
3 techniques
Initial Access
Open browser pages with ads repeatedly.
In time, threat actors turned to reflashing and silent installation as techniques for malicious activities... In 2021, we were studying detections of the SMS PVA mobile botnet fueled by compromised mobile supply chain attacks when we discovered the botnet and the operations of the threat actors.
The response contains a task to periodically substitute links opened in the browser... we believe that the malware creators could also use this functionality for, say, phishing
Execution
10 techniques
Execution
Finally, because of the backdoor’s connection to C2 servers on BADBOX-infected smartphones, tablets, and CTV boxes, new apps or code can be remotely installed by the threat actors without the device owner’s permission.
It registers a malicious receiver that, upon receiving intents, can execute arbitrary JavaScript code using WebView
The backdoor also injected code that allowed it to use the Google Play app to download and install apps of the attackers’ choice.
Users of smartphones who do not receive security updates are less fortunate: in outdated versions of the OS, the malware is capable of not only loading additional apps, but installing them on the system partition.
After decryption, it is saved to disk as /data/data/%PACKAGE%/mms-core.jar and then loaded using DexClassLoader... The downloaded payload is decrypted... and loaded via DexClassLoader
Once the app is launched, the malware gathers unique device identifiers...
Don’t disable Google Play Protect, and avoid installing APKs from shady sources — this is the primary infection vector that bypasses the official app store.
the Trojan substitutes standard methods from Android Framework with methods implemented in libconfigpppl.so
In addition to installing apps that display ads, Triada injected code into four web browsers... The web browser injection was done to overwrite the URLs and substitute ad banners on websites with ads benefiting the Triada authors.
The latter is notable for its ad code embedded not just anywhere, but directly in libandroid_runtime — a key library used by almost all apps on the device.
Persistence
6 techniques
Persistence
A call to files from the xbin folder is added to the file install-recovery.sh , which allows Triada to run at system startup
If classes.dex is deleted from memory, it’s immediately restored, underscoring the persistence of the threat.
At some point between the manufacturing of these products and their delivery to resellers... a firmware backdoor—based on Triada malware—gets installed.
The T95 device examined by the Satori team, upon booting up, immediately injected the com.jar library into process memory and connected with a C2 server.
подозрительную библиотеку загружал в Zygote — родительский процесс для любого Android-приложения — зараженный AOT-скомпилированный системный фреймворк Android (boot-framework.oat)... библиотека binder.so
the malware steals the Facebook authentication cookies... This file stores Telegram authentication data including the user’s token, which allows the attackers to gain complete control over the victim’s account
Privilege Escalation
6 techniques
Privilege Escalation
A call to files from the xbin folder is added to the file install-recovery.sh , which allows Triada to run at system startup
The T95 device examined by the Satori team, upon booting up, immediately injected the com.jar library into process memory... The classes.dex file created by the decryption of classes.png is injected into the above launcher process.
the malware targets earlier versions of the OS... vulnerabilities that can be exploited to gain root access
The T95 device examined by the Satori team, upon booting up, immediately injected the com.jar library into process memory and connected with a C2 server.
подозрительную библиотеку загружал в Zygote — родительский процесс для любого Android-приложения — зараженный AOT-скомпилированный системный фреймворк Android (boot-framework.oat)... библиотека binder.so
The first target was injected to get the GET_REAL_TASKS permission... Instead it executed additional code in the System UI app, which has the GET_REAL_TASKS permission.
Stealth
15 techniques
Stealth
This module undergoes a double XOR decryption process... After downloading, the modules were decrypted twice using XOR with different keys
the DEX files are downloaded and saved. Then these files are downloaded in the context of the malicious program using DexClassLoader.loadClass()
All field values within the configuration are encrypted using AES-128 in ECB mode and then encoded with Base64... The infected device receives the key and initialization vector (IV) RSA-encrypted from the C2
classes.png, the filename of which suggests an image file, is actually an encrypted file that, when decrypted, turns into classes.dex.
The T95 device examined by the Satori team, upon booting up, immediately injected the com.jar library into process memory... The classes.dex file created by the decryption of classes.png is injected into the above launcher process.
If these files were updated earlier than the last response was received, the Trojan deletes these files
After that, the modules are removed from the disk, i.e. they only remain in device memory
When the app starts, the payload is decrypted and launched. In this case, it is located in a long string in the app code.
If classes.dex is deleted from memory, it’s immediately restored, underscoring the persistence of the threat.
At some point between the manufacturing of these products and their delivery to resellers... a firmware backdoor—based on Triada malware—gets installed.
The Trojan substitutes the function to hide its modules from this list... running services... running applications... installed packages
the Trojan substitutes standard methods from Android Framework with methods implemented in libconfigpppl.so
In addition to installing apps that display ads, Triada injected code into four web browsers... The web browser injection was done to overwrite the URLs and substitute ad banners on websites with ads benefiting the Triada authors.
The latter is notable for its ad code embedded not just anywhere, but directly in libandroid_runtime — a key library used by almost all apps on the device.
the modules are removed from the disk, i.e. they only remain in device memory
Defense Impairment
4 techniques
Defense Impairment
All files in the target folders are assigned the immutable attribute, which makes it difficult to delete the malware
the malware steals the Facebook authentication cookies... This file stores Telegram authentication data including the user’s token, which allows the attackers to gain complete control over the victim’s account
The code for displaying ads (or its loader) gets into the firmware of the device even before it ends up in the hands of the consumer.
the Trojan downloads and installs several more malicious programs ... and deletes root access control applications, such as Superuser
Credential Access
5 techniques
Credential Access
the Trojan then swaps the crypto wallet address with a hardcoded one and replaces the click handlers of all buttons in the application with a proxy handler... replaces image elements with generated QR codes
The level at which BADBOX infects devices... allows the threat actors to intercept text messages before they reach the user.
This file contains the cookies for active Instagram sessions... the malware steals the Facebook authentication cookies... designed for stealing Instagram cookies from web browsers
the Trojan begins reading internal Skype files... tries to extract a token... from the React Native framework keychain... reads various keys essential for the client’s operation, as well as data about the active session
the malware steals the Facebook authentication cookies... This file stores Telegram authentication data including the user’s token, which allows the attackers to gain complete control over the victim’s account
Discovery
3 techniques
Discovery
Immediately upon starting, the binder.so library reads the file /proc/%PID%/cmdline... This is how the Trojan determines the package name of a running app
Before starting work, the malicious program collects the following information: Name of the device Version of the operating system Size of the SD card Information about device memory... IMEI IMSI List of applications installed
List of applications installed
Lateral Movement
1 technique
Lateral Movement
The backdoor also injected code that allowed it to use the Google Play app to download and install apps of the attackers’ choice.
Collection
4 techniques
Collection
читает строку с ключом user... содержимое файла tgnet.dat... строку с id = 1 из таблицы params в базе данных cache4.db... собирает все файлы
the Trojan then swaps the crypto wallet address with a hardcoded one and replaces the click handlers of all buttons in the application with a proxy handler... replaces image elements with generated QR codes
Without needing either permissions or requests, they can steal information, intercept authentication codes... Threat actors “trained” them... to forward incoming texts to their own servers...
The Trojan also monitors the clipboard contents and, if it finds a crypto wallet address, it gets replaced with an address belonging to the attackers
Command and Control
7 techniques
Command and Control
For one, it used XOR encoding and ZIP files to encrypt communications.
We identified the infrastructure of their backend, including the malicious plugins and command and control (C&C) servers... Pivoting on http response of the domain led us to identify other Lemon Group C&C domains
the malware periodically transmits a wealth of device information... to its command-and-control server... The C2 responds with a JSON file
the main purpose of this module is to turn the infected device into a reverse proxy, essentially giving the attackers network access through the victim’s device
First, it establishes a connection with the C2 server over TCP sockets... The server responds with an IP address and port, which the malware uses to listen for commands
The backdoor is used to inject additional modules into device memory... One of the modules deposited by the C2 servers enables BADBOX-infected smartphones, tablets, and CTV boxes to create WebViews fully hidden from the eyes of the owner.
в последних версиях этот модуль запрашивает конфигурацию из репозитория на GitHub: при помощи генератора псевдослучайных чисел образец выбирает число 0, 1 или 2, каждому из которых соответствует адрес конкретного репозитория
Exfiltration
2 techniques
Exfiltration
the Trojan obtains SMS data... Then, if a network connection is available, it sends this data to a random C&C server
BRATA has exfiltrated data to the C2 server using HTTP requests.
Impact
1 technique
Impact
This library uses the xhook library to intercept calls to the getaddrinfo and android_getaddrinfofornet functions... If the attackers have sent a command to block a specific domain, its name is replaced by a hook redirecting to 127.0.0.1
Observables
115 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
71 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.