[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: A question about Knark and modules



On Wed, Jun 20, 2001 at 12:02:47AM -0600, Hubert Chan wrote:
> >>>>> "Ethan" == Ethan Benson <erbenson@alaska.net> writes:
> 
> Ethan> echo 'eb::0:0:Ethan Benson:/home/eb:/bin/bash' > /etc/passwd.d/eb
> 
> Ethan> login wheeeee r00t!
> 
> Hmm.  Forgot about that.  I guess that would be a bit of a security
> hole. :-(
> 
> Ethan> it would be a nightmare to administer.
> 
> I don't think so.  Does the administrator need to really do much with
> the password database, once a user gets set up?  If you want to audit
> the database, you can always just do "cat /etc/passwd.d/* | less".
> And the administrative programs (usermod, chsh, etc.) shouldn't be too
> hard to modify.  Is there anything else that you would want to do?

*.d kludges have gotten WAY out of control.  they are useful in very
small and limited circumstances, but all the crap redhat and friends
have kludged together with them is rediculous.  

there are hundreds of ways to adminisister the /etc/passwd file as it
is now, all of them would break (or become more complicated) with this
silly passwd.d nonsense.

> Well, obviously my proposed scheme wouldn't work (because of the
> previously mentioned exploit), but the motivation behind the scheme was
> to reduce the number of SUID programs (because if you don't need it to
> be SUID, you're safer without it being SUID).  Is there any (sane) way
> of making it so that programs such as passwd, chsh, etc. don't need to
> be SUID?

no, they have to be privileged to write the passwd files, and the
passwd files must only be writable by root otherwise you can trivially
get root.  

chown passwd /etc/passwd and making all these binaries setuid passwd
instead of root would also do you no good since once you can write
/etc/passwd you can change roots passwd, or add a new uid=0 account.  

the proper solution is thoroughly auditing the setuid code, and doing
your best to keep it as small and simple as possible.   the current
shadow utils have accomplished this pretty well.  there haven't been
any exploits in passwd and such in a long time. 

-- 
Ethan Benson
http://www.alaska.net/~erbenson/

Attachment: pgpDerpAAWeZG.pgp
Description: PGP signature


Reply to: