Last active
January 28, 2019 17:16
-
-
Save int0x33/fe0b9ec726060e51315a73295968dffc to your computer and use it in GitHub Desktop.
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> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <stdio.h> | |
int main(int argc, char **argv, char **envp) | |
{ | |
gid_t gid; | |
uid_t uid; | |
gid = getegid(); | |
uid = geteuid(); | |
setresgid(gid, gid, gid); | |
setresuid(uid, uid, uid); | |
system("/usr/bin/env echo and now what?"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment