Security

Jean-Pierre Radley jpr at dasys1.UUCP
Mon Oct 3 09:43:47 AEST 1988


In article <6800040 at cpe> tif at cpe.UUCP writes:
>Written  2:47 pm  Sep 23, 1988 by dasys1.UUCP!jpr in cpe:comp.unix.xenix
>>....    The desire would seem to be
>>to prevent shell escapes from ALL programs, and 'vi' is a particularly
>>nasty culprit properly in that regard: Whatever you set SHELL to, vi
>>has its own "sh" parameter, and you can't just tell the users to
>>type :set sh=/bin/rsh.
>
>That is not the case on my system.  I just tried...
>	SHELL=""
>	export SHELL
>	vi
>Then from vi, ":sh" didn't work, ":!ls" didn't work, and even "!!ls"
>didn't work.  I also did ":set all" which said "shell=".
>
>Oops.  Come to think of it, you could set shell to anything you want
>from within vi (i.e.  ":set shell=/bin/sh").  So much for my secure login.

That's just the point, Paul. Going in to 'vi', its internal 'sh' value is
set to the environment variable SHELL, if it exists, or to /bin/sh if not.

But either directly with ':se sh=I/m/gonna/get/outta/here', or via an .exrc
file or an EXINIT environment variable, users can worm their way out of vi...

And using 'readonly' in place of 'export' don't do ya no good whatsohowever
for dis particular problemo.

I'm waiting for an OK from Fred Buck to send up his 'rvi' solution, unless he
wishes to post it himself.

In security matters, as in warfare, the offense is usually ahead of the
defense.
-- 

Time is nature's way of				Jean-Pierre Radley
making sure that everything			..!cmcl2!phri!dasys1!jpr
doesn't happen all at once.			CIS: 76120,1341



More information about the Comp.unix.xenix mailing list