macOS Mojave Sandbox Distributed Notification Bypass
A vulnerability in macOS Mojave allows sandboxed applications to bypass sandbox restrictions and surreptitiously monitor user activities by registering for distributed notifications by name, circumventing intended privacy protections.
A vulnerability exists in macOS Mojave that allows sandboxed applications to bypass intended restrictions on distributed notifications. Apple’s macOS sandbox aims to prevent malicious applications from spying on users. However, a flaw exists where sandboxed applications can register to receive distributed notifications by name, such as “com.apple.DownloadFileFinished”, effectively circumventing the intended restrictions. This vulnerability, disclosed in November 2018, allows a sandboxed application to monitor user activities, such as file downloads, which would normally be prohibited. This affects fully patched macOS Mojave systems and likely other versions of macOS.
Attack Chain
- A malicious application is created and sandboxed on macOS.
- The application registers to receive specific distributed notifications by name (e.g.,
com.apple.DownloadFileFinished) usingCFNotificationCenterAddObserverorNSDistributedNotificationCenter. - The sandboxed application monitors system events by receiving distributed notifications.
- The application captures user activities, such as file downloads, screen lock/unlock events, screen saver start/stop, and bluetooth activity.
- Collected information is stored within the application’s sandbox.
- The application may then exfiltrate the collected data.
- The attacker gains unauthorized access to user activity data, violating user privacy.
Impact
Successful exploitation of this vulnerability allows sandboxed applications to bypass intended privacy protections and monitor user activities, such as file downloads and system events. This can lead to unauthorized access to sensitive information and a violation of user privacy. While the exact number of victims is unknown, this vulnerability affects any user running a vulnerable version of macOS with a sandboxed application exploiting this flaw.
Recommendation
- Monitor process creations for sandboxed applications using
CFNotificationCenterAddObserverorNSDistributedNotificationCenterregistering for distributed notifications by name (e.g.,com.apple.DownloadFileFinished). Deploy the Sigma ruleDetect Sandboxed Application Registering for Distributed Notifications by Nameto your SIEM. - Investigate any sandboxed applications that are observed to be receiving distributed notifications using the event names listed in the overview.
- Consider monitoring network connections made by sandboxed applications to detect potential data exfiltration attempts after gathering notification data.
Detection coverage 2
Detect Sandboxed Application Registering for Distributed Notifications by Name
mediumDetects sandboxed applications registering for specific distributed notifications by name, potentially bypassing sandbox restrictions to monitor user activity.
Detect Process Accessing Distributed Notification Center
lowDetects processes accessing the Distributed Notification Center which may indicate attempts to monitor system-wide events.
Detection queries are available on the platform. Get full rules →