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:

May 2024

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