macOS Privilege Escalation Via Traceroute6
Where
Talks
Objective by the Sea v8.0
Duration
24 min
Walks through a macOS user-to-root exploit chaining four bugs, a libmalloc technique, and a PAC bypass.
Summary
Paweł Płatek walks through a user-to-root local privilege escalation exploit for macOS that chains four bugs across mDNSResponder, traceroute6 and libinfo. The story starts with an overflow in traceroute's host lookup that crashes the tool but is blocked by stack protections. Following the lookup into libinfo, the research shows the local DNS client can be redirected to an attacker-controlled socket, exposing a parser where a counter wraps and writes before a buffer.
Turning this into a heap underflow required changing how libmalloc lays out memory, since the overflow otherwise lands in unmapped space. Allocating and freeing a large block forces the heap to grow downward. A privilege-dropping mistake in traceroute6, where the effective UID is set before the real UID, lets the process restore root. Platform libraries are randomized only once per boot, so a function pointer can be located from inside the process. On Apple silicon the heap sits closer to metadata, and a region-trailer technique is used to reach a control pointer.
The last hurdle is pointer authentication. Platform binaries share a signing key, so the exploit uses an Apple-signed tool with protections disabled to sign a pointer on its behalf. The talk closes with three takeaways: the region-trailer technique for libmalloc, a refresher on setuid pitfalls, and a way to bypass PAC in local exploits.
Materials
Related talks
Talks·21 min
Gergely Kalman · Csaba Fitzl
Walks through developing a macOS privilege escalation and sandbox escape exploit via a race condition in a root helper daemon.
Talks·29 min
Presents a zero-click remote code execution exploit against Apple Compressor.
Talks·37 min
Ian Beer
Shows how a read-only XNU virtual memory flaw that zeroes pages can be turned into a root exploit on macOS.


