by NeoThermic » Sat, 16 2006 Sep 00:23:31
Please note: the following is the express views of myself only. It is not the views of the phpBB group, or indeed anyone else.
I was recently pointed to
this topic by a user of phpBB, citing it as a fix to an apparent vulnerability.
Now, the basis of this vulnerability is that if someone calls /includes/functions.php directly, and register globals is on, they can set $phpbb_root_path and do arbitrary file inclusion.
Lets get this quite clear. functions.php only contains functions. There's no code outside of the functions (there's 18 functions). Anyone who knows an ounce of PHP knows that you can't call a function by directly calling a PHP file unless the code in said PHP file calls the function. In other words,
there is no exploit here. There is no "sloppy coding" here either.
To this end, I have a challenge to those who really believe there is an exploit here. This file,
echopassword.php contains one function, echopassword(). If you can successfully set $yes to any value (it isn't set in the code, only checked), you can get my password. Yes, my actual password. I have full faith that your attempts will not work as PHP does not work the way you think; that function can not be called externally in any shape.
And if you still think there's a problem with functions.php after this, please don't forget functions_admin.php, function_selects.php, and functions_validate.php
Plus, if you are wondering why functions_post.php has the check, that is because there's code outside of the functions.
[b]Please note: the following is the express views of myself only. It is not the views of the phpBB group, or indeed anyone else.[/b]
I was recently pointed to [url=http://www.phpbb-mods.net/sutra4651.html#4651]this topic[/url] by a user of phpBB, citing it as a fix to an apparent vulnerability.
Now, the basis of this vulnerability is that if someone calls /includes/functions.php directly, and register globals is on, they can set $phpbb_root_path and do arbitrary file inclusion.
Lets get this quite clear. functions.php only contains functions. There's no code outside of the functions (there's 18 functions). Anyone who knows an ounce of PHP knows that you can't call a function by directly calling a PHP file unless the code in said PHP file calls the function. In other words, [b]there is no exploit here[/b]. There is no "sloppy coding" here either.
To this end, I have a challenge to those who really believe there is an exploit here. This file, [url=http://www.neothermic.com/echopassword.php]echopassword.php[/url] contains one function, echopassword(). If you can successfully set $yes to any value (it isn't set in the code, only checked), you can get my password. Yes, my actual password. I have full faith that your attempts will not work as PHP does not work the way you think; that function can not be called externally in any shape.
And if you still think there's a problem with functions.php after this, please don't forget functions_admin.php, function_selects.php, and functions_validate.php
Plus, if you are wondering why functions_post.php has the check, that is because there's code outside of the functions.