# 关于如何利用ftb.imagegallery.aspx？

**URL:** <https://forum.90sec.com/t/topic/3477>\
**Category:** 交流讨论\
**Created:** [2012 年4 月 22 日 08:06 UTC](https://forum.90sec.com/t/topic/3477 "2012-04-22T08:06:02Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

作者： ![Green\_leaves](https://forum.90sec.com/user_avatar/forum.90sec.com/green_leaves/32/11332_2.png) [@Green\_leaves](https://forum.90sec.com/u/Green_leaves)\
发布日期： [2012 年4 月 22 日 08:06 UTC](https://forum.90sec.com/t/topic/3477/1 "2012-04-22T08:06:02Z")

</div>

前几天有人在乌云发了这个[http://www.wooyun.org/bugs/wooyun-2010-06151](http://www.wooyun.org/bugs/wooyun-2010-06151)，讲的是利用ftb.imagegallery.aspx来上传图片，并通过IIS的解析漏洞来实现上传马的，但是我谷歌、百度了很久还是不知道ftb.imagegallery.aspx该怎么利用。麻烦知道的人告诉我一下！

这个是我在暗组找到的，据说是正方教务系统的源码，我看了一下，目录的设置和文件的确基本吻合，只是是几年前的文件了，有兴趣的同学可以研究一下  
[http://115.com/file/anrdaj55#](http://115.com/file/anrdaj55#)正方教务管理系统.rar

---

<div class="post-metadata">

作者： ![Chmodx](https://forum.90sec.com/user_avatar/forum.90sec.com/chmodx/32/11355_2.png) [@Chmodx](https://forum.90sec.com/u/Chmodx)\
发布日期： [2012 年4 月 22 日 08:45 UTC](https://forum.90sec.com/t/topic/3477/2 "2012-04-22T08:45:03Z")

</div>

这个系统老版没有过滤文件名，导致畸形文件上传，直接再底下上传就行了。

前几天就遇到一个，不过是iis7.5。

---

<div class="post-metadata">

作者： ![sincoder](https://forum.90sec.com/user_avatar/forum.90sec.com/sincoder/32/11422_2.png) [@sincoder](https://forum.90sec.com/u/sincoder)\
发布日期： [2012 年4 月 22 日 10:13 UTC](https://forum.90sec.com/t/topic/3477/3 "2012-04-22T10:13:18Z")

</div>

百度到的

据说正方的系统也有这个洞，，，

漏洞文件：ftb.imagegallery.aspx

漏洞一：目录遍历

```
ftb.imagegallery.aspx?frame=1&rif=images&cif=../

不可以，过滤了/

ftb.imagegallery.aspx?frame=1&rif=images&cif=..\

可以！！过滤\符号
嘿嘿，能干什么自己知道了呗。

ftb.imagegallery.aspx?frame=1&rif=images&cif=..\..

```

漏洞二：上传漏洞

没做登陆验证可以直接访问上传木马  
FTBv3-3-1 可以直接上传任意格式的文件  
Freetextbox 1.6.3 及其他版本可以上传 格式为  
1.asp;.jpg 文件 上传后木马地址为[http://网站地址/images/1.asp;.jpg](http://xn--ces6ay51szzd/images/1.asp;.jpg)  
|-\>本文来自CrazyFeng.com ，转载时请保留本信息 ！~

（也可以传到其它目录喔，传到可写+有执行权限的目录，祝你成功！）

漏洞修补方案：添加代码加登陆验证

private void Page\_Load(object sender, System.EventArgs e) { string isframe = "" + Request["frame"]; Freetextbox上传图片是直接保留原文件名的，这个地方做个修改，上传文件使用时间串做文件名。修改方式如下：  
找到  
程序代码

UploadFileNameUploadFileName = UploadFileName.Substring(UploadFileName.LastIndexOf("\")+1); 在其下面添加以下代码

```
// *********************
UploadFileName = DateTime.Now.ToString() + UploadFileName.Remove(0, UploadFileName.LastIndexOf("."));
UploadFileName = UploadFileName.Replace(":", "").Replace("-", "").Replace(" ", "");
//by Yation.Team 2009/7/17 上传文件用时间重命名

以前已经有人公布过fb暴路径的方法
http *****.cn/helps/ftb.imagegallery.aspx?frame=1”在地址后面加上&rif=..&cif=..在访问 整个网站的目录就呈现在眼前了,下面还有上传删除等按钮...
修正方式如下：
找到
程序代码
if (cif != "" && rif != "") {

把RootImagesFolder.Value = rif;替换成

程序代码
// *****************************
RootImagesFolder.Value = DefaultImageFolder;
Array srtArray = cif.Split('\\');
string str = srtArray.GetValue(0).ToString();
if (str != DefaultImageFolder)
{
cif = DefaultImageFolder;
}
cif = cif.Replace("..\\", "").Replace("../","");

```

---

<div class="post-metadata">

作者： ![sb10010](https://forum.90sec.com/user_avatar/forum.90sec.com/sb10010/32/11399_2.png) [@sb10010](https://forum.90sec.com/u/sb10010)\
发布日期： [2012 年4 月 22 日 10:14 UTC](https://forum.90sec.com/t/topic/3477/4 "2012-04-22T10:14:41Z")

</div>

{:4\_69:} 为什么我试了几个上传 成功了。菜刀连接不上 404错误呢 不解析？ 藐视这洞是忽悠人的

---

<div class="post-metadata">

作者： ![sincoder](https://forum.90sec.com/user_avatar/forum.90sec.com/sincoder/32/11422_2.png) [@sincoder](https://forum.90sec.com/u/sincoder)\
发布日期： [2012 年4 月 22 日 10:17 UTC](https://forum.90sec.com/t/topic/3477/5 "2012-04-22T10:17:45Z")

</div>

好像说的是最新版本的 正方系统 。。。。

---

<div class="post-metadata">

作者： ![Green\_leaves](https://forum.90sec.com/user_avatar/forum.90sec.com/green_leaves/32/11332_2.png) [@Green\_leaves](https://forum.90sec.com/u/Green_leaves)\
发布日期： [2012 年4 月 22 日 14:41 UTC](https://forum.90sec.com/t/topic/3477/6 "2012-04-22T14:41:55Z")

</div>

_本帖最后由 Green\_leaves 于 2012-4-22 22:44 编辑_

\*\*回复 [3#](http://www.90sec.org/redirect.php?goto=findpost&pid=23447&ptid=2149) _sincoder_ \*\*

我百度到的也是这些，但是方正系统的目录过于繁多，而且方正系统的安全设置也比较严格，任何敏感测试，它会提示你正在进行敏感操作，你的ip已被记录，具体怎么用那个我还是不太懂。

---

<div class="post-metadata">

作者： ![Green\_leaves](https://forum.90sec.com/user_avatar/forum.90sec.com/green_leaves/32/11332_2.png) [@Green\_leaves](https://forum.90sec.com/u/Green_leaves)\
发布日期： [2012 年4 月 22 日 15:49 UTC](https://forum.90sec.com/t/topic/3477/7 "2012-04-22T15:49:03Z")

</div>

\*\*回复 [4#](http://www.90sec.org/redirect.php?goto=findpost&pid=23448&ptid=2149) _sb10010_ \*\*

```
你咋上传的？

```

---

<div class="post-metadata">

作者： ![Green\_leaves](https://forum.90sec.com/user_avatar/forum.90sec.com/green_leaves/32/11332_2.png) [@Green\_leaves](https://forum.90sec.com/u/Green_leaves)\
发布日期： [2012 年4 月 22 日 15:50 UTC](https://forum.90sec.com/t/topic/3477/8 "2012-04-22T15:50:19Z")

</div>

\*\*回复 [2#](http://www.90sec.org/redirect.php?goto=findpost&pid=23436&ptid=2149) _Chmodx_ \*\*

```
能告诉我具体怎么上传吗？

```

---

<div class="post-metadata">

作者： ![Chmodx](https://forum.90sec.com/user_avatar/forum.90sec.com/chmodx/32/11355_2.png) [@Chmodx](https://forum.90sec.com/u/Chmodx)\
发布日期： [2012 年4 月 23 日 00:48 UTC](https://forum.90sec.com/t/topic/3477/9 "2012-04-23T00:48:46Z")

</div>

[http://jw.lnnzy.ln.cn/](http://jw.lnnzy.ln.cn/)(S(3mkm2x45guw0r2452mgrfw45))/ftb.imagegallery.aspx 我前几天碰到的，你可以看下，就是不是iis6，没办法搞定。

---

<div class="post-metadata">

作者： ![Green\_leaves](https://forum.90sec.com/user_avatar/forum.90sec.com/green_leaves/32/11332_2.png) [@Green\_leaves](https://forum.90sec.com/u/Green_leaves)\
发布日期： [2012 年4 月 23 日 02:03 UTC](https://forum.90sec.com/t/topic/3477/10 "2012-04-23T02:03:06Z")

</div>

\*\*回复 [9#](http://www.90sec.org/redirect.php?goto=findpost&pid=23500&ptid=2149) _Chmodx_ \*\*

```
好的，下午没课的时候研究一下

```

---

<div class="post-metadata">

作者： ![Green\_leaves](https://forum.90sec.com/user_avatar/forum.90sec.com/green_leaves/32/11332_2.png) [@Green\_leaves](https://forum.90sec.com/u/Green_leaves)\
发布日期： [2012 年4 月 23 日 02:03 UTC](https://forum.90sec.com/t/topic/3477/11 "2012-04-23T02:03:34Z")

</div>

\*\*回复 [9#](http://www.90sec.org/redirect.php?goto=findpost&pid=23500&ptid=2149) _Chmodx_ \*\*

```
好的，下午没课的时候研究一下

```

---

<div class="post-metadata">

作者： ![N3verL4nd](https://forum.90sec.com/letter_avatar_proxy/v4/letter/n/4491bb/32.png) [@N3verL4nd](https://forum.90sec.com/u/N3verL4nd)\
发布日期： [2012 年4 月 23 日 10:03 UTC](https://forum.90sec.com/t/topic/3477/12 "2012-04-23T10:03:46Z")

</div>

有的仅支持aspx{:4\_40:}

---

<div class="post-metadata">

作者： ![wefgod](https://forum.90sec.com/letter_avatar_proxy/v4/letter/w/a587f6/32.png) [@wefgod](https://forum.90sec.com/u/wefgod)\
发布日期： [2012 年4 月 25 日 01:30 UTC](https://forum.90sec.com/t/topic/3477/13 "2012-04-25T01:30:47Z")

</div>

ftb.imagegallery.aspx 我遇到的那个没有这页面···

---

<div class="post-metadata">

作者： ![Green\_leaves](https://forum.90sec.com/user_avatar/forum.90sec.com/green_leaves/32/11332_2.png) [@Green\_leaves](https://forum.90sec.com/u/Green_leaves)\
发布日期： [2012 年4 月 25 日 01:56 UTC](https://forum.90sec.com/t/topic/3477/14 "2012-04-25T01:56:46Z")

</div>

\*\*回复 [14#](http://www.90sec.org/redirect.php?goto=findpost&pid=23946&ptid=2149) _wefgod_ \*\*

```
{:4_40:}

```

---

<div class="post-metadata">

作者： ![user48](https://forum.90sec.com/letter_avatar_proxy/v4/letter/u/bc8723/32.png) [@user48](https://forum.90sec.com/u/user48)\
发布日期： [2012 年4 月 25 日 05:33 UTC](https://forum.90sec.com/t/topic/3477/15 "2012-04-25T05:33:27Z")

</div>

楼上回复的，全是学习不好，考试挂科的

---

<div class="post-metadata">

作者： ![Green\_leaves](https://forum.90sec.com/user_avatar/forum.90sec.com/green_leaves/32/11332_2.png) [@Green\_leaves](https://forum.90sec.com/u/Green_leaves)\
发布日期： [2012 年4 月 25 日 07:51 UTC](https://forum.90sec.com/t/topic/3477/16 "2012-04-25T07:51:43Z")

</div>

\*\*回复 [16#](http://www.90sec.org/redirect.php?goto=findpost&pid=23996&ptid=2149) _自由暗黑_ \*\*

```
这都被你知道了{:4_67:}

```

---

<div class="post-metadata">

作者： ![wefgod](https://forum.90sec.com/letter_avatar_proxy/v4/letter/w/a587f6/32.png) [@wefgod](https://forum.90sec.com/u/wefgod)\
发布日期： [2012 年4 月 26 日 01:12 UTC](https://forum.90sec.com/t/topic/3477/17 "2012-04-26T01:12:08Z")

</div>

> 回复 wefgod  
> Green\_leaves 发表于 2012-4-25 09:56 [[img][http://www.90sec.org/images/common/back.gif[/img\]](http://www.90sec.org/images/common/back.gif%5B/img%5C%5D)]([http://www.90sec.org/redirect.php?goto=findpost&pid=23959&ptid=2149](http://www.90sec.org/redirect.php?goto=findpost&pid=23959&ptid=2149))

我看过另外两个，确实是没有这个页面的。看见有的好像就你这个，不过我也就见过3个现在

---

<div class="post-metadata">

作者： ![Green\_leaves](https://forum.90sec.com/user_avatar/forum.90sec.com/green_leaves/32/11332_2.png) [@Green\_leaves](https://forum.90sec.com/u/Green_leaves)\
发布日期： [2012 年4 月 26 日 02:25 UTC](https://forum.90sec.com/t/topic/3477/18 "2012-04-26T02:25:45Z")

</div>

\*\*回复 [18#](http://www.90sec.org/redirect.php?goto=findpost&pid=24057&ptid=2149) _wefgod_ \*\*

```
乌云上说要最新版，不知道是不是这个问题。

```

---

<div class="post-metadata">

作者： ![wefgod](https://forum.90sec.com/letter_avatar_proxy/v4/letter/w/a587f6/32.png) [@wefgod](https://forum.90sec.com/u/wefgod)\
发布日期： [2012 年4 月 27 日 03:34 UTC](https://forum.90sec.com/t/topic/3477/19 "2012-04-27T03:34:52Z")

</div>

> 回复 wefgod
> 
> ```
> 乌云上说要最新版，不知道是不是这个问题。
> 
> ```
> 
> Green\_leaves 发表于 2012-4-26 10:25 [[img][http://www.90sec.org/images/common/back.gif[/img\]](http://www.90sec.org/images/common/back.gif%5B/img%5C%5D)]([http://www.90sec.org/redirect.php?goto=findpost&pid=24065&ptid=2149](http://www.90sec.org/redirect.php?goto=findpost&pid=24065&ptid=2149))

这样啊。最新版就不知道了，最新版有源码吗？

---

<div class="post-metadata">

作者： ![Green\_leaves](https://forum.90sec.com/user_avatar/forum.90sec.com/green_leaves/32/11332_2.png) [@Green\_leaves](https://forum.90sec.com/u/Green_leaves)\
发布日期： [2012 年4 月 28 日 07:38 UTC](https://forum.90sec.com/t/topic/3477/20 "2012-04-28T07:38:44Z")

</div>

\*\*回复 [20#](http://www.90sec.org/redirect.php?goto=findpost&pid=24182&ptid=2149) _wefgod_ \*\*

没有啊，我看下载的那个，看文件修改日期是06年的，应该是最早的几个版本之一。

[下一页](https://forum.90sec.com/t/topic/3477.md?page=2)
