
Exploit for CVE-2024-48990 - Privilege Escalation in Needrestart 3.7-3. For eductional purposes only
This repository contains an exploit for CVE-2024-48990, a privilege escalation vulnerability in Needrestart 3.7-3. The exploit leverages improper input handling to execute arbitrary code with elevated privileges.
The exploit consists of:
main.asm: Assembly shellcode used for privilege escalation.listener.sh: Python-based listener for monitoring exploitation success.Makefile: Automates the compilation and execution of the exploit.git clone https://github.com/ten-ops/CVE-2024-48990.git
cd CVE-2024-48990
make
This will:
__init__.so) inside /tmp/attacker/importlib/.listener.sh script to monitor the attack.To trigger the exploit, execute the following command:
sudo needrestart -r a
This forces Needrestart to load the malicious shared object, resulting in privilege escalation.
If successful, you should see:
Root obtained!, clear traces ...
1. Needrestart is often executed by administrators when updating or patching the server.
2. If the attacker injects the payload before an admin runs needrestart, they gain root without direct sudo access.
3. This is known as "privilege escalation by waiting" (time-of-use attack).
To mitigate this vulnerability:
/tmp/ and /var/tmp/ for suspicious activity.This exploit is for educational and research purposes only. Unauthorized use may violate applicable laws. The author is not responsible for any misuse.
CVE-2024-48990, Needrestart Exploit, Linux Privilege Escalation, Needrestart 3.7-3 Vulnerability, Linux Security, Ethical Hacking, Red Teaming, Root Exploit, Assembly Exploit, Cybersecurity Research