首 页文章中心黑客工具黑吧学院技术论坛安全培训免费频道最近更新瑞星在线杀毒黑吧百度繁體中文
  设为首页
加入收藏
发布作品
   
栏目导航
· 漏洞利用 · 脚本注入
· 入侵实例 · 编程代码
· 逆向工程
热门文章
· 如何封别人QQ
· 充QQ币的疯狂——宽...
· 免费得QB
· 400秒远程攻破你的Q...
· [图文] QQ免费建400个群
· [组图] 给你一台永远不关机...
· [注意] QQ宠物砸蛋秘诀
· 再次有机会免费获得...
· 想的挂QQvip的进
· 在QQ中将自己从对方...
相关文章
· Discuz! trade.php ...
· Discuz! 数据库错误...
· Discuz! 4.x wap\in...
· Discuz! cache.func...
· Discuz! flash Csrf...
· Discuz! admincp.ph...
· Discuz! [flash] xs...
· [图文] 最新的Discuz!NT2.5...
· [图文] 最新的Discuz!NT2.5...
· Discuz! 6.0.1 (sea...
Discuz! moderation.inc.php 数据库'注射' bug
作者:佚名  来源:转载  发布时间:2008-11-3 23:56:52  发布人:黑客动画吧

减小字体 增大字体

由于Discuz!d的include/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]
等待官方补丁.
[ ] [返回上一页] [打 印] [收 藏]
下一篇文章:IE7自动完成口令获取
 
关于本站 - 网站帮助 - 广告合作 - 下载声明 - 网站导航 - 作品发布
互联网备案登记:粤ICP备05008775号
友情提示:浏览本站,请使用IE6.0浏览,并将分辩率设置为1024*768 为佳
Copyright © 2002-2005 Hack58.Com. All Rights Reserved .