目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1000

100.0%

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

来源
关联漏洞
标题:Sudo 缓冲区错误漏洞 (CVE-2021-3156)
Description:Sudo是一款使用于类Unix系统的,允许用户通过安全的方式使用特殊的权限执行命令的程序。 Sudo 1.9.5p2 之前版本存在缓冲区错误漏洞,攻击者可使用sudoedit -s和一个以单个反斜杠字符结束的命令行参数升级到root。
Description
CVE-2021-3156非交互式执行命令
介绍
# CVE-2021-3156

![2021-02-10-02-18-07](images/450acf1a2f14793aafa987905b20eeba.png)

> This is a warehouse modification based on [@CptGibbon](https://github.com/CptGibbon/CVE-2021-3156 ) and supports arbitrary command execution.

相关阅读:[CVE-2021-3156 - Exploit修改](https://payloads.online/archivers/2021-02-09/1)

#### Root shell PoC for CVE-2021-3156 (no bruteforce)

For educational purposes etc.

Tested on :

- @CptGibbon Ubuntu 20.04 against sudo 1.8.31
- @Rvn0xsy Ubuntu 17.10

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 "Command"`

文件快照

[4.0K] /data/pocs/aa06167e628f596fb9fb4ed6feae6ce43c9a2f05 ├── [3.1K] exploit.c ├── [4.0K] images │   └── [101K] 450acf1a2f14793aafa987905b20eeba.png ├── [ 211] Makefile ├── [1.0K] README.md └── [ 607] shellcode.c 1 directory, 5 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 如果因为来源失效或无法访问,请发送邮件到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
    3. 神龙已为您对 POC 代码进行快照,为了长期维护,请考虑为本地 POC 付费/捐赠,感谢您的支持。