Lucene search
K

ProjectPier 0.8.8 Shell Upload

🗓️ 03 Oct 2012 00:00:00Reported by BlackHawkType 
zdt
 zdt
🔗 0day.today👁 36 Views

ProjectPier 0.8.8 Shell Upload vulnerability with Remote Code Executio

Code
ProjectPier <= 0.8.8 Remote Code Execution by BlackHawk

Thanks to alisael for the time spent together. Half credits goes to her ;)

01/11/2012
ProjectPier come with a upload.php file under ./tools/, that is the GUI for  upload_file.php

----------------------------
<?php
header("Content-Type: text/plain");

  if ($_FILES["file"]["error"] > 0) {
    echo $_FILES["file"]["error"] . " " . $_FILES["file"]["name"] . " " . $_FILES["file"]["tmp_name"];
  } else {

    $folder = rtrim( './upload/' . $_POST['folder'] , '/');
    @mkdir($folder, 0777, true);

    $seq = str_pad((int) $_POST["part"],4,"0",STR_PAD_LEFT);
    move_uploaded_file($_FILES["file"]["tmp_name"],
    $folder . '/' . $_FILES["file"]["name"] . '-' . $seq ); // <-- XXXX
    echo $_FILES["file"]["error"] . " " . $folder . '/' . $_FILES["file"]["name"] . '-' . $seq;
  }
?>

-----------------------------

the file is uploaded in a fresh made dir, with the original name PLUS a minus (-) PLUS a sequence of 4 digits.
As Apache, if the filename got 2 extension (filename.one.two), when do not recognize the exstension (two), try to recognize the first one (one), and act as it's the correct one, you just need to rename a PHP shell in:

filename.php.1

and then call directly the file from the browser.




#  0day.today [2018-04-12]  #

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

03 Oct 2012 00:00Current
7.1High risk
Vulners AI Score7.1
36