Re: Can System() of Perl be bypassed?> Taking chapter from replies,now I've changed my code to:
Well, since that's pseudo code and not complete, I can't
be sure what you're saying. "...." is not valid perl.
What you have above would safely make sure that the user
input is not processed by the shell.
However I have no idea if those values could be used to
break the program itself ($JAVA). If this program were
running with greater privs (suid, CGI, etc) then they can
supply a new $SEARCH_HOME path then they could cause their
own code to run. If there are bad keywords then you aren't
doing anything to get rid of them. (Or, preferably, only
allowing good keywords.)
Without knowing what you're actually running, I can't
say it's secure. But you do successfully keep the
shell from interpreting the user input, and that's a
good step.
--
Brian Hatch "Ugly and old, yes? Then
Systems and their families must be
Security Engineer both rich and powerful."
http://www.ifokr.org/bri/
Every message PGP signed
- application/pgp-signature attachment: stored
Received on Thu Jan 23 18:23:48 2003
This archive was generated by hypermail 2.1.8
: Wed Aug 23 2006 - 14:02:45 EDT
|