Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2021-3156 PoC — Sudo 缓冲区错误漏洞

Source
Associated Vulnerability
Title:Sudo 缓冲区错误漏洞 (CVE-2021-3156)
Description:Sudo before 1.9.5p2 contains an off-by-one error that can result in a heap-based buffer overflow, which allows privilege escalation to root via "sudoedit -s" and a command-line argument that ends with a single backslash character.
Description
CVE-2021-3156: Heap-Based Buffer Overflow in Sudo (Baron Samedit)
Readme
# CVE-2021-3156: Heap-Based Buffer Overflow in Sudo (Baron Samedit)

## Root Exploit (No BruteForce)

All research credit: **Qualys Research Team**
Check out the details on their [blog](https://blog.qualys.com/vulnerabilities-research/2021/01/26/cve-2021-3156-heap-based-buffer-overflow-in-sudo-baron-samedit).

Manually installed Ubuntu 20.04 LTS and Sudo version 1.8.31 on Docker container for testing purpose and running the command `sudoedit -s 'AAAAAAAAAAAAAAAAAAAA\'`.

## PoC

![poc1](src/poc1.png)

![poc2](src/poc2.gif)
File Snapshot

[4.0K] /data/pocs/ac572e3250992d020e2d399225041eec98343345 ├── [ 332] Dockerfile ├── [2.0K] exploit.c ├── [ 208] Makefile ├── [ 529] README.md ├── [ 599] shellcode.c └── [4.0K] src ├── [ 44K] poc1.png └── [114K] poc2.gif 1 directory, 7 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →