Finding and reporting a Gatekeeper bypass exploit with help from Mac Monitor
Two vulnerabilities in macOS allowed an attacker to bypass Gatekeeper by evading File Quarantine, enabling execution of malicious binaries. One involved a Mach-O binary named with a resource fork prefix that was not quarantined; the other involved a browser that failed to apply quarantine attributes despite being opted in.
Published on redcanary.com
Subscribe
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, macOS failed to apply quarantine flags to files with certain names (like those starting with '._') and to downloads from an application that had opted into File Quarantine but still did not apply the attribute.
What the attacker needed
MacOS system; user downloads and runs a crafted file
How it was found
- Compile a simple Mach-O binary with the prefix '._'.
- Compress it into an archive.
- Download it with Safari (a File Quarantine-aware app).
- Observe that the file was not quarantined and was readily executable.
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.
Gatekeeper is a macOS security feature that checks downloaded apps before they run. File Quarantine is the part that marks downloads as potentially unsafe. The researchers found ways to make macOS skip that marking, so a malicious app could run without the usual warning.
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.