郁闷"被过滤了,我是在 magic_quotes_gpc = off 下测试的 看来phpbb本身对做了过滤 ,此路不通 :(
在对于<5.0(不包括4.10)的php本身存在对null截断的漏洞:
------------------------------- 漏洞具体描叙 start -------------------------------
PHP存在输入验证漏洞,远程攻击者可以利用这个漏洞读取系统文件内容及进行目录遍历攻击。
问题一是addslashes()存在问题,addslashes()用于过滤用户输入,在magic_quotes_gpc设置"on"时,将对每个输入执行addslashes()进行过滤,但是由于NULL字节不正确被addslashes()编码,如果用户输入被include()或require()使用,可能导致攻击者读取文件系统的任意文件。
问题二是上传路径遍历问题,PHP自动过滤上传的文件名数据,删除在斜杠或反斜杠之前的数据,但是如果攻击者上传的文件包含单引号,而WEB服务又设置magic_quotes为ON,或者对上传文件名执行addslashes()操作,那么在单引号前会前缀一个反斜杠,因此在Windows系统可造成目录遍历问题,导致文件上传到系统任意目录中。
Warning: main(./../templates/theme_info.cfg\0/theme_info.cfg): failed to open stream: No such file or directory in f:\easyphp1-7\www\phpbb2\admin\admin_styles.php on line 78
Warning: main(): Failed opening ./../templates/theme_info.cfg\0/theme_info.cfg for inclusion (include_path=.;f:\EasyPHP1-7\php\pear\) in f:\easyphp1-7\www\phpbb2\admin\admin_styles.php on line 7
返回:
Warning: main(./../templates/theme_info.cfg): failed to open stream: No such file or directory in f:\easyphp1-7\www\phpbb2\admin\admin_styles.php on line 78
Warning: main(): Failed opening ./../templates/theme_info.cfg for inclusion (include_path=.;f:\EasyPHP1-7\php\pear\) in f:\easyphp1-7\www\phpbb2\admin\admin_styles.php on line 7