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/scanner/http/chromecast_webserver.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::HttpClient7include Msf::Auxiliary::Scanner8include Msf::Auxiliary::Report910def initialize(info = {})11super(update_info(info,12'Name' => 'Chromecast Web Server Scanner',13'Description' => %q{14This module scans for the Chromecast web server on port 8008/TCP, and15can be used to discover devices which can be targeted by other Chromecast16modules, such as chromecast_youtube.17},18'Author' => ['wvu'],19'References' => [20['URL', 'https://store.google.com/product/chromecast?utm_source=chromecast.com&hl=en-US']21],22'License' => MSF_LICENSE23))2425register_options([26Opt::RPORT(8008)27])28end2930def run_host(ip)31res = send_request_raw(32'method' => 'GET',33'uri' => '/setup/eureka_info',34'agent' => Rex::Text.rand_text_english(rand(42) + 1)35)3637return unless (res && res.code == 200)3839json = res.get_json_document40name, ssid = json['name'], json['ssid']4142if name && ssid43print_good(%Q{#{peer} - Chromecast "#{name}" is connected to #{ssid}})44report_service(45:host => ip,46:port => rport,47:proto => 'tcp',48:name => 'http',49:info => %Q{Chromecast "#{name}" connected to #{ssid}}50)51end52end53end545556