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

phpshop_29-04-04.txt

phpshop_29-04-04.txt
Posted May 11, 2004
Authored by Calum Power

phpShop versions 0.7.1 and below have a flaw where it is possible for an attacker to execute arbitrary code as the server.

tags | advisory, arbitrary
SHA-256 | 5297fa06c696b0da0a705efbbb07c7f4ec23027ed95142a2d87e3e70f3d1a2e7

phpshop_29-04-04.txt

Change Mirror Download
Security Advisory - Arbitrary code inclusion vulnerability in phpShop

Discovered by: Calum Power [Enune]
Advisory Date: 29/04/2004
Versions Affected: <= 0.7.1
Unaffected versions: None Known (Developer contacted 29/04/04)

Product Description: (From product website)
phpShop is a PHP-based e-commerce application and PHP development framework.
phpShop offers the basic features needed to run a successful e-commerce web site and
to extend its capabilities for multiple purposes.

Summary:
Under certain circumstances, it may be possible to execute arbitrary code in the context of
the web server.


Details:
If PHP is configured (in php.ini, or otherwise) to have register_globals turned off, and the
PHP version is above or equal to 4.1, then a phpShop installation will initiate a 'fix' to
register all the globals in the HTTP_REQUEST into local variables. One of these variables is
the '$base_dir' variable, which is used to declare the base directory of the phpshop
installation. If the aforementioned events are triggered (as in most recent default PHP
installations), it is possible to overwrite the $base_dir variable (in a GET, POST or COOKIE
declaration), and taint the many lines of code from 'htdocs/index.php
UPDATE(9/05): It has been discovered that ANY version of PHP with register_globals turned off
would be vulnerable to exploit.


Exploit:
An attacker would only need to create a file called 'phpshop.cfg' on his or her webserver
in a directory called 'etc', and craft the base_dir variable to include the code from his webserver,
and the phpShop will include this code into it's page, assuming that the attacker's script is the
configuration for the phpShop. It is then possible for the attacker to take control over the website
and/or server, and perform malicious activities at will.


Impact:
The impact of this vulnerability could be quite devastating for some companies, who rely on
the security of packages such as phpShop to run their businesses online. The ramifications
could be things such as the redirection of deliveries to customers to an address the attacker
controls, or the hijacking of Credit Card details.

Thanks:
Greets to Mjec on freenode.net#php, rAchel from IdleThink, the guys at Phrack, and
DI Michael Grant from the Tasmanian Fraud Investigation Squad. Censorship r0x my s0x.

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
    35 Files
  • 13
    Sep 13th
    0 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    0 Files
  • 17
    Sep 17th
    0 Files
  • 18
    Sep 18th
    0 Files
  • 19
    Sep 19th
    0 Files
  • 20
    Sep 20th
    0 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