Using eeprom to gain root shell

Using eeprom to gain root shell

Post by Scott Schwar » Thu, 02 Jun 1994 12:01:29




   What do other people do to address problems such as these?

They recognise that public workstations are just another kind of PC, and
that security has to be network based, and end to end.  Run Kerberos,
avoid NFS, and dream of the day when Plan 9 rules the earth.

 
 
 

Using eeprom to gain root shell

Post by Casper H.S. D » Thu, 02 Jun 1994 19:46:12



Quote:}Also, I have a related question.  I chose security-mode of command
}rather than full because we still want to allow people to be able to
}re-boot a workstation that has been left unattended with a screen lock
}program running.  It seems some of our students are not above leaving a
}workstation locked while they go off to classes or whatever and this
}denies access to the workstation to others.  We were advising people to
}sync the system to re-boot to reduce the chance of corrupting the
}filesystems (the workstations have /, /usr and swap on the local disk.)
}With command security-mode it seems they can no longer issue sync as
}that appears to be in the restricted command set.  What do other people
}do to address problems such as these?  Do you set security-mode to full
}and require people to power cycle the machine to re-boot?  Are there
}other implications of the different security-mode settings that I may
}not be aware of?

Power-cycling a machine in security-mode=full will not make it reboot.
It hangs there waiting for you to type a password. (W/ a sufficiently
new eeprom).

In our student labs this means: no rebooting by students, only by
staff.

Casper

 
 
 

Using eeprom to gain root shell

Post by Yedidya Isra » Thu, 02 Jun 1994 20:48:48



: My response was to enable command security-mode on all the workstations
: in two labs of SUN workstations.  This seems to have solved the exposure
: problem.

