| Next | Classic Unix Security Problems | 13 |
One last example
Consider the command:
cp foo.pl /tmp/perl
The command here is cp, the arguments foo and /tmp/bar
Why?
Because IFS contains white space
If IFS = "p" the command is c
And the arguments are:
" foo."
"l /tm"
"/"
"erl"
To sabotage a shell script, change IFS
The shell is incredibly complicated
Way too many weird features
Behavior is too hard to predict
Solution: forbid setuid shell scripts
| Next | ![]() |
Copyright © 2005 M. J. Dominus |