rshell
- Type
- Backdoor
- Capabilities
- ReconnaissanceExfiltrationPost exploitation
- Delivery
- Fake update
- Platforms
- macOSLinux
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. Samples date to at least June 2021. It provides remote shell execution and filesystem access, including directory enumeration, file upload and download, reading and writing files, and deletion. On execution, it collects a generated host identifier, hostname, IP addresses, current username, and operating-system information. It exchanges commands, execution results, and host information using unencrypted Binary JSON over TCP, with periodic keepalive messages. Analyzed macOS samples did not implement persistence.
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; compromised Windows installers in the same operation delivered HyperBro rather than RShell. Identified RShell targets were associated with Taiwan and the Philippines and included a Taiwanese game-development company. Attribution to Iron Tiger was supported by infrastructure overlaps and connections to the group's HyperBro operations.
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.
“MiMi chat installers have been compromised to download and install HyperBro samples for the Windows platform and rshell samples for the Mac OS platform.”
Techniques & procedures
19 distinct techniques documented for this family, organized by ATT&CK tactic.
Resource Development
1 technique
Resource Development
One of the group’s immediate post-exploitation steps often includes deploying web shells ... to execute commands and upload additional payloads.
Initial Access
1 technique
Initial Access
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”.
Execution
5 techniques
Execution
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.
Stealth
3 techniques
Stealth
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.
Defense Impairment
1 technique
Defense Impairment
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
Discovery
5 techniques
Discovery
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
Collection
1 technique
Collection
down(path): opens a file in binary and read-only mode and returns the size of the file read(path): reads the specified file.
Command and Control
2 techniques
Command and Control
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
Exfiltration
1 technique
Exfiltration
read(path): reads the specified file. The file must first have been opened with the down command
Observables
78 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
10 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.