Stick That in Your root Pipe and Smoke It
Patrick Wardle demonstrates achieving local root privilege escalation and sandbox escapes in OS X via named pipe vulnerabilities and root daemons.
Summary
Architecture and Background
You may ask; "why would Apple add an XPC service that can create setuid files anywhere on the system - and then blindly allow any local user to leverage this service?" Honestly, I have no idea! The undocumented 'writeconfig' XPC service was recently uncovered by Emil Kvarnhammar, who determined its lax controls could be abused to escalate one's privileges to root. Dubbed ‘rootpipe,' this bug was patched in OS X 10.10.3.
Vulnerability Analysis
End of story, right? Nope, instead things then got quite interesting. First, Apple decided to leave older versions of OS X un-patched.
Exploitation and Demonstrations
Then, an astute researcher discovered that the OSX/XSLCmd malware which pre-dated the disclosure, exploited this same vulnerability as a 0day! Finally, yours truly, found a simple way to side-step Apple's patch to re-exploit the core vulnerability on a fully-patched system. So come attend (but maybe leave your MacBooks at home), as we dive into the technical details XPC and the rootpipe vulnerability, explore how malware exploited this flaw, and then fully detail the process of completely bypassing Apple's patch.
Remediation and Defensive Strategies
The talk will conclude by examining Apple’s response, a second patch, that appears to squash ‘rootpipe’…for now. Patrick Wardle is the Director of Research at Synack, where he leads cyber R&D efforts. Having worked at NASA, the NSA, and Vulnerability Research Labs (VRL), he is intimately familiar with aliens, spies, and talking nerdy. Currently, Patrick’s focus is on automated vulnerability discovery, and the emerging threats of OS X and mobile malware. In his personal time, Patrick collects OS X malware and writes OS X security tools. Both can be found on his website Objective-See.com
Related talks
Main Stage·18 min
Zheng · Bai
Zheng and Bai presents fasten your seatbelts we are escaping ios 11 sandbox: Apple's sandbox was introduced as "SeatBelt" in macOS 10.5 which provided the first full-fledged implementation of the MACF policy.
Main Stage·38 min
HexRabbit Chen
Exploiting netfilter nftables vulnerabilities in the Linux kernel to achieve privilege escalation under kernelCTF mitigations.
Main Stage·43 min
Ulf Frisk
Ulf Frisk unveils PCILeech, an open-source hardware tool performing direct memory access attacks to bypass OS protections and execute kernel shellcode.


