On Sat, Mar 31, 2001 at 05:54:07PM -0600, John Hasler wrote:
> Ethan Benson writes:
> > cat <<EOF >> ~/.bashrc
> > export PATH="$HOME/.evil:${PATH}"
> > EOF
> 
> > and put a bogus su shell script in ~/.evil
> 
> chmod a-w ~/.bashrc ~/.bash_profile
> 
> .bashrc and .bash_profile should be read-only by default, IMHO.

yup ive done this after seeing a few security holes in things like
xchat where a url gets passed unsafely to /bin/sh allowing for crap
like above.  unfortunatly its not terribly strong protection since in
many cases its not hard for the exploit to add a chmod u+w ~/.bashrc.  

bsd has a `user immutable' bit similar to linux's immutable bit
(except users can set and remove it on files they own, bsd's system
immutable is the equivilent to linux' immutable) except this doesn't
necessarily help either since a chflags nouchg ~/.bashrc isn't any
harder then chmod u+w ~/.bashrc... 

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

Attachment: pgprw8caqgYr5.pgp
Description: PGP signature

Reply via email to