How secure are shell scripts? (summary)

Jim Reid jim at cs.strath.ac.uk
Fri Oct 12 00:06:13 AEST 1990


In article <14885 at hydra.gatech.EDU> gt0178a at prism.gatech.EDU (Jim Burns) writes:
   Note that setuid ksh scripts on HP-UX 7.0 do an automatic 'set -p'
   (protected) which, among other things, resets the PATH to something more
   trusted (/bin and /usr/bin) and disables sourcing $ENV. This happens
   whenever euid != uid. Doesn't solve all the problems, but it is a step in
   the right direction.

I disagree.

The hack by HP is precisely that: a hack. It fixes one or two possible
problems, but not them all. (For instance doing naughty things with
(symbolic) links to the setuid shell script or replacing the file as
it is being exec'ed....) The end result of that is a false illusion
that setuid ksh scripts are secure. Misguided individuals then make
use of them, thinking the scripts are secure when in fact the scripts
are only marginally safer than if they were executed by the Bourne or
C shells. (Which is nothing to be proud about.)

		Jim



More information about the Comp.unix.questions mailing list