Skip to content
Access control Write-up Intermediate

Bypassing the macOS Gatekeeper

A macOS Gatekeeper bypass was found where an application bundle could use a symbolic link to the system's Automator Application Stub binary, causing the app to execute without quarantine, signature, or notarization checks. An attacker could craft a malicious app that runs immediately upon opening, even if disguised as an image or PDF.

Ron Masas Follow

Published on breakpoint.sh

Earlier this year I discovered the wild world of iOS and macOS security. One of the OBTS conference talks just showed up on my Twitter feed, needless to say, I was hooked.

Ron Masas (@RonMasas), on breakpoint.sh

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, Gatekeeper did not properly validate that the executable inside an app bundle was the actual file and not a symbolic link to a trusted system binary, allowing the quarantine and signature checks to be bypassed.

Impact

An attacker could craft a malicious application that bypasses all Gatekeeper checks and executes immediately when opened, even if disguised as an image or PDF, potentially leading to malware infection.

What the attacker needed

MacOS Big Sur or Monterey; victim opens the crafted app

The fix

The vulnerability was fixed in macOS Monterey 12.1.

How it was found

  1. Create a simple Run Shell Script automation in Automator.
  2. Export it as an application.
  3. Inside the app's Contents/MacOS folder, remove the existing Automator Application Stub and replace it with a symbolic link to the system's Automator Application Stub.
  4. Zip the application.

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. The researcher found that by replacing a file inside an app with a shortcut (symlink) to a trusted system program, the app would run without any of those checks. This means a malicious app could run just by double-clicking it, even if it looked like a picture.

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.

More by Ron Masas

View all

5 more disclosed reports, best first.

More from Apple

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.