Skip to content
Access control Write-up Advanced

From iPhone to NT AUTHORITY\SYSTEM

The Apple Mobile Device Service, running as SYSTEM, granted full control to standard users on pairing certificate files inside a world-writable folder. By creating a native hardlink from such a file to a protected system DLL, an attacker could have the service change that DLL's permissions and then overwrite it to gain SYSTEM privileges.

decoder.cloud

Published on decoder.cloud

As promised in my previous post , I will show you how to exploit the “Printconfig” dll with a real world example.

The author, on decoder.cloud

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 with a user shell could escalate to SYSTEM privileges, though the authors note that in a remote scenario they would need to wait for a device to be plugged in, and that newer Windows builds block hardlink creation without write access to the target.

What the attacker needed

User shell on the Windows machine; iTunes with Apple Mobile Device Service installed; ability to create native hardlinks; device plug-in to trigger permission change

The fix

Apple did not fix the issue in the releases mentioned; the authors suggest removing write permissions for Users on the Lockdown folder as a workaround.

How it was found

  1. Locate the world-writable Lockdown folder used by the Apple Mobile Device Service.
  2. Plug in an Apple device so a pairing certificate file is created, then unplug and replug to trigger the permission change.
  3. Create a native hardlink from the pairing certificate file to a protected system file such as a DLL.
  4. Plug the device in again so the service grants full control on the linked destination file.
  5. Overwrite the destination DLL with a malicious one and start an XPS print job to run code as SYSTEM.

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 Windows programs run with the highest possible permission level, called SYSTEM. This Apple service was giving ordinary users full control over a file in a folder anyone could write to. Because Windows hardlinks let two file names point to the same data, a user could make that file name point at a protected system file, so the service would loosen permissions on the protected file too, letting the user replace it with malicious code.

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.

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.