
Python implementation of Netdata LPE exploit
A Python implementation of the Local Privilege Escalation (LPE) exploit for Netdata (CVE-2024-32019).
This script exploits a vulnerability in the ndsudo component where the PATH environment variable is not properly sanitized. This allows a local attacker to execute arbitrary commands as root by hijacking allowed binaries (such as nvme-list, ip, gem, etc. modify it as you need in the begining of the code).
FOR EDUCATIONAL PURPOSES ONLY. This code is intended for security researchers, CTF players, and system administrators to test their own systems. The author takes no responsibility for any misuse of this code. Do not use this against systems you do not have permission to test.
ndsudo binary in common installation paths (modify it if necessary)nvme-list, ip, gem, node, npm, etc.) to maximize success rate.exploit.py to the target machine):
git clone https://github.com/julichaan/CVE-2024-32019-ndsudo-local-privilege-escalation-NetData.git
cd CVE-2024-32019-Python
python3 poc.py