Re: securety related question...

Richard Lightman <[email protected]>
Newsgroups gmane.linux.lfs.security
Message-ID <[email protected]>
* [email protected] <[email protected]> [2002-10-08 08:27]:
> 
> PID 1 doesn't get killed, so one could do:
> 
Not something I have had the nerve to test - until today. You are
quite right.

> echo '!#/bin/rm -rf /' > /sbin/init && kill -HUP 1
> 
#! does not understand that there could be more than one argument, and
effeectively does:
# /bin/rm '-rf /'
/bin/rm: invalid option --
Try `/bin/rm --help' for more information.

This probable does the trick:
!#/bin/bash
exec /bin/rm -rf /

Anyone want to test it? ;-)

Richard
-- 
Unsubscribe: send email to [email protected]
and put 'unsubscribe lfs-security' in the subject header of the message
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.