Your response could be to limit access to /vmunix and /dev/*mem*,
The command constructed use addresses found inside kernel.

--
Israel Yedidya,                 |       Phone:  +972-3-531-8953/682/407/408
System Administrator,           |       Fax:    +972-3-535-3325

 
 
 

Using eeprom to gain root shell

Post by James Bonfie » Thu, 02 Jun 1994 21:31:26




>: My response was to enable command security-mode on all the workstations
>: in two labs of SUN workstations.  This seems to have solved the exposure
>: problem.

>Your response could be to limit access to /vmunix and /dev/*mem*,
>The command constructed use addresses found inside kernel.

But once you've got access to the PROM you also have access to the kernel
memory. Hence all of the information pstat will give you is also accessable.

In practise this is trickier, but in theory you should be able to derive the
proc structure pointer without ever needing to leave the PROM.

This implies simply blocking access to /vmunix and /dev/*mem* is not a valid
solution.

The command security in the PROM fixes these problems. However the prom
password can sometimes be erased or simply bipassed so don't assume this makes
things 100% secure.

        James
--

Medical Research Council - Laboratory of Molecular Biology,
Hills Road, Cambridge, CB2 2QH, England.

 
 
 

Using eeprom to gain root shell

Post by Dave Smi » Fri, 03 Jun 1994 10:55:46



>The command security in the PROM fixes these problems. However the prom
>password can sometimes be erased or simply bipassed so don't assume this makes
>things 100% secure.

   And if you haven't fixed a standard sun setup feature its trivial to get
the PROM password. ( All you need is to set gid to kmem )

                        Dave

 
 
 

Using eeprom to gain root shell

Post by J Anthony Fitzgera » Thu, 02 Jun 1994 10:49:04


I was made aware last night of a script being circulated which allows
one to gain a root shell on a workstation running SunOS 4.1.3.
The script takes as its argument the pid of a shell to be given root
access then the script builds a command which can be entered at the
eeprom prompt to change the effective user id of the shell to 0.  The
script displays the command then gives detailed instructions on how to
get the eeprom prompt by using the L1-A keys and how to resume
processing after making the change.

My response was to enable command security-mode on all the workstations
in two labs of SUN workstations.  This seems to have solved the exposure
problem.

I am posting this in case other people are as naive as I was in leaving
access to the eeprom commands on machines in a public access lab.

Also, I have a related question.  I chose security-mode of command
rather than full because we still want to allow people to be able to
re-boot a workstation that has been left unattended with a screen lock
program running.  It seems some of our students are not above leaving a
workstation locked while they go off to classes or whatever and this
denies access to the workstation to others.  We were advising people to
sync the system to re-boot to reduce the chance of corrupting the
filesystems (the workstations have /, /usr and swap on the local disk.)
With command security-mode it seems they can no longer issue sync as
that appears to be in the restricted command set.  What do other people
do to address problems such as these?  Do you set security-mode to full
and require people to power cycle the machine to re-boot?  Are there
other implications of the different security-mode settings that I may
not be aware of?
--

Computing Services  UofNB  Box 4400  (506) 453-3590 (FAX)  
Fredericton, NB,  CANADA,  E3B 5A3   .......__/\o_.......  

 
 
 

Using eeprom to gain root shell

Post by Christopher Lo » Sat, 04 Jun 1994 00:19:01



>   And if you haven't fixed a standard sun setup feature its trivial to get
>the PROM password. ( All you need is to set gid to kmem )

I am completely disgusted by the fact that the PROM password
is stored in its cleartext form; a simple ``strings /dev/eeprom''
lets anyone who has the proper permission read it.  Yuck.
I guess building crypt() into the ROM was a bit much to ask,
but still.  I think it's time for me to ``chmod 600 /dev/eeprom''
so only root can get at it.

chris...
--

"Address: FB Informatik - Bau 57 / Universitaet KL / D--67653 Kaiserslautern"
"World-wide web: http://uomo.informatik.uni-kl.de:2080/Personalia/cml.html"

 
 
 

Using eeprom to gain root shell

Post by Dave Smi » Sat, 04 Jun 1994 05:01:24


Quote:>I am completely disgusted by the fact that the PROM password
>is stored in its cleartext form; a simple ``strings /dev/eeprom''
>lets anyone who has the proper permission read it.  Yuck.
>I guess building crypt() into the ROM was a bit much to ask,
>but still.  I think it's time for me to ``chmod 600 /dev/eeprom''
>so only root can get at it.

    Well they have to become gid kmem ( Which is easy on SunOS )

                                Dave

 
 
 

Using eeprom to gain root shell

Post by Pete Hartm » Sat, 04 Jun 1994 05:58:44



>    Well they have to become gid kmem ( Which is easy on SunOS )

Easy as shipped, but how easy is it if you've closed the most
glaring hole?
 
 
 

Using eeprom to gain root shell

Post by John Hawkins » Fri, 03 Jun 1994 06:07:56



Quote:>Power-cycling a machine in security-mode=full will not make it reboot.
>It hangs there waiting for you to type a password. (W/ a sufficiently
>new eeprom).

The correct solution here is to write a new monitor :-). This is probably
not very feasable.

OTOH, I seem to recall some option about copying the monitor code to
RAM and running it from there; if that's the case, it may be possible
to patch it to allow you to sync w/o a password from
security-mode=command...

--
John Hawkinson

 
 
 

Using eeprom to gain root shell

Post by Ben Gor » Sun, 05 Jun 1994 01:24:20


What about monitoring usage of the machines, and disciplining those who
lock them like that?

Tech solutions aren't necessarily best.

b&

--

 net.proselytizing (write for info): Protect your privacy; oppose Clipper.
 Voice concern over proposed Internet pricing schemes. Stamp out spamming.

 
 
 

Using eeprom to gain root shell

Post by Pete Hartm » Sun, 05 Jun 1994 10:09:39


Why not just disable locking if it's a huge problem?
 
 
 

Using eeprom to gain root shell

Post by K Hultla » Sun, 05 Jun 1994 19:03:10


: >I am completely disgusted by the fact that the PROM password
: >is stored in its cleartext form; a simple ``strings /dev/eeprom''
: >lets anyone who has the proper permission read it.  Yuck.
: >I guess building crypt() into the ROM was a bit much to ask,
: >but still.  I think it's time for me to ``chmod 600 /dev/eeprom''
: >so only root can get at it.

:     Well they have to become gid kmem ( Which is easy on SunOS )

Does it exist any EASY way to prevent a user from becoming gid kmem?
Or gid anything? It seems like group id's are of no value if users can
become what they want easily. (or does this only apply to kmem?)

                                        Karl

--
Karl-Gunnar Hultland         If two persons agree on everything then

 
 
 

Using eeprom to gain root shell

Post by Pete Hartm » Mon, 06 Jun 1994 00:48:37



>:     Well they have to become gid kmem ( Which is easy on SunOS )
>Does it exist any EASY way to prevent a user from becoming gid kmem?
>Or gid anything? It seems like group id's are of no value if users can
>become what they want easily. (or does this only apply to kmem?)

I've already said that the only way I know of that's easy to become
gid kmem is also easy to fix.  No one has responded saying that there
is more than one obvious way to become gid kmem.  If there is, please
step forward and SAY SO.
 
 
 

Using eeprom to gain root shell

Post by Rune Sandn » Mon, 06 Jun 1994 08:58:31




Quote:>program running.  It seems some of our students are not above leaving a
>workstation locked while they go off to classes or whatever and this
>denies access to the workstation to others.

You can modify the xlock program to automatically log out the user after
e.g. 30 minutes. Make sure they can't override this feature with switches.

                                                                Rune