Who Cares Where Waldo Is: Locating macOS Users Without Their Consent
This talk demonstrates multiple techniques to bypass macOS TCC (Transparency, Consent, and Control) and location service protections to track user location without authorization. The research highlights vulnerabilities in system components like the Weather widget, the Weather app, and Safari, as well as the exploitation of misconfigured entitlements in applications like iMovie and GarageBand. The speaker provides actionable insights for blue teams to detect unauthorized location access and malicious dylib injections. The presentation includes demonstrations of these bypasses and references to previously released red teaming tools.
Bypassing macOS Location Services and TCC via Entitlement Abuse
TLDR: This research demonstrates how to bypass macOS location privacy protections by exploiting misconfigured entitlements and architectural flaws in system-level applications. By leveraging dylib injection, downgrade attacks, and proxy manipulation, an attacker can extract precise user location data without triggering TCC prompts. Security researchers and red teamers should focus on auditing application entitlements and monitoring for unauthorized dylib loading to detect these stealthy exfiltration techniques.
Apple’s Transparency, Consent, and Control (TCC) framework is the primary gatekeeper for user privacy on macOS. For years, we have treated TCC as a hard boundary, assuming that even with root privileges, an attacker cannot access sensitive resources like location services without explicit user interaction. This assumption is dangerous. Recent research into macOS internals reveals that the system is riddled with architectural shortcuts that allow attackers to bypass these protections entirely, turning "privacy-preserving" features into a goldmine for location tracking.
The Illusion of Sandbox Isolation
The core of the problem lies in how macOS handles permissions for system-level applications. While the OS enforces strict sandboxing for third-party apps, many first-party components operate with elevated privileges and broad entitlements. When these components interact with location services, they often do so through mechanisms that do not verify the integrity of the calling process.
Consider the Weather widget and the associated Weather app. These services require location data to function, but they are also prone to leaking that data through logs. By monitoring the logs generated by locationd, an attacker can intercept precise coordinates. Because these logs are often globally readable, any process on the system can scrape them without needing special permissions. This is not a bug in the traditional sense; it is a failure of the system to treat location data as a sensitive, restricted resource throughout its entire lifecycle.
Exploiting Entitlements and Downgrade Attacks
The most effective way to bypass TCC is not to break the sandbox, but to abuse the entitlements already granted to trusted applications. Many applications, such as iMovie and GarageBand, carry the com.apple.private.icloud-account-access entitlement. This allows them to interact with iCloud services, including the Find My network.
If an attacker can inject a malicious dylib into these applications, they inherit these powerful entitlements. The system sees a trusted, signed application making a request and grants it access to iCloud tokens. Once the attacker has these tokens, they can authenticate as the user and query the Find My API to retrieve the device's location.
The critical vulnerability here is the lack of version checking in the code signing requirements. An attacker can perform a downgrade attack by replacing a modern, hardened version of an application with an older, vulnerable version that lacks modern security controls like hardened runtime. Because the system only checks if the binary is signed by Apple, it will happily execute the older, exploitable code.
Proxy Manipulation and TLS Interception
Another vector involves manipulating the network stack to intercept location requests. Many system services rely on CFNetwork for network communication. By setting the CFNETWORK_DIAGNOSTICS environment variable to 1, an attacker can force these services to log all HTTP requests to the console.
When combined with proxy manipulation, this becomes a powerful exfiltration tool. An attacker can configure a system-wide proxy and install a custom root certificate to intercept TLS traffic. While CVE-2024-44123 highlights the ease of adding custom certificates, the real issue is the lack of certificate pinning in many system services. By intercepting the traffic to weather-data.apple.com, an attacker can inject malicious responses or simply sniff the location data being sent to Apple's servers.
Practical Red Teaming and Detection
For a pentester, the goal is to identify applications that are not sandboxed or that carry excessive entitlements. Use the codesign -d --entitlements - /path/to/app command to inspect the entitlements of any binary you encounter. If you find an application that is not sandboxed and has access to iCloud or location services, it is a prime candidate for dylib injection.
Tools like Electronizer are invaluable for testing these scenarios, as they allow you to automate the injection process and observe how the application handles the modified environment. When testing, always look for applications that load third-party plugins or scripts, as these are the easiest entry points for code execution.
Defenders must shift their focus from perimeter security to process monitoring. Use Endpoint Detection and Response (EDR) solutions to flag any process that attempts to load a dylib from an unexpected location or that modifies the system's trust store. Furthermore, auditing the clients.plist file in /var/db/locationd/ can reveal which applications have been granted location access, providing a clear map of the potential attack surface.
The security of macOS location services relies on the assumption that only "trusted" code can access them. By proving that this trust is easily subverted through entitlement abuse and downgrade attacks, we highlight the need for more granular, version-aware permission checks. Stop trusting the binary signature alone and start scrutinizing the entitlements that define what a process is allowed to do.
CVEs
Vulnerability Classes
Tools Used
Target Technologies
Attack Techniques
OWASP Categories
All Tags
Up Next From This Conference
Similar Talks

Inside the FBI's Secret Encrypted Phone Company 'Anom'

Unmasking the Snitch Puck: The Creepy IoT Surveillance Tech in the School Bathroom




