Play the music and bypass TCC aka CVE-2020-29621
A macOS audio daemon, coreaudiod, loaded third-party plugins from a world-writable directory while holding a powerful entitlement that allowed full control of the TCC privacy database. An attacker could plant a malicious plugin to grant any app, such as Terminal, Full Disk Access without user consent.
Published on wojciechregula.blog
This vulnerability has been disclosed during my & Csaba’s talk “20+ ways to bypass macOS your privacy mechanisms” during Black Hat USA. It was a part of my COVID-19 lockdown research. 😉 In the end this vulnerability led to full TCC bypass as I was able to fully control the TCC database.
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
Impact
An attacker could grant any application Full Disk Access without user interaction, effectively bypassing TCC privacy controls.
What the attacker needed
Local access to the macOS system; ability to write to /Library/Audio/Plug-Ins/HAL
The fix
Apple fixed the vulnerability in macOS Big Sur 11.1.
How it was found
- Find a signed binary with the disable-library-validation entitlement, such as coreaudiod.
- Reverse engineer coreaudiod to locate the hardcoded plugin directory.
- Create a malicious HAL plugin that calls private TCC APIs.
- Copy the plugin into the audio plugin directory and restart the audio daemon.
- The plugin runs inside coreaudiod and grants Full Disk Access to Terminal.
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.
On macOS, a background program called coreaudiod handles audio and has special permission to manage privacy settings (TCC). It also loads extra audio plugins from a folder that normal users can write to. Because it did not check who made those plugins, someone could drop in a malicious plugin that runs with coreaudiod's high privileges and silently change privacy permissions.
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.