rshell is a C++ backdoor targeting macOS and Linux, associated with the China-linked cyberespionage group Iron Tiger, also known as APT27, LuckyMouse, and Emissary Panda. Identified samples include Mach-O executables for macOS and ELF executables for Linux, with samples dating to at least June 2021.
The backdoor collects host information, including a generated GUID, hostname, local IP addresses, username, and operating-system or kernel information. It exchanges unencrypted Binary JSON messages with its command-and-control server over TCP and uses periodic keepalive messages to maintain communication. Operators can start and terminate shells, execute commands, retrieve command output, list directories, transfer files, read and write files, and delete files. Examined macOS samples did not implement a built-in persistence mechanism.
In 2022, Iron Tiger distributed rshell through a supply-chain compromise of the legitimate MiMi messaging application's installer-hosting infrastructure. Trojanized macOS installers contained obfuscated JavaScript that downloaded and executed the backdoor. Malicious macOS installers were identified beginning with a version built on May 26, 2022. The same campaign delivered the separate HyperBro backdoor through compromised Windows installers. Identified rshell targets were associated with Taiwan and the Philippines, including a Taiwanese gaming development company.
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.
“MiMi chat installers have been compromised to download and install HyperBro samples for the Windows platform and rshell samples for the Mac OS platform.”
19 distinct techniques documented for this family, organized by ATT&CK tactic.
One of the group’s immediate post-exploitation steps often includes deploying web shells ... to execute commands and upload additional payloads.
Sekoia established that “MìMì” Messenger’s MacOS version is trojanized since May 26, 2022 to download and execute a Mach-O binary dubbed “rshell”.
0x0B EXECUTE_COMMAND Execute system command... 0x17 INTERACTIVE_SHELL Launch shell session
The group “cmd” contains three commands: init(): start a bash data(data): write data to the bash close(): ends up the bash.
The retrieved payload is written in the temp folder, chmoded with execution permission and then, executed
it is plausible that, following social engineering carried out by the operators, targeted users are encouraged to download this application, purportedly to circumvent Chinese authorities’ censorship.
PlugX is usually distributed as a package of several files. These files are composed to exploit a phenomenon called DLL search order hijacking (also called sideloading)... The malware thus gets the unwitting help of a trusted executable to run.
In some cases the attackers modified a clean installer in about 90 minutes, inserting obfuscated JavaScript into electron-main.js.
The next stage involved retrieving Donut shellcode through a masqueraded .woff resource... By placing malicious content behind a font-looking path or extension, the attacker makes the payload request appear like a routine static web asset.
PlugX is usually distributed as a package of several files. These files are composed to exploit a phenomenon called DLL search order hijacking (also called sideloading)... The malware thus gets the unwitting help of a trusted executable to run.
upload(path): opens a file in binary and write-only mode write(data, path): writes data to the specified file ... del(path): delete the specified file or directory
This “Hello message” to the C2 server contains: ... the IPv4 adresses
This “Hello message” to the C2 server contains: ... the current username
MITRE ATT&CK® Tactic Technique ID ... System Network Connections Discovery T1049
This “Hello message” to the C2 server contains: ... the hostname ... the kernel version.
The second type of commands, “file”, enable interactions with the filesystem: dir(path): returns a list of files and subdirectories for the specified path
down(path): opens a file in binary and read-only mode and returns the size of the file read(path): reads the specified file.
This backdoor uses BJSON (Binary JSON) over TCP sockets to communicate with its command and control server
this code, executed at the runtime, checks if the environment is MacOS (darwin) and then downloads the “rshell” implant from 139.180.216.65
read(path): reads the specified file. The file must first have been opened with the down command
78 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
9 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.