Bypass TCC via iCloud
Two Apple apps, GarageBand and iMovie, could be made to load attacker-controlled code because of weak library validation and missing hardened runtime, letting an attacker use their iCloud entitlements to obtain the user's iCloud tokens and read TCC-protected data such as contacts, calendars and location.
Published on wojciechregula.blog
These vulnerabilities were first disclosed at TyphoonCon in Seoul during my talk What happens on your Mac, stays on Apple’s iCloud?! Bypassing Mac privacy mechanisms.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the apps were signed with a private iCloud entitlement but lacked hardened runtime or library validation, so an attacker could inject a library and inherit that entitlement.
Impact
An attacker who can run code on the Mac could obtain the user's iCloud tokens and read TCC-protected data such as contacts, reminders, calendars and location; Apple later blocked downgrade attacks with an integrity denylist.
What the attacker needed
Ability to run code on the Mac; victim has an iCloud account
The fix
Apple removed the iCloud entitlement from GarageBand and later added the apps to the AppleMobileFileIntegrity denylist to stop downgrade attacks.
How it was found
- Find the iCloud XPC helper and confirm it requires the private iCloud entitlement.
- Search the filesystem for apps holding that entitlement and find GarageBand and iMovie.
- For GarageBand, use a dylib proxying attack against its @rpath frameworks.
- For iMovie, copy the app to /tmp and launch it with DYLD_INSERT_LIBRARIES pointing at a malicious dylib.
- Use the injected code to talk to the iCloud helper and save the returned tokens.
- Use a token to download location data from iCloud without going through TCC.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Some Mac apps are allowed to ask a system helper for your iCloud login tokens. The researcher found ways to make two of those apps run his own code, so his code could ask for the tokens too. With those tokens he could download private data like contacts and location that macOS normally protects.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.