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是一款使用于类Unix系统的,允许用户通过安全的方式使用特殊的权限执行命令的程序。 Sudo 1.9.5p2 之前版本存在缓冲区错误漏洞,攻击者可使用sudoedit -s和一个以单个反斜杠字符结束的命令行参数升级到root。
Description
Root shell PoC for CVE-2021-3156
Readme
# CVE-2021-3156
#### Root shell PoC for CVE-2021-3156 (no bruteforce)
For educational purposes etc.

Tested on Ubuntu 20.04 against sudo 1.8.31

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).

You can check your version of sudo is vulnerable with: `$ sudoedit -s Y`.
If it asks for your password it's most likely vulnerable, if it prints usage information it isn't.
You can downgrade to the vulnerable version on Ubuntu 20.04 for testing purposes with `$ sudo apt install sudo=1.8.31-1ubuntu1`

#### Usage
`$ make`

`$ ./exploit`
File Snapshot

[4.0K] /data/pocs/b2cdca42f47893100315b02fa631bf29beb0fd89 ├── [ 332] Dockerfile ├── [2.0K] exploit.c ├── [ 208] Makefile ├── [ 692] README.md └── [ 599] shellcode.c 0 directories, 5 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.