Cyber Crime

Microsoft details techniques of Mac ransomware

Microsoft warns of different ransomware families (KeRanger, FileCoder, MacRansom, and EvilQuest) targeting Apple macOS systems.

Microsoft Security Threat Intelligence team warns of four different ransomware families (KeRanger, FileCoder, MacRansom, and EvilQuest) that impact Apple macOS systems.

The initial vector in attacks involving Mac ransomware typically relies on user-assisted methods, such as downloading and running fake or weaponized applications. The ransomware can also be delivered as a second-stage payload dropper or part of a supply chain attack. 

The experts state that malware creators abuse legitimate functionalities and implement various techniques to exploit vulnerabilities, evade defenses, or trick users into infecting their devices.

One of the most important capabilities of ransomware is the capability of targeting specific files to encrypt. Microsoft researchers observed various techniques used by ransomware families to enumerate files and directories on Mac.

FileCoder and MacRansom use the Linux find utility to search for selected files to encrypt. 

The FileCoder ransomware, for example, searches the “/Users” and “/Volumes” directories by invoking the find command twice, using different paths to enumerate and excluding the README file while searching the “/Users” path.

The researchers reported that KeRanger and EvilQuest use a sequence of opendir()readdir(), and closedir() library functions to get the list of files.

The KeRanger, MacRansom, and EvilQuest ransomware families utilize a combination of hardware- and software-based checks to avoid being executed in a virtual environment for analysis and debugging purposes.

Hardware-based checks include checking a device’s hardware model (MacRansom), checking the logical and physical processors of a device (MacRansom), checking the MAC OUI of the device (EvilQuest), and checking the device’s CPU count and memory size (EvilQuest).

Code-related checks include delayed execution (KeRanger), PT_DENY_ATTACH (PTRACE) for an anti-debugging trick that prevents debuggers from attaching to the current malware process (EvilQuest and MacRansom), P_TRACED flag to check whether malware is being debugged (EvilQuest), and time-based check (EvilQuest).

Persistence is maintained by creating launch agents or launch daemons or using kernel queues.

“The ransomware families we analyzed often share similar anti-analysis and persistence techniques. However, these same ransomware families differ in encryption logic. Some use AES-RSA encryptions, while others use system utilities, XOR routine, or custom encryption logic to encrypt files. These encryption methods range from in-place modification to creating a new file while deleting the original one.” reads the analysis published by Microsoft. “Common among the ransomware observed is adding a new extension or simply encrypting the file without adding any new one.”

While FileCoder uses the ZIP utility to encrypt files, KeRanger uses AES encryption in Cipher block chaining (CBC) mode to encrypt files. MacRansom employes a symmetric algorithm for encrypting files and decrypting its ransom note “._README_”

EvilQuest also uses a custom symmetric key encryption routine to encrypt victims’ files.

The researchers observed two EvilQuest variants using two mechanisms of keylogging (T1056.001), the API CGEventTapCreate and the IOHIDManagerCreate API.

EvilQuest uses a set APIs (NSCreateObjectFileImageFromMemory, NSLinkModule, NSLookupSymbolInModule, NSAddressOfSymbol) to implement in-memory execution-

“Ransomware continues to be one of the most significant threats affecting any platform. Our analysis of ransomware on Mac operating systems shows how its creators use various techniques to remain hidden from automated analysis systems or make manual inspection by analysts challenging.” Microsoft concludes. “Understanding ransomware routines and their effects on any device or platform is essential for individual users to take steps toward device and data protection.”

Follow me on Twitter: @securityaffairs and Facebook and Mastodon

[adrotate banner=”9″][adrotate banner=”12″]

Pierluigi Paganini

(SecurityAffairs – hacking, Mac ransomware)

[adrotate banner=”5″]

[adrotate banner=”13″]

Pierluigi Paganini

Pierluigi Paganini is member of the ENISA (European Union Agency for Network and Information Security) Threat Landscape Stakeholder Group and Cyber G7 Group, he is also a Security Evangelist, Security Analyst and Freelance Writer. Editor-in-Chief at "Cyber Defense Magazine", Pierluigi is a cyber security expert with over 20 years experience in the field, he is Certified Ethical Hacker at EC Council in London. The passion for writing and a strong belief that security is founded on sharing and awareness led Pierluigi to find the security blog "Security Affairs" recently named a Top National Security Resource for US. Pierluigi is a member of the "The Hacker News" team and he is a writer for some major publications in the field such as Cyber War Zone, ICTTF, Infosec Island, Infosec Institute, The Hacker News Magazine and for many other Security magazines. Author of the Books "The Deep Dark Web" and “Digital Virtual Currency and Bitcoin”.

Recent Posts

Experts warn of an ongoing malware campaign targeting WP-Automatic plugin

A critical vulnerability in the WordPress Automatic plugin is being exploited to inject backdoors and…

4 hours ago

Cryptocurrencies and cybercrime: A critical intermingling

As cryptocurrencies have grown in popularity, there has also been growing concern about cybercrime involvement…

6 hours ago

Kaiser Permanente data breach may have impacted 13.4 million patients

Healthcare service provider Kaiser Permanente disclosed a security breach that may impact 13.4 million individuals…

7 hours ago

Over 1,400 CrushFTP internet-facing servers vulnerable to CVE-2024-4040 bug

Over 1,400 CrushFTP internet-facing servers are vulnerable to attacks exploiting recently disclosed CVE-2024-4040 vulnerability. Over…

9 hours ago

Sweden’s liquor supply severely impacted by ransomware attack on logistics company

A ransomware attack on a Swedish logistics company Skanlog severely impacted the country's liquor supply. …

11 hours ago

CISA adds Cisco ASA and FTD and CrushFTP VFS flaws to its Known Exploited Vulnerabilities catalog

CISA adds Cisco ASA and FTD and CrushFTP VFS vulnerabilities to its Known Exploited Vulnerabilities…

22 hours ago

This website uses cookies.