Discuz! moderation.inc.php 数据库'注射' bug
2008-11-16 20:33
337 查看
Discuz! moderation.inc.php 数据库'注射' bug author: 80vul-B team:http://www.80vul.com 一 分析 在文件include/moderation.inc.php里代码: $threadlist = $loglist = array(); if($tids = implodeids($moderate)) { $query = $db->query("SELECT * FROM {$tablepre}threads WHERE tid IN ($tids) AND fid='$fid' AND displayorder>='0' AND digest>='0' LIMIT $tpp"); while($thread = $db->fetch_array($query)) { ... $threadlist[$thread['tid']] = $thread; ... foreach($threadlist as $tid => $thread) { ... if($type == 'redirect') { $db->query("INSERT INTO {$tablepre}threads (fid, readperm, iconid, author, authorid, subject, dateline, lastpost, lastposter, views, replies, displayorder, digest, closed, special, attachment) VALUES ('$thread[fid]', '$thread[readperm]', '$thread[iconid]', '".addslashes($thread['author'])."', '$thread[authorid]', '".addslashes($thread['subject'])."', '$thread[dateline]', '$thread[dblastpost]', '$thread[lastposter]', '0', '0', '0', '0', '$thread[tid]', '0', '0')"); 这个比较明显,从数据库查询出的值$thread[lastposter]直接带入了insert语句中,导致了注射:) 这个看上去比上面的那个用处大些,其实有很多的限制.首先$thread[lastposter]是从数据库中查询出来的值,有字数限制[不能大于15个字符];其次,这个地方需要版主权限才能操作. 二 利用 注册新用户,用户名为80vul',发表新回复,然后用拥有版主权限的账号将此帖转移,移动方式选为[移动主题并在原来的版块中保留转向],和上面的效果一样,执行时数据库报错了:) 三 补丁[fix] 等待官方补丁.
相关文章推荐
- Discuz! trade.php 数据库'注射' bug
- discuz! admin\runwizard.inc.php get-webshell bug
- discuz代码分析一 从common.inc.php开始
- BUG:php7.1 访问yii数据库 自动加端口3306 报错
- PHP PDO ACCESS 留言板-连接数据库包含文件inc.php
- Discuz!7.2 common.inc.php 学习
- php关于ob_start('ob_gzhandler')启用GZIP压缩的bug
- discuz__LEARN comm.inc.php (1)
- Discuz! member.php xss bug
- DISCUZ在win2003环境下 Unable to access ./include/common.inc.php in... 的问题终极解决方案
- Discuz之轻松理解下common.inc.php
- discuz xconvert 执行转换 config.inc.php 不可写,转换没法继续啊!!
- (转)史上第一强:Discuz!源代码分析系列(2)--common.inc.php
- Discuz! admin unwizard.inc.php 漏洞利用(Get Webshell)
- Discuz! admincp.php xss bug
- 基于Apache+Mysql+PHP安装PHPwind、Discuz等论坛并通过mydumper、binlog实现数据库的备份恢复。(2)
- Discuz7.2 BUG :"Warning: sprintf() [function.sprintf]: Too few arguments in xxxxxxxx/include/discuzcode.func.php on line 369"
- DISCUZ在win2003环境下 Unable to access ./include/common.inc.php in... 的问题终极解决方案
- Discuz!源代码分析系列(1)-./include/common.inc.php
- discuz中 function_core.php中的dmkdir有死环bug