发新话题
打印

[转载]phpMyAdmin server_privileges.php SQL Injection Vulnerabilities

[转载]phpMyAdmin server_privileges.php SQL Injection Vulnerabilities

文章作者:Alice Bryson
信息来源:abryson bytefocus com

I. BACKGROUND
phpMyAdmin is a tool written in PHP intended to handle the administration of MySQL over the Web.

II. DESCRIPTION
phpMyAdmin server_privileges.php is prone to SQL Injection vulnerability. A remote attacker may execute arbitrary SQL command by sending specially-crafted URI to server_privileges.php db_name or checkprivs parameter.

III. PUBLISH DATE
2005-12-7

IV. AUTHOR
lwang (at) lwang (dot) org [email concealed]

V. AFFECTED SOFTWARE
phpMyAdmin 2.7.0 is confirmed to affected. Older versions may also be affected.
The following vendors distribute vulnerable phpMyAdmin package:
The FreeBSD Project
Gentoo Foundation
Novell, Inc. (SuSE)
The Debian Project (SuSE)

VI. ANALYSIS
in server_privileges.php
line 27:
复制内容到剪贴板
代码:
if ( isset( $dbname ) ) {
//if ( preg_match( '/\\\\(?:_|%)/i', $dbname ) ) {
if ( preg_match( &#39;/(?<!\\\\)(?:_|%)/i&#39;, $dbname ) ) {
$dbname_is_wildcard = true;
} else {
$dbname_is_wildcard = false;
}
}
parameter $dbname is not validate properly.
line 1197:
复制内容到剪贴板
代码:
if (isset($viewing_mode) && $viewing_mode == &#39;db&#39;) {
$db = $checkprivs;
$url_query .= &#39;&goto=db_operations.php&#39;;

// Gets the database structure
$sub_part = &#39;_structure&#39;;
require(&#39;./db_details_db_info.php&#39;);
echo "\n";
} else {
require(&#39;./server_links.inc.php&#39;);
}
line 1241:
复制内容到剪贴板
代码:
if ( empty( $adduser ) && empty( $checkprivs ) ) {
parameter $checkprivs not validate properly.

VII. Proof of Concept
http://victim/phpmyadmin/server_ ... r=1&checkprivs=&#39;
http://victim/phpmyadmin/server_ ... ver=1&hostname=&#39;&usern
ame=1&dbname=1&tablename=1

VIII. SOLUTION
I have not contact the vendor, and no aware of any security patch till now.

IX. REFERENCE
http://www.phpmyadmin.net

TOP

如果要验证的话。怎么弄。。。。

TOP

发新话题