Hi was asking some questions about this in alt.php but some didn't get answered.
Yes I have read an awful lot now about php security and different advisories
and Idon't mind being called a competely dimwit but I still don't understand
what prevents this from happening if register_global s is ON:
http://www.mywebsite.com/anypage.php?firststep = fopen ("../etc/passwd", "r");&secondste p=fread($firsts tep,filesize(". ./etc/passwd"));
I can't seem to get this or any variations on the above to work inlcuding someting
like thirdstep = print $secondstep , but theoretically it should work shouldn't
it ?
Really my question is not about the above specifiically but it is about this:
Say you have a script which uses no variables, say it just echos 'hello' and
thats all it does, literally:
<?php
echo "hello";
?>
No variables, no include, or file or anything done by the user. Just echo hello
and exit. Nothing else. Is it possible in that scenario to run arbitray code
by doing something like I was describing about with etc/passwd ?
Please advise because this is still not clear.
Thank you for your help with these questions
Simon
Yes I have read an awful lot now about php security and different advisories
and Idon't mind being called a competely dimwit but I still don't understand
what prevents this from happening if register_global s is ON:
http://www.mywebsite.com/anypage.php?firststep = fopen ("../etc/passwd", "r");&secondste p=fread($firsts tep,filesize(". ./etc/passwd"));
I can't seem to get this or any variations on the above to work inlcuding someting
like thirdstep = print $secondstep , but theoretically it should work shouldn't
it ?
Really my question is not about the above specifiically but it is about this:
Say you have a script which uses no variables, say it just echos 'hello' and
thats all it does, literally:
<?php
echo "hello";
?>
No variables, no include, or file or anything done by the user. Just echo hello
and exit. Nothing else. Is it possible in that scenario to run arbitray code
by doing something like I was describing about with etc/passwd ?
Please advise because this is still not clear.
Thank you for your help with these questions
Simon
Comment