Vulnerability & Exploit Database

Back to search

Mac OS X libxpc MITM Privilege Escalation

This module exploits a vulnerablity in libxpc on macOS <= 10.13.3 The task_set_special_port API allows callers to overwrite their bootstrap port, which is used to communicate with launchd. This port is inherited across forks: child processes will use the same bootstrap port as the parent. By overwriting the bootstrap port and forking a child processes, we can now gain a MitM position between our child and launchd. To gain root we target the sudo binary and intercept its communication with opendirectoryd, which is used by sudo to verify credentials. We modify the replies from opendirectoryd to make it look like our password was valid.

Free Metasploit Download

Get your copy of the world's leading penetration testing tool

 Download Now

Module Name

exploit/osx/local/libxpc_mitm_ssudo

Authors

  • saelo

References

Targets

  • Mac OS X x64 (Native Payload)

Platforms

  • osx

Architectures

  • x64

Reliability

Development

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/osx/local/libxpc_mitm_ssudo msf exploit(libxpc_mitm_ssudo) > show targets ...targets... msf exploit(libxpc_mitm_ssudo) > set TARGET <target-id> msf exploit(libxpc_mitm_ssudo) > show options ...show and set options... msf exploit(libxpc_mitm_ssudo) > exploit

Related Vulnerabilities