Updated macOS Cryptominer Uses Fresh Evasion TechniquesResearchers: OSAMiner Uses Run-Only AppleScripts for Obfuscation
Sentinel Labs researchers have identified an updated version of the cryptominer OSAMiner that targets the macOS operating system to mine for monero.
See Also: Automating Security Operations
The latest iteration uses new techniques to help prevent detection by security tools, the researchers report.
OSAMiner, which has been active since 2015, has been distributed through hacked video games, such as League of Legends, as well as compromised versions of software packages, including Microsoft Office for macOS, Sentinel Labs says.
The malware now uses multiple versions of AppleScript - a scripting language used in macOS devices - to support obfuscation. OSAMiner's operators released the latest version of the cryptominer in 2020, but researchers only recently discovered the enhancements, according to the researchers' report.
"In late 2020, we discovered that the malware authors, presumably building on their earlier success in evading full analysis, had continued to develop and evolve their techniques," says Phil Stokes, a threat researcher at Sentinel Labs. "Recent versions of macOS.OSAMiner add greater complexity by embedding one run-only AppleScript inside another, further complicating the already difficult process of analysis."
OSAMiner uses run-only AppleScripts to make reverse-engineering of its code difficult, the researchers say. To decompile the malicious malware scripts, Sentinel Labs researchers had to use a relatively lesser-known AppleScript-disassembler project and another custom tool developed by the security firm.
The Sentinel Labs team found the malware authors had embedded additional characters to obfuscate its processes. Once those embedded scripts were decompiled, the researchers determined the malware uses four methods to execute the run-only AppleScript:
- A script to ensure persistence for the parent script;
- A parent script for gathering the device serial number and for killing all the running processes in the device;
- An anti-analysis AppleScript to perform evasion tasks from certain consumer-level monitoring and cleanup tools;
- A script that downloads and sets up XMR-STAK-RX, a free, open-source monero RandomX miner software package.
The researchers say that once the malware has compromised a macOS device, it will seek to kill several processes, including Activity Monitor, which prevents the user from inspecting resource usage.
Other security researchers have reported attacks targeting macOS devices to plant cryptominers or other types of malware.
Earlier this month, researchers at Intezer Labs uncovered a campaign using a remote access Trojan dubbed ElectroRAT that had been stealing cryptocurrency from digital wallets on Windows, Linux and macOS platforms (see: ElectroRAT Malware Targets Cryptocurrency Wallets).
In December, researchers at Trend Micro uncovered a macOS backdoor variant linked to an advanced persistent threat group operating from Vietnam. The malware used an updated backdoor and multistage payloads as well as anti-detection techniques to help bypass security tools (see: Fresh MacOS Backdoor Variant Linked to Vietnamese Hackers).
In July 2020, the security firm ESET reported a group of spoofed cryptocurrency trading apps was targeting devices running macOS to install malware called Gmera (see: Malicious Cryptocurrency Trading Apps Target MacOS Users).