exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Original Photo Gallery Remote Command Execution

Original Photo Gallery Remote Command Execution
Posted Oct 3, 2007
Authored by Francesco Ongaro, Antonio Parata | Site ush.it

Original Photo Gallery versions 0.11.2 and below suffer from a remote command execution vulnerability.

tags | exploit, remote
SHA-256 | 6b9f382d9d8b5fa95f99764ba3fda63a36150fe8da621a53e0b5a82ae7f6bb06

Original Photo Gallery Remote Command Execution

Change Mirror Download
Original Photo Gallery Remote Command Execution

Name Original Photo Gallery Remote Command Execution
Systems Affected Original 0.11.2 version and below
Severity High
Vendor http://jimmac.musichall.cz/original.php
Advisory
http://www.ush.it/team/ascii/hack-original/advisory_updated.txt
http://www.ush.it/team/ascii/hack-original/advisory.txt
Author Francesco `ascii` Ongaro, Antonio `s4tan` Parata
Date 20070919

I. BACKGROUND

"Original is a set of scripts to get your digital photos on the web. It
aims to be as simple to maintain as possible."

The systems consist of two parts: "a client side script to scale your
images to different sizes, create archives of an album, attach optional
metadata" and a "php script to render html pages of the picture
gallery".

II. DESCRIPTION

It's possible to execute arbitrary code on remote systems which have
installed a vulnerable software version.

III. ANALYSIS

The file "inc/exif.inc.php" contains the following vulnerable statement:

exec("$exif_prog \"$gallery_dir/$galerie/lq/img-$snimek.jpg\"",
$exif_data, $exif_status);".

If PHP is configured with the "globals on" option, an attacker can
execute arbitrary code doing a direct request to the file and sending
shell commands in the parameter/value $exif_prog.

IV. DETECTION

http://www.x.com/original/inc/exif.inc.php?exif_prog=/path/to/touch%20/tmp/p0wn3d.txt;

The request should create a file in the /tmp directory (on Unix systems)
named p0wn3d.txt. If this happens than you have a vulnerable version of
the software (and a really risky PHP setup).

A rapid measurement show that ~10% systems are vulnerable of about
17'000 listed on Google (using the dork: "Generated by Original ver").

V. WORKAROUND

Upgrade to the new version 0.11.3 witch fix this vulnerability.

http://jimmac.musichall.cz/zip/original/original-0.11.3.tar.bz2

Or if unable to upgrade:

1) Disable access to the directory using Limit (vhosts/.htaccess).

2) Disable execution using disable_functions in php.ini.

The result is:

Warning: exec() has been disabled for security reasons in
/home/XXX/inc/exif.inc.php on line 157

3) Deny direct access to the file in the PHP code by checking for a
define or requested url.

VI. VENDOR RESPONSE

The vendor has promptly replied and addressed the problem issuing a
new release.

Original version 0.11.3 is available here:

http://jimmac.musichall.cz/zip/original/original-0.11.3.tar.bz2

VII. CVE INFORMATION

No CVE at this time.

VIII. DISCLOSURE TIMELINE

20070719 Bug discovered
20070725 Vendor contacted
20070927 Vendor reply and fix
20071002 Advisory released

IX. CREDIT

Francesco `ascii` Ongaro and Antonio `s4tan` Parata are credited with
the discovery of this vulnerability.

X. LEGAL NOTICES

Copyright (c) 2007 Francesco `ascii` Ongaro

Note: this exploit is DUAL LICENSED,
1. if you'll use it for personal and non-profit purposes you can
apply GPL v2 and above.

2. In the case you plain to:
a. use our code in any commercial context
b. implement this code in your non-GPL application
c. use this code during a Penetration Test
d. make any profit from it

you need to contact me in order to obtain a _commercial license_.

For more informations about Dual Licensing:
http://producingoss.com/html-chunk/dual-licensing.html

Permission is granted for the redistribution of this alert
electronically. It may not be edited in any way without mine express
written consent. If you wish to reprint the whole or any
part of this alert in any other medium other than electronically, please
email me for permission.

Disclaimer: The information in the advisory is believed to be accurate
at the time of publishing based on currently available information. Use
of the information constitutes acceptance for use in an AS IS condition.
There are no warranties with regard to this information. Neither the
author nor the publisher accepts any liability for any direct, indirect,
or consequential loss or damage arising from use of, or reliance on,
this information.

Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    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