神刀安全网

漏洞标题: 海康威视某备份系统通用型SQL注入(两处无需登录)

漏洞详情

披露状态:

2016-03-02: 细节已通知厂商并且等待厂商处理中
2016-03-06: 厂商已经确认,细节仅向厂商公开
2016-03-09: 细节向第三方安全合作伙伴开放(绿盟科技唐朝安全巡航无声信息
2016-04-30: 细节向核心白帽子及相关领域专家公开
2016-05-10: 细节向普通白帽子公开
2016-05-20: 细节向实习白帽子公开
2016-06-04: 细节向公众公开

简要描述:

rt

详细说明:

/data/fetchPlanStatus.php

code 区域
<?php
include('../common/connDb.php');
$dbQuery = new DataBaseQuery();
$page=$_POST['page'];
$rows=$_POST['rows'];
$guid=$_POST['guid'];
$start=($page -1)*$rows;
$result = $dbQuery->query('select * from planinfo where rule_guid="'.$guid.'" order by update_time desc limit '.$start.','.$rows);
$count = $dbQuery->querySingle('select count(*) from planinfo where rule_guid="'.$guid.'"');
$jsonStr ="";
while ($row = $dbQuery->fetchArray($result)){
$row['status']= get_plan_status_name($row['status']);
$jsonStr = $jsonStr.json_encode($row).",";
}
if($jsonStr !=""){
$jsonStr = substr($jsonStr,0,strlen($jsonStr)-1);
}
$str ='{"total":'.$count.',"rows":['.$jsonStr.']}';
$dbQuery->closeDb();
echo ($str);

function get_plan_status_name($plan_status){

/data/fetchBackupPlan.php

code 区域
<?php 
include('../common/connDb.php');
$dbQuery = new DataBaseQuery();
$page=$_POST['page'];
$rows=$_POST['rows'];
$sort=$_POST['sort'];
$order=$_POST['order'];
$start=($page -1)*$rows;
$re = $dbQuery->query('select guid,description,plan_type,device_type,server_ip,device_ip,channel_id,channel_no,update_time,"" statusName from planrule limit '.$start.','.$rows);
$count = $dbQuery->querySingle('select count(*) from planrule');
$jsonStr ="";
while ($row = $dbQuery->fetchArray($re)){
//$row['statusName']=get_plan_status($row['guid'],$dbQuery);
$jsonStr = $jsonStr.json_encode($row).",";
}
if($jsonStr !=""){
$jsonStr = substr($jsonStr,0,strlen($jsonStr)-1);
}
$str ='{"total":'.$count.',"rows":['.$jsonStr.']}';
$dbQuery->closeDb();
echo ($str);

function get_plan_status($guid,$dbQuery){
$result = $dbQuery->query('select * from planinfo where rule_guid="'.$guid.'" order by begin_time asc');

漏洞证明:

漏洞标题:  海康威视某备份系统通用型SQL注入(两处无需登录)

漏洞标题:  海康威视某备份系统通用型SQL注入(两处无需登录)

影响众多监控服务器了,随便20个案例:

code 区域
**.**.**.**:8080/
**.**.**.**:8080/
**.**.**.**:8080/
**.**.**.**:8080/
**.**.**.**:8080/
**.**.**.**:8080/
**.**.**.**:8080/
**.**.**.**:8080/
**.**.**.**:8080/
**.**.**.**:8080/
**.**.**.**:8080/
**.**.**.**:8080/
**.**.**.**:8080/
http://**.**.**.**:8080/
**.**.**.**:8080/
**.**.**.**:8080/
**.**.**.**:8080/
**.**.**.**:8080/
**.**.**.**:8080/
**.**.**.**:8080/

修复方案:

过滤

版权声明:转载请注明来源 YY-2012@乌云

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » 漏洞标题: 海康威视某备份系统通用型SQL注入(两处无需登录)

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址