Waraxe IT Security Portal  
  Login or Register
::  Home  ::  Search  ::  Your Account  ::  Forums  ::   Waraxe Advisories  ::  Tools  ::
December 18, 2014
 Members List
 IRC chat
 Base64 coder
 MD5 hash
 CRC32 checksum
 ROT13 coder
 SHA-1 hash
 Sql Char Encoder
 y3dips ITsec
 Md5 Cracker
 User Manuals
 Recommend Us
 Your Account

User Info
Welcome, Anonymous

Latest: Prospero22
New Today: 0
New Yesterday: 1
Overall: 8961

People Online:
Visitors: 150
Members: 0
Total: 150
·#1337day Soitec SmartEnergy 1.4 SCADA Login SQL Injection Authentication Bypass Exploit [#0day #Exploit]
·#1337day JourneyMap 5.0.0RC2 Ultimate Edition - DoS [dos #exploits #0day #Exploit]
·#1337day ManageEngine Desktop Central MSP Remote Code Execution Vulnerability [remote #exploits #Vulnerability #0day #Exploit]
·#1337day Tuleap PHP Unserialize Code Execution Exploit CVE-2014-8791 [webapps #exploits #0day #Exploit]
·#1337day phpTrafficA 2.3 SQL Injection Vulnerability CVE-2014-8340 [webapps #exploits #Vulnerability #0day #Exploit]
·#1337day Apache CloudStack 4.3 / 4.4 Unauthenticated LDAP Binds Vulnerability [remote #exploits #Vulnerability #0day #Exploit]
·#1337day PBBoard CMS - Stored XSS Vulnerability [webapps #exploits #Vulnerability #0day #Exploit]
·#1337day OpenEMR 4.1.2(7) - Multiple SQL Injection Vulnerabilities [webapps #exploits #Vulnerabilities #0day #Exploit]
·#1337day Humhub 0.10.0-rc.1 - XSS / SQL Injection vulnerabilities [webapps #exploits #0day #Exploit]
·#1337day VFU 4.10-1.1 - Buffer Overflow Exploit [remote #exploits #0day #Exploit]

PacketStorm News
·RSA Authentication Manager 8.0 / 8.1 Unvalidated Redirect
·RSA Archer GRC Platform 5.x Cross Site Scripting
·EMC Isilon InsightIQ Cross Site Scripting
·Docker Privilege Escalation / Path Traversal / Spoofing
·HP Security Bulletin HPSBUX03162 SSRT101767 3
·Debian Security Advisory 3099-1
·Advertisement: SolarWinds Log & Event Manager
·Red Hat Security Advisory 2014-1985-01
·Red Hat Security Advisory 2014-1984-01
·Gentoo Linux Security Advisory 201412-11

[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/


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 ]--------------------

} elseif(isset($_POST["thread"])){

if(empty($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){

$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:


... 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:


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 ]---------------


----------------[/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!


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


Janek Vind "waraxe"

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

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

Copyright © by Waraxe IT Security Portal All Right Reserved.

Published on: 2005-01-06 (6286 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
Cyko  Cyko - 375
tsabitah  tsabitah - 328
y3dips  y3dips - 281
·Vuln: D-Link DCS-2103 CVE-2014-9238 Directory Traversal Vulnerability
·Vuln: Graphviz 'agerr()' Function Remote Format String Vulnerability
·Vuln: Ruby CVE-2014-8080 XML External Entity Denial of Service Vulnerability
·Vuln: Ruby Floating Point Parsing Heap Buffer Overflow Vulnerability
·Bugtraq: CVE-2014-2026 Reflected Cross-Site Scripting (XSS) in "Intrexx Professional"
·Bugtraq: CVE-2014-2025 Remote Code Execution (RCE) in "Intrexx Professional"
·Bugtraq: [ MDVSA-2014:251 ] rpm
·Bugtraq: [ MDVSA-2014:250 ] cpio
·More rss feeds from SecurityFocus


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.103 Seconds