Skip to content

Instantly share code, notes, and snippets.

@clly
Created October 8, 2012 17:33
Show Gist options
  • Save clly/3853787 to your computer and use it in GitHub Desktop.
Save clly/3853787 to your computer and use it in GitHub Desktop.
Drop into root shell
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
int main()
{
setuid( 0 );
system( "/path/to/script.sh" );
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment