Sploitus

Exploit for Improper Access Control in Xen

gitee · 2021-01-24

Exploit Code

MARKDOWN58 lines
## https://sploitus.com/exploit?id=0B07F723-B633-571D-896C-3D932230D9EB
# kernel_exploit_factory

Keep updating......

Linux kernel CVE exploit analysis report and relative debug environment. You don't need to compile Linux kernel and configure your environment anymore. 

This repository is to extract all Linux kernel exploit and relative debug environment. The test is on Qemu.

### 1.CVE-2015-8550

[writeup](https://blog.csdn.net/panhewu9919/article/details/100891770) 

**Test version**: Linux-4.19.65

**Protection**: 开启kaslr/SMEP,未开启SMAP。

**Vulnerability**: gcc 编译优化导致的**Double-Fetch漏洞**,可直接劫持控制流。

### 2. 4-20-BPF-integer

[writeup](https://www.cnblogs.com/bsauce/p/11560224.html) 

**Test version**: Linux-4.20.0-rc3

**Protection**: 开启SMEP,未开启kaslr/SMAP。

**Vulnerability**: Linux ebpf 模块中`queue_stack_map_alloc()`中**整数溢出**漏洞,导致堆溢出。修改虚表指针劫持控制流到`xchg eax, esp`。

### 3.CVE-2017-16995

[writeup](https://www.cnblogs.com/bsauce/p/11583310.html) 

**Test version**: Linux-4.4.110

**Protection**: 开启SMEP/SMAP/kaslr。

**Vulnerability**: Linux ebpf 模块**整数扩展**问题,主要问题是二者寄存器值类型不同,导致check函数和真正的函数的执行方法不一致。本漏洞不包含堆栈攻击或控制流劫持,仅用系统调用数据进行提权,是Data-Oriented Attacks在linux内核上的一个典型应用。

### 4. CVE-2020-8835

[writeup](https://www.cnblogs.com/bsauce/p/14123111.html)  	  [reference](https://xz.aliyun.com/t/7690)

**Test version**: Linux-5.5.0

**Protection**: 开启SMEP/SMAP/kaslr。

**Vulnerability**: kernel/bpf/verifier.c没有正确将64位值转换为32位(直接取低32位),发生**整数截断**,使得BPF代码验证阶段和实际执行阶段不一致,导致越界读写。

### 5. CVE-2020-27194

[writeup](https://www.jianshu.com/p/b6f11d8df37a)       [reference](https://github.com/willinin/CVE-2020-27194-exp)

**Test version**: Linux-5.8.14

**Protection**: 开启SMEP/SMAP/kaslr。

**Vulnerability**: eBPF验证程序中进行or操作时,`scalar32_min_max_or()`函数将64位的值赋值到32位的变量上,导致**整数截断**,进而错误计算了寄存器的范围,从而绕过bpf的检查,导致越界读写。