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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2021-4034 PoC — polkit 缓冲区错误漏洞

Source
Associated Vulnerability
Title:polkit 缓冲区错误漏洞 (CVE-2021-4034)
Description:polkit是一个在类 Unix操作系统中控制系统范围权限的组件。通过定义和审核权限规则,实现不同优先级进程间的通讯。 polkit 的 pkexec application存在缓冲区错误漏洞,攻击者可利用该漏洞通过精心设计环境变量诱导pkexec执行任意代码。成功执行攻击后,如果目标计算机上没有权限的用户拥有管理权限,攻击可能会导致本地权限升级。
Readme
# CVE-2021-4034

This is a PoC for PwnKit __*Local Privilege Escalation Vulnerability*__ 
that was discovered by [Qualys Security Team](https://blog.qualys.com/vulnerabilities-threat-research/2022/01/25/pwnkit-local-privilege-escalation-vulnerability-discovered-in-polkits-pkexec-cve-2021-4034).

>The Qualys Research Team has discovered a memory corruption vulnerability in polkit’s pkexec, a SUID-root program that is installed by default on every major Linux distribution.

#### Proof Of Concept

*The following image is used to show the payload in action in a debian based operating system*

![poc.png](https://i.imgur.com/V5I8SBf.png)

#### Usage

- There are two POCs provided a self-contained that does not require any dependencies installed in the vulnerable endpoint i.e GCC.

#### Recommendations 
- The immediate recommendation was to remove the `SUID` bit of the polkit binary/executable. 
File Snapshot

[4.0K] /data/pocs/2d2096eadc0c07771e2a74dfec24a145a16379a7 ├── [ 281] Makefile ├── [ 18K] pwnkit ├── [4.5K] pwnkit.c ├── [ 904] README.md └── [4.0K] self-contained-version ├── [2.6K] pwnkit.c └── [ 362] README.md 1 directory, 6 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.