[13719] in bugtraq
"The Finger Server"
daemon@ATHENA.MIT.EDU (Iain Wade)
Sat Feb 5 05:05:04 2000
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <389AB9D7.4E043518@optusnet.com.au>
Date: Fri, 4 Feb 2000 22:36:55 +1100
Reply-To: Iain Wade <iwade@OPTUSNET.COM.AU>
From: Iain Wade <iwade@OPTUSNET.COM.AU>
X-To: bugtraq@securityfocus.com
To: BUGTRAQ@SECURITYFOCUS.COM
Hello,
Late last year I was tinkering w/ The Finger Server v0.82 and came
across some bugs which let you execute shell commands under the
privileges of the web server.
It's available at http://www.glazed.org/finger/
I sent a number of messages to the Author but never received a reply ..
I just remembered about it and checked it was still vulnerable and still
being used around the net. It is.
It's just another case of perl doing it's magic on an open() call.
I haven't by any means audited the code, so there is undoubtably other
problems, but here's the offending code I exploited:
open (PLANS, "$plan_path$filename") ||
do { print "Can't open $plan_path$filename: $!";
return;
};
It is called with the following arguments;
finger.cgi?action=archives&cmd=specific&filename=99.10.28.15.23.username.plan
It does minimal checking before there, really only making sure the
username is valid, but for example by using:
finger.cgi?action=archives&cmd=specific&filename=99.10.28.15.23.username.|<shell
code>|
you can execute whatever ..
The server I was testing it on was running UBB, and I was easily able to
use this to grab a couple of thousand accounts since it stores them in
cleartext. (I promptly forgot those passwords .. it wouldn't be nice to
do otherwise right? :)
Regards,
--
Iain Wade
iwade@optusnet.com.au