Skip to content

Instantly share code, notes, and snippets.

@tijldeneut
Last active June 28, 2022 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tijldeneut/b41275d324f882ca447adf7e50822b32 to your computer and use it in GitHub Desktop.
Save tijldeneut/b41275d324f882ca447adf7e50822b32 to your computer and use it in GitHub Desktop.
UID SWAP
#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