Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2024-48990-Automatic-Exploit — Automated local privilege escalation exploit for CVE-2024-48990 (needrestart v3.7), leveraging PYTHONPATH hijacking to gain root access. | Kitploit
Tools/GitHubGitHub/serner77/cve-2024-48990-automatic-exploit
Privilege EscalationVulnerability AnalysisExploitationPenetration TestingLearning & EducationPayload Development
GitHubserner77/cve-2024-48990-automatic-exploit

CVE-2024-48990-Automatic-Exploit

Share

Automated local privilege escalation exploit for CVE-2024-48990 (needrestart v3.7), leveraging PYTHONPATH hijacking to gain root access.

View Repository
924Oct 29, 2025Not yet reviewed

CVE-2024-48990 PYTHONPATH Hijack - Privilege Escalation Exploit

This tool automates the exploitation of a privilege escalation vulnerability in needrestart version 3.7, identified as CVE-2024-48990.
It achieves root execution by leveraging the insecure use of the PYTHONPATH environment variable when needrestart scans Python processes.

Summary

The exploit works by:

  1. Compiling a malicious shared object (__init__.so) that is triggered on import.
  2. Serving the .so via a local HTTP server.
  3. Connecting to the target via SSH and preparing a malicious PYTHONPATH environment.
  4. Launching a Python bait process that continuously imports importlib.
  5. Running needrestart, which inherits the manipulated PYTHONPATH, loads the malicious module, and executes the payload as root.
  6. The payload creates a SUID binary (/tmp/poc), allowing root shell access.

Usage

Run the exploit from your attacker machine:

python3 exploit.py --user <ssh_user> --host <target_ip> --att-ip <attacker_ip> --ssh-pass <ssh_password>

Parameters:

  • --user SSH username on the target
  • --host Target IP address
  • --att-ip Attacker IP (used for hosting the payload)
  • --ssh-pass SSH password (omit if using SSH keys)
  • --http-port Optional HTTP port (default: 8000)

CVE

  • CVE ID: CVE-2024-48990
  • Affected Software: needrestart version 3.7
  • Vulnerability Type: Insecure environment variable handling
  • Impact: Local privilege escalation to root

Cleanup

To remove exploit traces from the target:

rm -rf /tmp/malicious /tmp/poc /tmp/exploit.sh

Requirements

Attacker machine:

  • Python 3
  • pexpect (pip3 install pexpect)
  • gcc (for compiling the payload)
  • Open SSH access to the target
  • python3 -m http.server (automatically started by the script)

Target machine:

  • A vulnerable version of needrestart (v3.7)
  • A non-root user with sudo NOPASSWD rights for /usr/sbin/needrestart
  • Python 3 and curl installed

Disclaimer

This tool is provided for educational and authorized security testing purposes only. Do not use it on systems you do not own or without explicit permission.

Download Tool

Related Tools

  • PEASS-ng

    PEASS - Privilege Escalation Awesome Scripts SUITE (with colors)

  • PrivescCheck

    Privilege Escalation Enumeration Script for Windows

  • LinEnum

    Scripted Local Linux Enumeration & Privilege Escalation Checks

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    Callisto

    jetp1ane/callisto

    Automated binary vulnerability analysis tool that decompiles executables via Ghidra, scans pseudo-C code with Semgrep, and validates findings using GPT-3.5-Turbo to reduce false positives.

    2.3k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    One-tap Android kernel exploit app for CVE-2026-43499, providing privilege escalation via kernel module loading, with offset extraction and on-device analysis tools.

    839
  • 3

    DFRoot

    a2333c/dfroot

    Android root tool for Samsung Galaxy S25 Ultra (SM-S938B) that chains DirtyFrag CVE-2026-43284 and CVE-2026-43499 to gain root automatically at boot via KernelSU.

    447
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    386
  • 5

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    352
  • 6

    faraday

    infobyte/faraday

    Open-source and AI-powered cybersecurity tools for offensive security, vulnerability management, and autonomous pentesting. Built by hackers in Latin America, used worldwide.

    344

Explore all tools

Browse our collection of tools

View all tools →