鬱悶"被過濾了,我是在 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