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

ExhibitSQL.txt

ExhibitSQL.txt
Posted Jun 18, 2005
Authored by sk0L | Site sec-consult.com

Exhibit Engine versions 1.22 and 1.54 RC4 are susceptible to SQL injection attacks.

tags | exploit, sql injection
SHA-256 | 0b665515ebf1a6d3f4ff65d163f00b8fc85eee73097a27635ba3efec9a549be8

ExhibitSQL.txt

Change Mirror Download
SEC-CONSULT Security Advisory 20050602-2
=============================================================================
title: Exhibit Engine Blind SQL Injection
program: Exhibit Engine
vulnerable version: 1.22, 1.54 RC4
homepage: http://photography-on-the.net/ee/
http://photography-on-the.net/ee/beta/
found: 2005-06-01
by: sk0L / SEC-CONSULT / www.sec-consult.com
=============================================================================

vendor description:
---------------
the Exhibit engine is a PHP/MySQL application for smooth and versatile
online photograph
display. it's especially designed to give detailed technical info on
each photo, with text
descriptions and gear info, but all that technical data is not required.


vulnerabilty overview:
---------------
SQL injection is possible on various POST parameters in the script
list.php. although
there is no way to get any output from UNION statements, there is at
least one possibility
to read arbitrary database entries via blind SQL injection.


proof of concept:
---------------

here's the relevant code section from list.php:

---- code -----

$resultcount = mysql_query(
"
SELECT
ee_photo.ee_photo_id
FROM
[...]
WHERE
ee_photo.ee_photo_for_www = 'yes'
AND $search_row LIKE '$wildcard1$keyword$wildcard2'
AND ...
"
);

if (!$resultcount) {
$queryname = "resultcount";
include("db_error.php");
}


$total = mysql_num_rows($resultcount);
$how_many = count($count_total);
if ($offset>$how_many)
{$offset = $how_many;
}

$fetchlist = mysql_query(
"
SELECT
$q0,$q1,...,$q43
FROM
ee_photo,
[...]
ee_order_to_exhibition
WHERE
ee_photo.ee_photo_for_www = 'yes'
[...]
AND ee_exhibition.ee_exhibition_pass = '$pass'
ORDER
by $sort_row $order
LIMIT
$offset,$perpage
"
);

---- /code ----

we can inject SQL into the variables $search_row, $sort_row, $order and
$perpage without the need to escape any quotes. unfortunately, UNIONs can
be put into $rearch_row only, and as $search_row is used in both queries
with a different number of columns, this will inevitably produce an error.
we can use blind sql injection, though:

* set $offset=1
* put injection string into $search_row, e.g.:

search_row=ee_photo.ee_photo_exif_iso%3D1+AND+1%3D2+UNION+SELECT+user+FROM+mysql.user+WHERE+user+LIKE+0x254125+/*+
* if we get 1 (TRUE), offset will be set to 1, FALSE will set it to 0.
* now we still have to produce an error in the second query by
specifying some insane $order or $sort_row. the last part of the
SQL error message will be echoed by Exhibit, so we get the value of
$offset.

it should be relatively easy to code an exploit for this (sorry but i
don't have
the time atm).


vulnerable versions:
---------------

Exhibit Engine v1.22 is definitely vulnerable. 1.54 RC4 seems to be
vulnerable
too, although exploitation may differ slightly.
it is very likely that the vulnerability exists in most other versions of
Exhibit Engine.


vendor status:
---------------
vendor notified: 2005-06-01
vendor response: immediately
workaround found: 2005-06-02

Pekka Saarinen has published a workaround for all current versions of
Exhibit Engine. It is available at:

http://photography-on-the.net/forum/showthread.php?p=579692

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Bernhard Mueller / www.sec-consult.com /
SGT ::: dfa, tke, bfi, mei, flo, walter|bruder :::

~ ___ ___
~ | |=|_.' .'| .'| .'|=|`. .'|
~ `. | .' | .' .' .' | | `. .' |
==== `.|=|`. | |=|.: | | | | | | ======
~ ___ | `.| | |'. `. | | .' | | ___
~ `._|=|___||___| |_| `.|=|.' |___|=|_.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-

Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    36 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    38 Files
  • 24
    Sep 24th
    65 Files
  • 25
    Sep 25th
    24 Files
  • 26
    Sep 26th
    26 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close