Sploitus

Exploit for Off-by-one Error in Sudo Project Sudo

gitee Β· 2021-02-02

Exploit Code

MARKDOWN10 lines
## https://sploitus.com/exploit?id=9866FF2F-22B7-57AB-AFD4-88D1159D2AEC
This repository contains exploits for the CVE-2021-3156 vulnerability, which affects the Linux kernel. The vulnerability allows an attacker to gain root privileges by exploiting a flaw in the way the kernel handles the "setuid" system call.

The repository contains two exploit files: "exploit.c" and "sice.c". The "exploit.c" file is a C program that creates a malicious shared library that, when loaded by the kernel, sets the real and effective user ID to 0, effectively gaining root privileges. The "sice.c" file is a C program that uses the "setuid" system call to set the real and effective user ID to 0, also gaining root privileges.

The "Makefile" in the repository compiles the "exploit.c" and "sice.c" files into executable files.

The exploit works by creating a malicious shared library that is loaded by the kernel. The library contains a function that sets the real and effective user ID to 0, effectively gaining root privileges. The kernel's "setuid" system call is used to load the library and execute the function.

The "exploit.c" file is compiled into an executable file called "exploit", and the "sice.c" file is compiled into an executable