Threat Modelling of Historical Attacks with Cysemol
Total Page:16
File Type:pdf, Size:1020Kb
DEGREE PROJECT, IN COMPUTER SCIENCE , SECOND LEVEL STOCKHOLM, SWEDEN 2015 Threat modelling of historical attacks with CySeMoL CARL SVENSSON KTH ROYAL INSTITUTE OF TECHNOLOGY SCHOOL OF COMPUTER SCIENCE AND COMMUNICATION (CSC) Threat modelling of historical attacks with CySeMoL Hotmodellering av historiska attacker med CySeMoL CARL SVENSSON Master’s Thesis at CSC Supervisor: Sonja Buchegger Examiner: Mads Dam Abstract This report investigates the modelling power of the Cy- ber Security Modelling Language, CySeMoL by looking at three documented cyber attacks and attempting to model the respective systems in which they occurred. By doing this, strengths and weaknesses of the model are investigated and proposals for improvements to the CySeMoL model are explored. Referat Hotmodellering av historiska attacker med CySeMoL Denna rapport undersöker modellingsförmågan hos Cyber Security Modelling Language, CySeMoL genom att titta på tre dokumenterade IT-angrepp och försöka modellera syste- men som respektive attack skedde i. Genom att göra detta undersöks styrkor och svagheter i modellen och förslag på förbättringar till modellen utforskas. Acknowledgements I would like to thank my supervisor at KTH, Sonja Buchegger, for her invaluable input and support throughout the project. I would also like to thank my supervisor at Foreseeti, Mathias Ekstedt who provided great discussions about the work and helped me in the right direction throughout the course of the project. Finally, I would like to thank the staff at Foreseeti, especially Joakim, Pontus and Dan who have been supportive of my work and my friend Fredrik Hilding for his enormous help with proofreading and feedback. Contents 1 Introduction 1 1.1 Goal and scope . 1 1.2 This report . 2 2 Background 3 2.1 Threat modelling . 3 2.2 Bayesian networks . 4 2.3 CySeMoL . 5 3 Method 9 4 Case studies 11 4.1 Stuxnet . 11 4.1.1 Background . 11 4.1.2 Modelling . 14 4.1.3 Analysis . 16 4.2 Diginotar . 23 4.2.1 Background . 23 4.2.2 Modelling . 23 4.2.3 Analysis . 25 4.3 Logica . 27 4.3.1 Background . 27 4.3.2 Modelling . 27 4.3.3 Analysis . 28 4.4 Summary of analysis . 28 5 Conclusion 31 Bibliography 33 Appendices 34 A The Stuxnet model 35 B The Diginotar model 41 C Other findings 47 C.1 Visualization . 47 C.2 Modelling . 48 Chapter 1 Introduction Over time, IT systems have grown larger. This has lead to an increase in both complexity and the difficulty of maintaining full knowledge about the system.[1]. Furthermore the attack surfaces and the number of vulnerabilities in a system grow with the size. This presents a problem for administrators and security officers who often work under a constrained budget and need to prioritize where to investigate or improve the system. In order to effectively be able to make these kinds of decisions it is desirable to have relevant information to base the decisions on. Ideally, one might want to have full understanding of the entire system including both hardware and software components and their interactions. Unfortunately due to the sheer size and complexity of modern systems, this is usually infeasible. Different tools have been proposed to aid decision makers with these kind of problems. In addition to traditional methods such as penetration testing and code review, one proposed class of tools is various kinds of models where the analyst tries to create a representation of the system to aid in decision making. One such tool is CySeMoL (Cyber Security Modelling Language) which uses Bayesian networks to calculate security risks in a model of the system. The Cy- SeMoL model was created at KTH[2] and is being further developed by Foreseeti, a startup company at KTH, into a fully integrated threat modelling tool. By using CySeMoL to model known previous attacks, it is possible to both validate the model and find areas that can be improved. 1.1 Goal and scope The goal of this study is to look at several documented breaches in IT systems and use them to evaluate some aspects of CySeMoL. We will consider how well the model is capable of representing the selected attacks and the systems in which they occurred. Improvements to CySeMoL will be proposed in cases where it is not possible to satisfactory model the studied attacks. The proposed improvements will be analysed in terms of how they affect the complexity of the model and the difficulty of modelling. 1 CHAPTER 1. INTRODUCTION 1.2 This report This report is divided into five parts. This introduction aims to frame the discussion and give some context to the problem. This is followed by some background where threat modelling is described and some different alternatives are discussed. We also introduce CySeMoL and describe how it works. With this in place we can move on to the actual methods and experiments where several attacks are studied, modelled and analysed. Finally we finish up with some conclusions about these attacks CySeMoL in particular and threat modelling in general. 2 Chapter 2 Background When designing or maintaining any system of non-trivial size there are many quali- ties that can be assessed. Security is one of them and is the focus of this study. The analysis have been performed using CySeMoL, a threat modelling tool to create and evaluate system-centric threat models using Bayesian networks. This chapter aims to provide some context on threat modelling and overall background on CySeMoL. 2.1 Threat modelling Threat modelling is a process whereby a model is created which represents a subset of possible attacks that can be performed against a system. Such a model is useful when reasoning about the system and to determine where focus should be put in security efforts and which mechanisms and policies can be effective in different areas of the system. Such a model is of interest both before deploying a system as a design tool to investigate different scenarios and variants of the system without having to actually implement them. Furthermore it can also be used as a way of assessing the security properties of an existing system to understand where improvement is needed. A threat model can be built in several ways, for example by starting from dif- ferent perspectives. It is possible to take an attacker-centric view and try to answer the question: "What is this particular attacker capable of doing?". By moving from this question and looking at which attacks are applicable on the analysed system it is possible to create a threat model. A second view, the one taken in CySeMoL, is the system-centric approach where the modeller instead starts with the actual system[2]. Here questions such as "What software and hardware is present?" and "What does the network look like?" is the basis of the model. By looking at the system it is possible to determine what attacks and attack steps are possible and how they affect each other. There are several existing tools for threat modelling. Among the more popular is Microsoft’s SDL Threat Modelling Tool which is "designed for developers and centred on software."[3][4] In particular this means that it is designed to help maintaining 3 CHAPTER 2. BACKGROUND Figure 2.1. The result of a CORAS model[6] the security of individual software and not larger networks with multiple servers, network zones and users. Another modelling framework is Secure Tropos which extends Tropos, a method- ology for software engineering, to include security considerations[5]. Tropos is based on considering large IT systems as a group of smaller individual agents with specific goals for each agent. This means that Secure Tropos is a methodology for develop- ing secure software and is not intended to be used for analysing existing software or the interactions between them. A higher level framework for threat modelling is CORAS. CORAS, like Cy- SeMoL uses a visual tool to model systems. However CORAS is more similar to traditional risk assessment methods by focusing on general classes of problems and how these can lead to valuable assets can be compromised[6][7]. It combines esti- mating probabilities and consequences for different scenarios with their relations to each other. An example of a part of a CORAS model can be seen in Figure 2.1. Here we see that an actor "Employee" has certain attributes associated with it e.g. "Insufficient training" and how those relates to some risks e.g. "Sloppy handling of records". These risks are then associated with a consequence e.g. "Compromises confidentiality of health records" which in turn affects concrete business aspects e.g. "Patient’s health". 2.2 Bayesian networks CySeMoL uses Bayesian networks to create its statistical model. A Bayesian net- work is a model which represents a set of random variables and their conditional dependencies. It can be visualized as a directed acyclic graph, DAG, where an edge from a node A to a node B indicates that B has probability distribution that is conditioned on A. For example, Figure 2.2 shows a simple Bayesian network with 3 boolean variables and the conditional dependencies. By inspecting the ta- bles one can see that if the sprinklers are on and it is not raining we have a 90% 4 2.3. CYSEMOL Figure 2.2. A simple Bayesian network (example from Wikipedia) probability that the grass is wet, in other words: P (Grass wet = T rue|Rain = F alse∧Sprinklers = T rue) = 0.9. It is also possible to make back inferences from a Bayesian network[8], i.e. if we know that the grass is indeed wet, we can use condi- tional probability to calculate the probability that it is raining and the probability that the sprinklers are on.