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
How to solve Sudo Heap-Based Buffer Overflow Vulnerability — CVE-2021-3156?
Readme
### How to solve Sudo Heap-Based Buffer Overflow Vulnerability — CVE-2021-3156?

sudo Heap-Based Buffer Overflow Vulnerability — CVE-2021-3156 Original release date: February 02, 2021 Sudo has released an advisory addressing a heap-based buffer overflow vulnerability—CVE-2021-3156—affecting sudo legacy versions 1.8.2 through 1.8.31p2 and stable versions 1.9.0 through 1.9.5p1. 

![Screenshot from 2021-02-11 20-15-10](https://user-images.githubusercontent.com/69615463/107727177-e42f2300-6d14-11eb-82f3-03470e22f501.png)

![Screenshot from 2021-02-11 14-02-54](https://user-images.githubusercontent.com/69615463/107727109-bfd34680-6d14-11eb-97b1-fdf0e3164e3d.png)

<h4>Terminal Command:</h4>


<h6>Solution :</h6>

+ wget https://sudo.ws/dist/sudo-1.9.5p2.tar.gz
+ tar xvzf sudo-1.9.5p2.tar.gz
+ sudo apt install  make

![Screenshot from 2021-02-11 20-32-43](https://user-images.githubusercontent.com/69615463/107727250-0fb20d80-6d15-11eb-8f27-a8b13661d4c4.png)


+ sudo ./configure
+ make && sudo make install


+ sudo --version

![Screenshot from 2021-02-11 20-41-08](https://user-images.githubusercontent.com/69615463/107727314-2eb09f80-6d15-11eb-82d5-ef4e48dde246.png)

+ sudoedit -s /

![Screenshot from 2021-02-11 20-40-03](https://user-images.githubusercontent.com/69615463/107727353-4be56e00-6d15-11eb-981f-d2fdafbbb3a4.png)

 
File Snapshot

[4.0K] /data/pocs/651f2f1c0a68150663faad59ac3575c32b3bd7dc └── [1.3K] README.md 0 directories, 1 file
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 →