Generic Ransomware Detection on macOS
This brief outlines a method for generically detecting ransomware on macOS by monitoring file I/O events and identifying the rapid creation of encrypted files by untrusted processes, as proposed by Objective-See.
This research, published by Objective-See in April 2016, explores techniques for generic ransomware detection on macOS. The core concept revolves around monitoring file system events to identify processes rapidly creating encrypted files. The research highlights the increasing prevalence of ransomware, even on macOS, citing examples like KeRanger, which infected thousands of Mac users via a compromised version of Transmission. The author proposes a detection mechanism that leverages file I/O monitoring, encryption detection, and trust assessment of processes to identify and potentially block ransomware activity. The aim is to provide a proactive defense against new and unknown ransomware variants that evade traditional signature-based antivirus solutions. This research has version 1.0, meaning, likely room for improvement.
Attack Chain
- The user downloads and executes a malicious application, or a legitimate application compromised with ransomware (e.g., KeRanger in Transmission).
- The ransomware component initiates, often after a period of dormancy.
- The ransomware process begins enumerating files within the user’s home directory (/Users) and potentially other locations like /Volumes.
- For each targeted file, the ransomware process opens the file for reading and writing (O_RDWR).
- The process reads the file content into memory.
- The ransomware uses a cryptographic algorithm (e.g., libsodium) to encrypt the file content.
- The encrypted content is written back to the file, overwriting the original data. The encrypted files may have a new extension, such as “.encrypted”.
- A ransom note (e.g., README_FOR_DECRYPT.txt) is created in directories containing encrypted files, providing instructions for payment and decryption.
Impact
A successful ransomware attack can result in the complete loss of access to user data. Organizations and individuals affected by ransomware face potential financial losses due to ransom payments, business disruption, and recovery costs. The research mentions that CryptoWall 3.0 ransomware operators made $325 million, highlighting the financial incentives driving ransomware development and deployment. The KeRanger ransomware infected thousands of Mac users.
Recommendation
- Deploy the Sigma rule
macOS Ransomware File Creationto detect suspicious file modifications by untrusted processes within user directories based on file I/O events. - Monitor process creation events and correlate them with file modification events, specifically targeting processes not signed by Apple or baselined using the
Untrusted Process Creating Encrypted FilesSigma rule. - Implement file integrity monitoring (FIM) on critical user directories to detect unauthorized file modifications, complementing the generic ransomware detection approach.
Detection coverage 2
macOS Ransomware File Creation
highDetects rapid creation or modification of files with potential ransomware extensions by untrusted processes.
Untrusted Process Creating Encrypted Files
mediumDetects an untrusted process rapidly creating encrypted files by monitoring process creation and file modification events.
Detection queries are available on the platform. Get full rules →