Skip to content

Instantly share code, notes, and snippets.

@sgohl
Created July 24, 2019 20:40
Show Gist options
  • Save sgohl/8b9d57d7d32e3a973f7e29a5e2e7caf4 to your computer and use it in GitHub Desktop.
Save sgohl/8b9d57d7d32e3a973f7e29a5e2e7caf4 to your computer and use it in GitHub Desktop.
wrap setuid binary
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
int main()
{
setuid( 0 );
system( "/path/to/binary" );
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment