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

Goal: 1000 CNY · Raised: 1336 CNY

100%

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;sudo堆溢出漏洞;漏洞检测
Readme
# sudo堆溢出漏洞(CVE-2021-3156)

## 漏洞概述

国外研究团队发现sudo堆溢出漏洞(CVE-2021-3156),漏洞隐藏十年之久,普通用户可以通过利用此漏洞,在默认配置的 sudo 主机上获取root权限。漏洞细节已在互联网上公开。

## 漏洞编号

CVE-2021-3156

## 漏洞综合评级

高危

## 漏洞影响范围

从1.8.2到1.8.31p2的所有版本

从1.9.0到1.9.5p1的所有稳定版本

## 修复版本:

Sudo 1.9.5p2或更新版本

## 漏洞危害:

本地提权

## 安全建议

Redhat等linux发行版已紧急发布修复补丁,建议用户尽快升级:

CentOS 系统用户:

1)CentOS 6:默认 sudo 在受影响范围,CentOS官方已停止更新;

2)CentOS 7:升级到 sudo-1.8.23-10.el7_9.1 或更高版本;

3)CentOS 8:升级到 sudo-1.8.29-6.el8_3.1或更高版本。

 

Ubuntu系统用户: 

1)Ubuntu 20.04 LTS版本用户,建议升级到如下版本: 

sudo - 1.8.31-1ubuntu1.2 

sudo-ldap - 1.8.31-1ubuntu1.2 

2)Ubuntu 18.04 LTS版本用户,建议升级到如下版本: 

sudo - 1.8.21p2-3ubuntu1.4 

sudo-ldap - 1.8.21p2-3ubuntu1.4

3)Ubuntu 16.04 LTS版本用户,建议升级到如下版本: 

sudo - 1.8.16-0ubuntu1.10 

sudo-ldap - 1.8.16-0ubuntu1.10 

建议您在升级前做好数据备份工作,避免出现意外。

## 脚本功能

该bash脚本是redhad官方提供的检测脚本!

想到这找exploit的伙伴是没有滴,点个star一起学习吧!

File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
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 →