CVE-2022-0847 DirtyPipe 提权漏洞 复现
0x00 介绍
DirtyPipe (CVE-2022-0847) 是自 5.8 以来 Linux 内核中的一个漏洞,它允许覆盖任意只读文件中的数据。
其要求内核是5.8以上的才能利用
相关链接:
原文地址:https://dirtypipe.cm4all.com/
准备
创建一个低权限用户
我的环境是docker里面
uname -a
1 | Linux ae801d08733b 5.10.76-linuxkit #1 SMP Mon Nov 8 10:21:19 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
cat /etc/redhat-release
1 | CentOS Linux release 7.9.2009 (Core) |
0x02 复现
1 | https://github.com/Arinerron/CVE-2022-0847-DirtyPipe-Exploit.git |
编译报错如下图,要加上上 std=c99
1 | gcc exploit.c -o exp -std=c99 |
备份密码文件
1 | cp /etc/passwd /tmp/passwd |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Zeo's Security Lab!