FULLTEXT01
FULLTEXT01
Ethical Hacking Of An
Industrial Control System
DANIEL CONDE ORTIZ
ii
Sammanfattning
De flesta av programvaror har sårbarheter. Penetrationstest eller etisk
hacking kan användas för att identifiera dem. Denna avhandling utför tester
enligt penetrationstestmetoden i ett industriellt kontrollsystem i stor skala.
Målet är att upptäcka vilka sårbarheter som finns i dessa system, med fokus
på attacker från deras nätverk. Flera tillvägagångssätt användes för att
attackera servrar och tjänster på nätverket, både från in- och utsidan av
maskinera. Kritiska sårbarheter hittades i samband med autentisering och
störande kommunikation mellan servrar, som bör åtgärdas för att förhindra
ytterligare potentiella attacker.
iii
Acknowledgements
Firstly, I would like to thanks my thesis supervisor, Professor Pontus
Johnson. I found this thesis thanks to him and he has provided me with quick
and really useful feedback and support whenever I needed it, which has been
essential for the development of this project.
I would also like to extend my sincere thanks to all the people who have helped
me carry out this project in the company, answering all of my numerous
questions, providing assistance and recommendations of where to continue
testing and guiding me to not get lost through their systems.
Then, I want to thanks my parents for all of their support through all my
life, for introducing me in the telecommunications world and for always
encouraging me to never stop and to look for the best. All of this would have
not been possible without them.
Finally, I would like to thanks my sister Yaiza for her courage and for showing
me to never give up, always wearing a smile. I wish you could have seen all of
this. I hope you are proud of me.
June 2020
iv
Author
Daniel Conde Ortiz <[email protected]>
Information and Communication Technology
KTH Royal Institute of Technology
Examiner
Mathias Ekstedt
Stockholm
KTH Royal Institute of Technology
Supervisor
Pontus Johnson
Stockholm
KTH Royal Institute of Technology
Contents
1 Introduction 1
1.1 Problem statement . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.1 Research question . . . . . . . . . . . . . . . . . . . . . 2
1.1.2 Hypothesis . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Motivation and goal of the thesis . . . . . . . . . . . . . . . . . 3
1.3 Scope and delimitations . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Background 4
2.1 Cybersecurity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1.1 CIA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Penetration Testing . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2.1 Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 Network Communication . . . . . . . . . . . . . . . . . . . . . 6
2.3.1 Transmission Control Protocol . . . . . . . . . . . . . . 9
2.3.2 Address Resolution Protocol . . . . . . . . . . . . . . . 10
2.3.3 Remote Procedure Call . . . . . . . . . . . . . . . . . . 11
2.4 Windows Authentication . . . . . . . . . . . . . . . . . . . . . 12
2.4.1 Active Directory . . . . . . . . . . . . . . . . . . . . . . 12
2.4.2 Kerberos . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.4.3 SMB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
vi
CONTENTS vii
3.3 Exploitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.3.1 Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.4 Post Exploitation . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.5 Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4 Exploitation 22
4.1 Threat model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.2 Network attacks . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.3 Active Directory attacks . . . . . . . . . . . . . . . . . . . . . . 25
4.4 Attacks from inside of Windows machines . . . . . . . . . . . 26
5 Results 30
5.1 Threat Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.2 Network Vulnerabilities . . . . . . . . . . . . . . . . . . . . . . 32
5.3 Active Directory Vulnerabilities . . . . . . . . . . . . . . . . . 33
5.4 Vulnerabilities inside of Windows machine . . . . . . . . . . . 34
5.5 Traceability Matrix . . . . . . . . . . . . . . . . . . . . . . . . . 36
6 Discussion 39
6.1 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
6.2 Attacks Mitigation . . . . . . . . . . . . . . . . . . . . . . . . . 41
6.3 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
6.4 Sustainability and Ethical Considerations . . . . . . . . . . . . 43
6.5 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
7 Conclusions 46
References 47
List of Figures
List of Tables
viii
ACRONYMS
AD Active Directory
IP Internet Protocol
IT Information Technology
ix
x ACRONYMS
SID Security ID
Introduction
“There are only two types of companies—those that know they’ve been
compromised, and those that don’t know.” - Dmitri Alperovitch
Penetration testing, or ethical hacking, is the method used to test the security
1
2 CHAPTER 1. INTRODUCTION
Industrial control systems are usually big, complex and important for the
core development of companies. Their failure or mismanagement can lead
to economic damage in most of the cases. For these reasons, their security is
carefully revised and constantly improved.
This thesis is done in collaboration with KTH and a company that will remain
anonymous. The research question on which this thesis will be focused
is:
1.1.2 Hypothesis
One or more vulnerabilities exist in the system and could be vectors for
possible intrusions.
CHAPTER 1. INTRODUCTION 3
1.4 Outline
This chapter has introduced the problem and the goals of the thesis. The rest
of the thesis follows the phases of penetration testing. First with theoretic
explanation about concepts related to ethical hacking and security in chapter
2, then the methodology and methods are described in chapter 3, the exploit
development, in chapter 4 and the results in chapter 5. Finally, it concludes
with a discussion of the results in chapter 6 and conclusions from the whole
thesis in chapter 7
Chapter 2
Background
2.1 Cybersecurity
Information security, computer security or cybersecurity can be defined as the
body of technologies, processes, and practices designed to protect networks,
devices, programs, and data from attack, damage, or unauthorized access, as
well as from the disruption or misdirection of the services they provide. [4,
5]
2.1.1 CIA
4
CHAPTER 2. BACKGROUND 5
• Integrity: Consists in ensuring that data has not been tampered with
and, therefore, can be trusted. It is correct, authentic and reliable. This
means that data changes and system functions should only be done in
authorised manners.
2.2.1 Terms
Several terms have been and will be used throughout the whole thesis in
relation to ethical hacking.
Application layer
The user interacts with this layer, it is the beginning and end of almost all
network communication. It is probably the layer with the most protocols,
some of them are: HTTP, RDP and SMB.
Presentation layer
It’s responsible for data formatting and delivery between different end-user
systems, for example, different text encodings. Some of the protocols in this
layer are: NDR and XDR.
8 CHAPTER 2. BACKGROUND
Session layer
Transport layer
Network layer
Link layer
This layer transmits information between two machines that are directly
connected. It also provides error correction. Some of its protocols are
Ethernet and Wi-Fi.
Physical layer
receiving end. This header has several parameters such as the origin and
destination ports. The order of the data is controlled by sequence numbers
and flow control by a parameter called window size.
The way it works is that each host keeps a mapping table with MAC and
corresponding IPs. If a host wants to know another host’s MAC, it sends a
broadcast ARP query message asking with the corresponding IP. If that host
exists in the same subnetwork, it will reply with its own MAC address.
Sometimes hosts can also send actively their MAC/IP relation to the network
and other hosts will register this in their tables. This can be exploited to
spoof other machines and receive packets and information that was destined
to them. This is called ARP spoofing and can be used to perform a man-in-
the-middle attack.
Man-In-The-Middle (MITM)
RPC can be an important security factor since its an entrance for request to
execute programs inside the machine. Because of this, it must be adequately
secured. A secure RPC requires: an encrypted communication path, the
authentication of identity of the requesting client, and the authorization
on the serving side that the client making the request is allowed to do so.
Usually, this is achieved by using Kerberos (or a similar system), which will
be explained later.
12 CHAPTER 2. BACKGROUND
The server in charge of authentication compares the signed data from the user
with known cryptographic keys. Storing the keys in a secure central location
makes the authentication process scalable and maintainable. Microsoft
provides a solution for this, called Active Directory.
This service also includes a set of rules that defines the constraints and limits
of these objects; a query and index mechanism so objects and their properties
can be queried; a replication service that distributes directory data across a
network and a global catalog that contains information about every object in
the directory [16].
2.4.2 Kerberos
Kerberos uses tickets instead of passwords and its basic architecture consists
in a client, the service that the client wants to authenticate to and a
authentication server, that in this case is called Key Distribution Center or
KDC.
1. The client presents itself to the KDC and asks for a ticket for the Ticket
Granting Service (inside the KDC).
2. The Authentication Service (also inside the KDC) sends back the
requested ticked encrypted with the client’s password as well as a
session key that can’t be decrypted.
3. The client uses this ticket and session key to request a service ticket to
the TGS.
4. The TGS answers with the corresponding ticket and a service session
key.
2.4.3 SMB
SMB or Server Message Block [19] is a protocol used for providing shared
access to files, serial ports and printers and authenticated inter-process
communication (IPC), all within a network. It was originally designed by
IBM but Microsoft made substantial modifications to it, creating the most
commonly used version and including it in most Windows versions.
SMB servers allow clients on the network to access their file systems and
other resources, provided that they authenticate first, for example, by being a
domain user.
16
CHAPTER 3. PENETRATION TESTING METHODS 17
Figure 3.1.1: Simplified view of the computer network. The systems in the
blue zone will be the target for the security assessment in this thesis.
For this thesis, we suppose that an attacker has reached inside the network,
is connected somehow and could attack from there. Of course, this part of
the network is segmented from other parts, depending on their importance
for the whole system. Before accessing it, the attacker has had to go through
several layers of firewalls, finding flaws or exploits in them, but that is not in
the scope of this thesis.
life.
Previous research was focused in the security between the control system and
the actuators. It was decided that the focus of this thesis would be on the part
concerning the clients and control system.
3.3 Exploitation
The exploitation phase was conducted from the Kali Linux machine, as
previously mentioned. The main focus of this phase was on network traffic,
SMB and RPC ports.
CHAPTER 3. PENETRATION TESTING METHODS 19
3.3.1 Tools
Some of the main tools used for finding and exploiting vulnerabilities are the
following ones. They have been chosen by a combination of their capabilities,
how much they are used on the ethical hacking world and their availability
(for example, they already are installed in the OS used or can be easily
downloaded).
Metasploit
Nmap
Nmap [23] is an open-source network scanner and security auditor. With this
tool we can survey a network, discover live hosts and open ports and finding
what software they are using. It works by sending different kind of packets
and analyzing the responses.
PowerShell Empire
Wireshark
SMB discovery
Several tools were used for discovering SMB shares, users within the
system and more information. Some of these tools were: smbclient
[26], enum4linux [27], CrackMapExec [28], and rpcclient [29], along with
Metasploit, previously mentioned. Most of these tools work similarly, by
sending specific SMB requests (authenticated or not) to the servers and
figuring out how much information they can get from the answer.
Own Programs
is to get and use credentials from other users in the same machine to move
horizontally in the network, for example, Kerberos tickets, if one can find a
way to get them.
In the case of this thesis, the goal is to affect the network or, if not, exfiltrate
information about it. Since most machines in the system are connected
in sequence, once reached inside of one, little horizontal movement is
needed.
Even though 2 users in the same machine can have different privileges, they
share many things, for example, the IP address. Also, a process can be started
by an user or the machine, and another user without privileges can access its
information, if unprotected, and use it to spoof that process.
All of this was used to create scripts so that, from one of the server
machines, commands could be sent to another servers from an unprivileged
account.
3.5 Reporting
While this project was conducted, all vulnerabilities found were reported
to the company using responsible disclosure [30]. This means that the
vulnerability is first disclosed to the company to give a grace period for it to
be fixed before publishing about it, as it’s the case with this report.
To protect the company and its systems, the results are anonymized in this
report. At the end of the project, a presentation was given to coworkers and
project managers about the vulnerabilities found in their systems.
Chapter 4
Exploitation
Most of the exploitation phase and attacks are based or inspired by this
information, which helps to understand better the system and how it can be
attacked.
Many of the threats come from spoofing any of the servers, having a MITM
attack or some sort of server crash or denial of service, so that’s where most
effort was put in this security assessment.
22
CHAPTER 4. EXPLOITATION 23
Using the Blaster tool mentioned in 3.3.1, some ports were found to be
vulnerable to raw reading and writing and could be attack vectors, but other
information gathering methods should be executed before preparing specific
attacks.
To get a better grasp of how the processes and services communicate, the
traffic from their normal behaviour as well as their startup and stopping was
analyzed with Wireshark.
After this and talking with the engineers who developed the system, it was
decided that the following attacks and the thesis in general should focus on
the process in charge of sending commands, since it was the most capable of
causing damage.
A MITM script was created (as mentioned in 3.3.1) to intercept and replay
or modify the traffic between servers. This could be done since the attacking
machine is connected to the same network as the servers.
For this program to work, first the arpspoof command needed to be executed,
in order to trick the 2 desired servers that the attacking machine is the real
one. Then, this script used the pyshark library to capture packets, filtering
24 CHAPTER 4. EXPLOITATION
them by IP and MAC. These packets were stored in cache for replaying them
later, depending on the attack. This replaying was done by using the scapy
library. The anonymized script has been uploaded to GitHub and can be
found in [31].
With this program, several kind of attacks were performed, both to try to
affect the network and to see how it reacted in different situations:
• DoS attacks:
– SYN Flood: Not sending the last ACK in TCP handshake, causing
the target server to wait for it and consume resources.
– LAND Attack: Sending a spoofed TCP SYN packet with the target’s
IP address as both source and destination to an open port in the
same target, causing it to reply to itself continuously.
The complete results are explained in Chapter 5 but the main takeaway was
that, since Kerberos provides both encryption and protection against packet
replay, this was a dead end. Because of this, the next step was to infiltrate
inside any machine and attack from there.
Most of the Kerberos attacks, such as Pass the ticket, Golden Ticket or Silver
Ticket, allow to act as another user and use services. The problem is that first
it is needed to have administrator access on the systems. Since the attacks are
performed from the outside and no access is had yet, they won’t work.
Brute forcing passwords in machines that use Kerberos is not really an option
because the KDC is usually configured to lock the account after a number of
intents and has to be manually unlocked.
More tools than the specified were used, such as NBTScan [32], SMBmap
[33] and impacket [34], but the results were mostly the same or no useful
results were found. Similarly, other attacks related to AD and SMB, such as
Kerberoasting, psexec and wmiexec, were carried out but no useful results
were obtained.
In relation to this, there are plenty of tools which allow for similar attacks but
using a Windows machine instead of a Kali one as the attacker. These tools
were considered at first but disregarded because of the similarity with the
Linux ones and the unavailability of an outsider Windows machine. Finally,
other attacks try to exploit SMB to increase privileges starting inside one of
the domain machines. Such attacks were also disregarded because of the
necessity being able to get inside a machine first.
Apart from these kind of attacks, it is known that computers and servers in
industrial control networks need to be used and managed by different people
in different locations. The most common way to solve this is by using Remote
Desktop Protocol, which is an easy way to access a machine given its IP and
some user in the same domain. It can be accessed using Remote Desktop
Connection in Windows and FreeRDP [35] in Linux.
Other attacks related to this topic, such as LLMNR Poisoning or SMB Relay,
were not performed because they were already tested on previous security
assessments.
The goal of this project is to affect the control system but the only processes
that can do this are run by high level accounts. Because of this, there are three
options:
b) Get access to an account that can run the processes. Also very unlikely
and, if this was the case, there is no much left to do as the attacker can
manipulate the system freely.
Because of this, the focus was on scenario c). As the user doesn’t have
permission to run the programs, the goal is to fool the other end as if it was
an authorized user. Test client programs were created with basic functions
to spoof the selected services. This was done by having code reviews and
meeting with the engineers who wrote the programs but without exceeding
the limit which would mean doing code testing instead of actual penetration
testing.
These clients used the system services APIs, which are not public and should
normally only be used by the own system. The two most important services
(or the two that could cause the most damage if manipulated) were selected
to be tested. Theoretically, if an unauthorized user sends a request, the
destination server must discard it right away.
Also, if the language used for the APIs is object-oriented, which in this case it
is, objects’ properties can also provide useful information.
The libraries used are already in the machine, as they belong to the whole
system and the servers use them. In addition to this, Powershell allows to
execute C# code without compiling it, by using the following command and,
later, creating an object of that type:
Where $assemblies is the location of the libraries that the code uses and
$code is the code in plain text, previously introduced. The code can even be
obfuscated in base64 encoding to prevent some early detection.
This process was investigated with the idea of, for example, using it by
creating some program which could be placed in some folder in the server
machine and it would be executed by the main server regularly and without
user interaction. Another idea is that it could be included in the operator’s
interface and they would execute it not knowing that it is a malicious
software.
CHAPTER 4. EXPLOITATION 29
It was also checked if there were any traces of passwords or other information
in the files installed and used by the software and if they could be accessed
without proper authorization.
Finally, the tool Powershell empire was tried, as it provides a extensive array
of tools to execute within Powershell and could allow to move vertically or
horizontally within the network. This tool couldn’t have been used previously
as it needs to be executed on a Windows machine and the only (theoretically)
accessible computer was the Kali machine.
While developing and executing all the exploitation tests mentioned in this
chapter, several vulnerabilities were found and the results will be reported in
the next chapter.
Chapter 5
Results
In this chapter, the results from the threat modelling and exploitation phases
are presented. As in the previous chapter, the exploitation results are divided
into Network Vulnerabilities, Active Directory Vulnerabilities and Windows
Vulnerabilities.
All of the results in this chapter and more information about them were
reported to the software engineers so they could be fixed as soon as
possible.
30
CHAPTER 5. RESULTS 31
STRIDE Threats
Spoofing
• Spoofing servers.
• Spoofing clients.
Tampering
• Modify packet traffic between servers.
Repudiation
• Removing logs from servers.
Information Disclosure
• Information in communication leakage
through MITM attack.
• Leakage of credentials or encryption
keys.
Denial of Service
• Crashing servers or services.
• Unable to authenticate due to AD being
unavailable.
Elevation of Privilege
• Sniffing and cracking hashes.
• Overprivileged users.
Due to how control systems work in general, there is one control server which
is in charge and the others that could be in the network act as backup servers,
keeping in touch with the main one periodically. If the communication is lost,
one of the backup servers assumes control of the network.
If there is only one network interface in each machine, the communication can
be disrupted and many would assume the control of the network. When the
communication is restored, they would observe that there are other servers
controlling the systems and enter a blocking state, in order to not send
contradictory orders.
Another vulnerability discovered, and more critical than the previous one, is
that you can perform ARP spoofing between 2 machines for a MITM attack,
and disrupt the connection very easily or even capture and try to modify and
resend packets.
CHAPTER 5. RESULTS 33
With the MITM script created, the traffic could be delayed by modifying the
TCP window size up until not ending the connection but delaying common
tasks for more than 40 seconds, which was achieved with a window size of 10
bytes. Decreasing the TCP window below this size made the connection reset,
probably because of some TCP or software timer. If the traffic was delayed
manually (capturing the packets and waiting some time before forwarding),
the largest delay achieved was about 1.5 seconds.
DoS attacks were attempted but no disruption or crash was achieved and
repeating packets or modifying their content caused the connection to reset.
There is also some intrinsic protection in the protocols used against this kind
of attacks, for example TCP and Kerberos provide sequence numbers against
replaying and the latter provides encryption against reading and modifying
packets.
Some machine’s ports were not protected and open and it was possible to scan
them for protocol information and more. This could lead to further specific
attacks, depending on the data available. Also, it was possible to raw write
and read to some ports, which could lead to, for example, excessive CPU and
RAM consumption or data corruption.
Apart from using Remote Desktop, SMB could also be used to get information
from servers in some way or another. Using the software enum4linux
[27] and authenticating as a low privileged user, a substantial amount of
information could be acquired, such as domain names, OS information, share
34 CHAPTER 5. RESULTS
enumeration and attempts to map them, users and their SID (number which
identifies each user) and group names.
The most common attack is to find an open share and upload some file
through there that allows to continue infiltrating, for example, initiating a
remote connection. In this case, all the shares were closed to low level domain
users.
Finally, it was found that user access could be locked after several failed login
attempts due to restrictive Kerberos policies, needing manual unlocking. This
does not provide access into the machines but is of great disturbance if done
to critical users and their settings are misconfigured.
way.
The most critical result found in this section is that a server could be crashed
(paralyzing the whole network) by sending a request with a 1000 characters
string as a parameter. Also, fake messages could be inserted in the users’
interface by similar methods. These messages would appear as critical alarms
in the software used by users that control the systems and their content could
be any text message and sent as many times as wanted. This could disturb
or annoy their tasks. Other specific information about this vulnerability is
unmentioned to avoid confidentiality concerns.
The same attacks to the servers’ interfaces explained before can be performed
by running the client code in Powershell and using the libraries already
installed in the system, instead of compiling the C# code in another machine
and transferring the files. The exact same vulnerabilities and results are
obtained.
While scanning the machines’ files, no passwords were found in, for example,
36 CHAPTER 5. RESULTS
configuration scripts. Additionally, all of the files had the correct permissions
and could not be accessed with the low-level account used.
But the second one, and most important, is that, even if these stagers could
reach inside of the servers, the machines had a strong antivirus installed
which thwarted every attempt to create a connection or execute any malicious
file.
Exploitation
Test Result
Group
Success: Open ports for getting
Nmap port scanning
information
Success: Open ports for raw
Blaster port scanning
reading and writing
Firewall inspection Failed: No flaws
Network
Success: Can see which ports are
Attacks
used more
Wireshark traffic inspection
Failed: Cannot read information
from packets
ARP Spoofing Success
Communication disruption Success
Failed to crash.
DoS Attacks
Success to reset connections
CHAPTER 5. RESULTS 37
Discussion
6.1 Results
Several flaws were found in the system, some of them critical, so
the hypothesis was proven true. Proofs of concepts were created for
most vulnerabilities so they could be tested and fixed. These results
will help increase the security of the system by fixing them and also
taking into consideration, in the future, practices that weren’t thought of
previously.
With the network attacks, it has been proven that communication between
servers can be easily intercepted and disrupted. Numerous tools exist for this
purpose and one can even create them easily. This is one of the first lines of
defense, which means that it will receive most of the attacks and must endure
them.
Regarding SMB and Active Directory attacks, not many have been successful
in this project but some of them have reported a significant amount
of information which can lead to more specific attacks or give clues of
39
40 CHAPTER 6. DISCUSSION
Also, it has be seen that the strength of a system resides its weakest point, in
this case it could be the remote desktop access. If some credentials are gotten
through any method, for example social engineering, almost no other security
method could stop the access to the servers.
Finally, reaching inside of a machine is not the end of the penetration testing,
since there are many different ways to access and each gives more or less
power on other elements. Starting with the least power possible inside of
the system, it is achievable to affect other systems in critical ways and use
processes without being unauthorized. One example of this could be APIs
which have not been properly secured.
It has also been proven the ability to execute not-compiled code inside of the
machine using the system’s own libraries and Powershell, which could be
limited by applying stricter security measures such as disabling Powershell
entirely.
It should be noted that some of the results of this project are consciously
implemented on the system but are considered vulnerabilities regardless of
that because they can be exploited to affect the control system.
All of the testing has been done in a virtual scenario and, if it had been done
in real life systems, attackers would had to go through several security layers,
such as firewalls. Because of this, even though the results can be seen as
critical, they are always relative to the situation in which the testing was
started.
Apart from that, it has been verified that the system is not vulnerable against
most of the popular penetration tools and it is well protected from common
attacks.
As a final note, due to the size and complexity of the system, a considerable
amount of time was spent throughout the thesis trying to understand it and
figuring out how to attack it. Even having all the help needed from its
engineers, probably having more experience with this kind of systems would
CHAPTER 6. DISCUSSION 41
have surfaced other vulnerabilities. But, anyway, the scope of the thesis is to
attack this control system as an outsider with no specific knowledge of the
system, so it is thought that the vulnerabilities discovered are representative
of an hypothetical real attack.
Control servers can have more than one interface so their communication
cannot be easily interrupted. These interfaces would have to be in separate
networks, so an attacker would have to access every network at the same
time to disrupt communications, and it’s uncommon for a machine to have
access to every network. One idea could be to use one network (or as many
as needed) only for control servers and another one for communication with
the rest of the servers.
Other measures that could be taken for this scenario are implementing tests
or checks in the servers software. For example, checking if the delay suddenly
increases or other uncommon events and using another interface in order to
avoid MITM attacks.
ARP spoofing can be mitigated by using static ARP tables (since the network is
unlikely to change continuously) filtering out packets with conflicting source
address information or using ARP spoofing detection software, that block
packets that appear to be spoofed, based on their headers.
With respect to the use of user credentials to attack and access servers, there
are, at first sight, two possible ways to prevent this. First, non-essential
42 CHAPTER 6. DISCUSSION
users should not exist in the domain, and also as few as possible for essential
users. And second, computers and servers should only allow the least possible
number of users at the same time, being the best situation with just one.
Finally, looking at the clients created for attacking the servers, more checks in
the servers’ software, regarding authentication and who uses the API, should
be implemented. Also it should be considered if all the information that is
being transferred is necessary.
Practices like keeping libraries and external software updated and building
a company culture in which the security is one of the main focuses when
developing new software will help reducing the amount of vulnerabilities
present in future systems.
6.3 Methodology
The main focus of the methodology used in this project is not to find or create
the most powerful or efficient exploit but to understand how this kind of
systems work and what are their main weaknesses.
For this, the steps of the Penetration Testing Execution Standard [9] were
followed, as explained in section 2.2. First gathering as much information as
possible about the system; creating or, in this case, using a existing threat
model; discovering vulnerabilities and developing exploits for them and,
finally, collecting data and reporting the results.
As these steps are broad, they can be used in most penetration tests, but that is
also a weakness of the method because more robust exploits could have been
developed following a methodology focused, for example, in Active Directory
hacking.
CHAPTER 6. DISCUSSION 43
Regarding sources of error, a potential one could have been to have the
opportunity to ask and get to know about the system as much as needed,
instead of having no communication. This can be a source of error because,
inadvertently, it might lead to specific attacks that the person giving the
information prefers, instead of discovering vulnerabilities in general.
In this thesis, both parties agreed beforehand the goals of the research
and how to deal with the results, for example, by signing a Non-Disclosure
Agreement and preventing the vulnerabilities to be public. In order to avoid
as much potential damage as possible, the results and objective have been
anonymized and some of them have been skipped.
Depending on the system, the vulnerabilities found and the country where it is
done, sometimes it is illegal to perform these penetration tests, so meticulous
thought about is must be had before it is attempted.
The hacking methods aim to challenge the status quo of the existing business
models, providing an alternate work ethic, with a hands-on approach and
openness of information in their core. This leads to collaboration in society
to solve problems and create new knowledge.
The same approach could also be taken for tackling the climate crisis, for
example, with open data about emissions and transparency on the impact of
products and industries. Bringing technology to the people is related with the
hands-on approach and helps to close the digital divide, which leads to equity
and justice.
For example, these tests could assess the external security of the system,
other services or machines which also exist in the network, spoofing servers
in functionality and not just communication relaying or even ideas like DNS
or DLL hijacking.
CHAPTER 6. DISCUSSION 45
Finally, it has been taken into consideration that all software used is up to
date and that clients and users are responsible with their passwords and
managing the network. In any case, creating a good practices manual for final
users could be useful for minimizing mistakes when setting up or using the
systems.
Chapter 7
Conclusions
Even though a system can seem well secured, there are always vulnerabilities
in it, and that should be the main mentality when using, managing and
developing for it. The vulnerabilities tested in this assessment are only a
fraction of all the vulnerabilities that could exist. For example, hardware
vulnerabilities and social engineering could be two interesting paths to
research but are not feasible in the scope of this thesis.
Similar exercises in the future will be useful to keep improving the security of
the system. It is also recommended to keep up with news and trends related
to security as well as building a company culture that takes security into its
main priorities, specially when dealing with critical systems.
46
Bibliography
[1] Hodge, Rae. Zoom Security Issues: Timeline. URL: https : / / www .
cnet . com / news / zoom - security - issues - zoom - buys - security -
company - aims - for - end - to - end - encryption/ (visited on
05/17/2020).
[4] Schatz, Daniel, Bashroush, Rabig, and Wall, Julie. “Towards a More
Representative Definition of Cyber Security”. In: JDFSL 12.2 (2017).
URL: https://commons.erau.edu/jdfsl/vol12/iss2/8/.
[6] Walkowski, Debbie. What Is The CIA Triad? 2019. URL: https://www.
f5.com/labs/articles/education/what-is-the-cia-triad (visited
on 02/21/2020).
[8] DOI, US. Penetration testing. URL: https : / / www . doi . gov / ocio /
customers/penetration-testing (visited on 07/05/2020).
47
48 BIBLIOGRAPHY
[14] Sun Microsystems, Inc. RPC: Remote Procedure Call. RFC 1057. RFC
Editor, June 1988, pp. 1–25. URL: https://tools.ietf.org/html/
rfc1057.
[19] Microsoft. Microsoft SMB Protocol and CIFS Protocol Overview. URL:
https : / / docs . microsoft . com / es - es / windows / win32 / fileio /
microsoft - smb - protocol - and - cifs - protocol - overview ?
redirectedfrom=MSDN (visited on 07/05/2020).
[20] Team, Samba. Samba. URL: https : / / www . samba . org/ (visited on
05/05/2020).
[21] Kohnfelder, Loren and Garg, Praerit. The threats to our products.
URL: https://adam.shostack.org/microsoft/The- Threats- To-
Our-Products.docx (visited on 03/19/2020).
[24] Will, Justin Warner and Nelson, Matt. Powershell Empire. URL:
https://www.powershellempire.com/ (visited on 03/21/2020).
[26] Team, Samba. SMBclient. URL: https : / / www . samba . org / samba /
docs/current/man-html/smbclient.1.html (visited on 04/26/2020).
[31] Conde Ortiz, Daniel. Man In The Middle Script. URL: https : / /
github.com/DanielCondeOrtiz/PenetrationTesting/blob/master/
mitm.py (visited on 05/17/2020).
50 BIBLIOGRAPHY
[32] Friedl, Steve. NBTscan. URL: http : / / www . unixwiz . net / tools /
nbtscan.html (visited on 04/26/2020).