PDA

Bekijk Volledige Versie : Re: from bugtraq: HP-UX 11.0 /usr/bin/kermit (fwd)



Frank da Cruz
02/05/03, 22:35
> don't know if you have been involved already..
>
No, this is the first I've seen of it; thanks for sending it along.

On Fri, 2 May 2003 19:49:03 +0300 bt@delfi.lt wrote to
bugtraq@securityfocus.com:

> Hi!
>
> There are many buffer overflows in kermit on HP-UX 11.0 . I am sure it is
> vulnerable in other HP-UX versions, too, since "C-Kermit 6.0.192, 6 Sep 96,
> for HP-UX 10.00" is installed in HP-UX 11.0 by default.
>
These were fixed for C-Kermit 8.0 long ago. The current release of C-Kermit
is 8.0.209. As far as I know, HP ships C-Kermit 8.0.200 or later with all
HP-UX 11.xx's. I suspect anybody who has "C-Kermit 6.0.192, 6 Sep 96, for
HP-UX 10.00" on HP-UX 11.00 or later must have upgraded their HP-UX version
without also upgrading Kermit. If you have an older version of C-Kermit on
ANY release of HP-UX all the way back to 5.21, you can get the current
release here:

http://www.columbia.edu/kermit/ckermit.html

> /usr/bin/kermit is setuid to bin and setgrp to daemon, so upon succesfull
> exploitation, local user could get these priviledges.
>
The setuid/setgid are required for all HP-UX programs that access serial
ports.

> Example of on simple buffer overflow in kermit :
> $ /usr/bin/kermit -C "ask `perl -e 'print "A" x 120'`"
> Executing /usr/share/lib/kermit/ckermit.ini for UNIX...
> Good Evening.
> Segmentation fault (core dumped)
>
The syntax for the ASK command requires a variable name after the word ASK.
Anyway, try it in C-Kermit 8.0:

/usr/bin/kermit -C "ask foo `perl -e 'print "A" x 800'`"

If you increase 800 to some bigger number, the string is properly cut off
at the end of the ASK prompt buffer.

> There are more kermit commands that are unchecked of correct parameter
> length: askq,define, assign, getc. Several of them use the same vulnerable
> function "doask". I am SURE that these are not all vulnerabilities in
> kermit.
>
A thorough buffer-overflow / memory-leak audit was performed for
C-Kermit 8.0 in early-mid 2000, and it was in public Alpha test before
the end of 2000.

> one more thing (I am not sure if it is exploitable,but anyway):
> [/home/xxxxxxxxxx] C-Kermit>set alarm %:%:%
> Floating point exception (core dumped)
>
> Solution - take off setuid bits form /usr/bin/kermit.
>
Solution: use current version.

> In my opinion, patching kermit against these(and maybe many more)
> vulnerabilities is not an option, since source of C-kermit 6.0.192 is
> publicly available, and it is very buggy.
>
C-Kermit is maintained by the Kermit Project. Users don't have to "patch"
it. If you give a HELP command, it says (among other things):

Type SUPPORT to learn how to get technical support.

Then if you give a SUPPORT command it tells you how to report problems.

> I tried to contact security-alert@hp.com, but i got error message "Client
> host rejected: Access denied" (spam?).
>
This topic was hashed over three years ago in Linux Bugtraq; C-Kermit 8.0
was released and furnished to HP in 2001.

Frank da Cruz
The Kermit Project
Columbia University
612 West 115th Street
New York NY 10025-7799
USA
Email: fdc@columbia.edu
http://www.columbia.edu/kermit/

Elmar Knipp
03/05/03, 22:50
On Fri, 2 May 2003, Frank da Cruz wrote:

> These were fixed for C-Kermit 8.0 long ago. The current release of C-Kermit
> is 8.0.209. As far as I know, HP ships C-Kermit 8.0.200 or later with all
> HP-UX 11.xx's. I suspect anybody who has "C-Kermit 6.0.192, 6 Sep 96, for
> HP-UX 10.00" on HP-UX 11.00 or later must have upgraded their HP-UX version
> without also upgrading Kermit. If you have an older version of C-Kermit on
> ANY release of HP-UX all the way back to 5.21, you can get the current
> release here:

I fresh installed HP-UX 11.i has "C-Kermit 7.0.197, 8 Feb 2000, for HP-UX
11.00".

> The syntax for the ASK command requires a variable name after the word
> ASK. Anyway, try it in C-Kermit 8.0:
>
> /usr/bin/kermit -C "ask foo `perl -e 'print "A" x 800'`"
>
> If you increase 800 to some bigger number, the string is properly cut
> off at the end of the ASK prompt buffer.

The HP-Version seems to be immune even with higher numbers.


Regards,
Elmar

--
__________________________________________________ ___________________
| |
| knipp | Knipp Medien und Kommunikation GmbH
------- Technologiepark
Martin-Schmeisser-Weg 9
44227 Dortmund
Germany
Fon: +49 231 9703-0
Elmar.Knipp@knipp.de Fax: +49 231 9703-200

Frank da Cruz
03/05/03, 22:50
> I see. The problem is that the latest patch for kermit in HP-UX 11.0 is
> PHCO_22665 . This kermit patch does not increase version of kermit, it only
> patches known kermit(v. 6.0.192) vulnerabilities. I have kermit
> v.6.0.192,shipped with default HP-UX 11.0 install and patched with latest HP
> security patch for it.
> ...
> It would be a perfect solution, but most sysadmins do not download newer
> software from third parties, but patches existing software from OS
> vendor. As I mentioned, new kermit versions were released, but AFAIK HP
> didn't make any patches to upgrade existing ones shipped earlier.
> ...
> I meant that patches should be released by HP.
> ...
> My point is : I have kermit with latest HP patches, an it is
> vulnerable. There are newer C-Kermit releases, but HP has no upgrade patch
> for it...Did i miss something?
>
I submit all new Kermit versions of Kermit to HP. I include HP in the
development and test cycles. They are supposed to update their copies.
OK, let me try some of the HP-UX systems at:

http://www.testdrive.hp.com/

Here's what I find:

HP-UX spe175 B.11.22 U ia64 rx2600
C-Kermit 8.0.200, 12 Dec 2001, for HP-UX 11.00
This one is fairly current - it has the buffer overflow fixes.

HP-UX spe169 B.11.11 U 9000/800/A500-7X
C-Kermit 7.0.197, 8 Feb 2000, for HP-UX 11.00
This one is four years newer than the one you found but
it is before the buffer overflow fixes.

I suspect that HP ships newer Kermit versions with newer OS versions, but
does not issue new Kermit patches for older OS versions. If that is true,
then you have a point. But:

. HP probably wants you upgrade your OS version. They don't want
to maintain patches for every combination of C-Kermit version and
HP-UX version.

. The current version is always available direct from us, for EVERY
version of HP-UX on EVERY hardware platform. See:

http://www.columbia.edu/kermit/ck80binaries.html#hp

- Frank