phpMyAdmin ( ) 是一款管理 MySQL 數據庫的 PHP 工具,具有基于 WEB 的界面。但是發現它存在漏洞??蛇x擇安裝新發布穩定版本:
phpMyAdmin 2.2.0。
1、目錄遍歷漏洞
攻擊者通過提供如下的 URL:
(*)
能非法訪問系統文件
有問題的代碼在:
@#include($goto);@# in sql.php and in tbl_replace.php.
2、執行攻擊者代碼漏洞
通過使用全局可寫日志文件,攻擊者能在受影響服務器上執行任意代碼。
首先,得到 Apache 配置文件以便知道日志文件存儲位置:
可以看出,日志放在:
/var/log/httpd/error_log
/var/log/httpd/access_log
然后 telnet 到 端口80
# telnet 80
Trying xxx.xxx.xxx.xxx...
Connected to .
Escape character is @#^]@#.
GET
^]
telnet> quit
Connection closed.
#
在 GET 請求之后,攻擊者能將任意 PHP 代碼上傳
現在,可以用 Apache 用戶身份遠程運行命令了:
access_log&btnDrop=No?meters=ls%20-l%20/
受影響系統:
phpMyAdmin 2.1.0
解決方案:
建議:
1.使用 phpMyAdmin 2.2.0
2.用戶下載安裝補?。?