Skip to content

Instantly share code, notes, and snippets.

@int0x33
Last active January 28, 2019 17:16
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 int0x33/fe0b9ec726060e51315a73295968dffc to your computer and use it in GitHub Desktop.
Save int0x33/fe0b9ec726060e51315a73295968dffc to your computer and use it in GitHub Desktop.
#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