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

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

缺陷编号: WooYun-2013-33065

漏洞标题: 简单CMS多处SQL注入漏洞

相关厂商: 简单CMS

漏洞作者: Matt认证白帽子

提交时间: 2013-08-01 10:25

公开时间: 2013-10-30 10:26

漏洞类型: SQL注射漏洞

危害等级: 高

自评Rank: 20

漏洞状态: 未联系到厂商或者厂商积极忽略

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

Tags标签: 无

0人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2013-08-01: 积极联系厂商并且等待厂商认领中,细节不对外公开
2013-10-30: 厂商已经主动忽略漏洞,细节向公众公开

简要描述:

sql注入

详细说明:

1,注射一

code 区域
public function accountAction() {
$user_mod = M ( "User" );
$data ['name'] = $_POST ["name"];
$data ['age'] = $_POST ["age"];
$data ['sex'] = $_POST ["sex"];
$data ['info'] = $_POST ["info"];
$province = ($_POST ['province'] == "请选择") ? '' : $_POST ['province'];
$city = ($_POST ['city'] == "请选择") ? '' : "|" . $_POST ['city'];
;
$county = ($_POST ['county'] == "请选择") ? '' : "|" . $_POST ['county'];
;
$data ['address'] = $province . $city . $county;

$name = $_POST ["name"];
$id = $_POST ["id"];//获取
$user_info = $user_mod->where ( "name='$name' and is_del=0" )->find ();//查询
$oldUname = $user_mod->where ( "id=$id and is_del=0" )->getField ( "name" );
echo "id=$id and is_del=0" ;



**.**.**.**/jd/index.php?a=accountAction&m=Uc&g=Home&id=1

post id=1%Inject_Here%



2,注射二

code 区域
public function likeItemsDel() {
$items_mod = M ( "Items" );
$user_mod = M ( "User" );
$items_id = $_GET ['id'];
$uid = $_COOKIE ['id'];
$items_likes_mod = M ( "Items_likes" );
$del = $items_likes_mod->where ( "items_id=$items_id and uid=$uid" )->delete ();
if ($del) {
$items_mod->where ( "id=$items_id" )->setDec ( 'likes', 1 ); // 商品的喜欢数减1
$user_mod->where ( "id=$uid" )->setDec ( 'likes_num', 1 );
$url = get_url ( 'like', '', 'user' );
header ( 'location:' . $url );
}
}





**.**.**.**/jd/index.php?a=likeItemsDel&m=Uc&g=Home&id=1

Accept: */*

Cookie: id=1%Inject_Here%

User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727) Havij



3,注射三

code 区域
public function albumItemsDel() {
C ( 'TOKEN_ON', false );
$items_id = $_GET ['id'];//获取
$aid = $_GET ['aid'];//获取
$items_mod = M ( "Items" );
$album_mod = M ( "Album" );
$album_items_mod = M ( "Album_items" );
$uid = $album_mod->where ( "id=$aid and is_del=0" )->getField ( "uid" );
echo "id=$aid and is_del=0";
if ($uid == $_COOKIE ['id']) {
$del = $album_items_mod->where ( "pid=$aid and items_id=$items_id" )->delete ();
if ($del) {
$url = get_url ( 'albumDetail', $aid, 'user' );
header ( 'location:' . $url );
}
}
}



**.**.**.**/jd/index.php?a=albumItemsDel&m=Uc&g=Home&aid=1

漏洞证明:

QQ截图20130703182442.png

修复方案:

过滤

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


漏洞回应

厂商回应:

未能联系到厂商或者厂商积极拒绝


漏洞评价:

对本漏洞信息进行评价,以更好的反馈信息的价值,包括信息客观性,内容是否完整以及是否具备学习价值

漏洞评价(共0人评价):
登陆后才能进行评分

评价

登录后才能发表评论,请先 登录