Pkexec Privilege Escalation
Post

Pkexec Privilege Escalation

PwnKit (ly4k)

This PwnKit contains a pretty good PwnKit binary for PKEXEC. In order to exploit it, we need to download the PwnKit.c binary and compile from our Kali:

(This is to compile with x32 architecture if x64 is needed, delete “-m32”)

1
gcc -m32 -shared PwnKit.c -o PwnKit -Wl,-e,entry -fPIC

Additionally, there is a compiled version of the binary with support for both architectures 32 and 64 bits.

Upload it to the victim machine and execute it, you can use your favorite Local Web Server