How to Design a Trustworthy Ipsec VPN Device Employing Nested Tunnels?
Total Page:16
File Type:pdf, Size:1020Kb
How to design a trustworthy IPsec VPN device employing nested tunnels? Alexander Spottka Information Security, master's level (60 credits) 2018 Luleå University of Technology Department of Computer Science, Electrical and Space Engineering ABSTRACT nterprises use site-to-site Virtual Private Network (VPN) technology to securely transmit data over insecure networks, such as the Internet. By utilizing commercial VPN products, Eorganizations partially rely on the vendors to keep their communication out of reach from malicious groups or individuals. These VPN servers consist of thousands of subcomponents, which can be grouped into hardware, operating system, general software, protocols, and algorithms. The main idea of this study is to design an IPsec VPN architecture based on IPsec nesting. This is achieved by designing two servers that consist of different subcomponents on each layer. Thus, a vulnerability in one component will not necessarily put the entire IPsec communication at risk. The subcomponents picked for deployment are investigated and reviewed based on their trustworthiness, which will be based on later defined criteria. This trust analysis will act as a potential starting point for providing a framework for future trust assessments. i ACKNOWLEDGEMENTS efore presenting details of this study, I want to thank Combitech, and especially Per Westerberg and Daniel Arvidsson for their support of this thesis. Despite their busy Bschedule, we managed to initiate the thesis. Furthermore, I wish to thank Tero Päivärinta and Parvaneh Westerlund. Even though I decided to pursue this study on late notice, they supported me with detailed feedback and simplicity in the process. Personally, I want to thank my girlfriend Melina who, despite her own work, took care of everything else in order to help me stay focused on the study. Lastly, I need to express my appreciation to have such a caring family at home. My mother Dagmar and brother Matthias especially kept me motivated and helped me unwind after long days of writing. iii TABLE OF CONTENTS Page List of Tables vi List of Figures vii 1 Introduction 1 1.1 Literature Review....................................... 2 1.1.1 Trust.......................................... 3 1.1.2 Hardware ....................................... 4 1.1.3 Operating System .................................. 5 1.1.4 IPsec Applications.................................. 6 1.1.5 Protocols and Cryptography ............................ 6 1.2 Research Question....................................... 7 1.3 Motivation ........................................... 7 1.4 Limitation ........................................... 7 1.5 Target Group.......................................... 8 1.6 Outline ............................................. 8 2 Theoretical Context9 2.1 Assurance and Security ................................... 9 2.2 IPsec............................................... 10 2.2.1 Symmetric vs. Asymmetric cryptography .................... 10 2.2.2 Key Exchange..................................... 11 2.2.3 Functionality of IPsec................................ 11 3 Methodology 13 3.1 Research Method ....................................... 14 3.2 Reliability and Validity.................................... 16 3.3 Ethical Considerations.................................... 17 4 Design 19 4.1 Hardware............................................ 20 iv 4.1.1 UDOOx86....................................... 20 4.1.2 ODROID-XU4..................................... 22 4.2 Operating System....................................... 23 4.2.1 RedHat Enterprise Linux.............................. 23 4.2.2 Debian Jessie..................................... 24 4.3 IPsec Applications....................................... 25 4.3.1 strongSwan ...................................... 26 4.3.2 Libreswan....................................... 27 4.4 Cryptography.......................................... 28 4.4.1 ESP-Encryption Algorithms ............................ 29 4.4.2 Integrity........................................ 31 4.4.3 Diffie-Hellman Group................................ 32 4.4.4 Digital signatures .................................. 33 4.5 Finalized design........................................ 34 5 Implementation 37 5.1 Configuration of the strongSwan servers ......................... 37 5.2 Configuration of the Libreswan servers.......................... 39 6 Demonstration 41 7 Evaluation 43 7.1 Summarized trust score for all ............................... 43 7.2 IPsec Testing and Certification Program Criteria Version 3.0............. 45 7.2.1 IPsec .......................................... 46 7.2.2 Logging......................................... 46 7.2.3 Administration.................................... 47 7.2.4 Authentication using Certificates......................... 47 7.3 Performance .......................................... 48 8 Discussion 51 9 Conclusion 53 9.1 Future research ........................................ 54 A Appendix A 1 Bibliography 5 v LIST OF TABLES LIST OF TABLES TABLE Page 4.1 Pros and cons of SECO and their product: UDOOx86.................... 21 4.2 Trust Score for SECO/UDOOx86................................ 21 4.3 Pros and cons of Hardkernel and their product ODROID-XU4 .............. 22 4.4 Trust Score for Hardkernel / ODROID-XU4.......................... 23 4.5 Pros and cons of RHEL v.7.................................... 24 4.6 Trust Score for RHEL v.7..................................... 24 4.7 Pros and cons of Debian ..................................... 25 4.8 Trust Score for Debian ...................................... 25 4.9 Pros and cons of strongSwan................................... 26 4.11 Pros and cons of Libreswan ................................... 27 4.10 Trust Score for strongSwan ................................... 27 4.12 Trust Score for Libreswan .................................... 28 4.13 Algorithm Choices......................................... 29 4.14 Trust Score for AES, CHACHA20, Camellia ......................... 31 4.15 Trust Score for SHA........................................ 32 4.16 Trust Score for MODP and X25519............................... 33 4.17 Trust Score for RSA, ECDSA, and EdDSA .......................... 34 4.18 Algorithm Choices......................................... 34 4.19 Final design............................................. 35 7.1 Trust Score for Device 1 ..................................... 43 7.2 Trust Score for Device 2 ..................................... 44 7.3 Throughput result......................................... 49 7.4 Average Throughput in relation to baseline.......................... 49 7.5 Latency result ........................................... 50 vi LIST OF FIGURES FIGURE Page 2.1 IP vs. IPsec datagram....................................... 12 3.1 IPsec topology ........................................... 14 4.1 IPsec topology ........................................... 19 4.2 Architecture of the artefact ................................... 36 6.1 Raw ICMP traffic ......................................... 41 6.2 Traffic after establishing one IPsec tunnel .......................... 42 6.3 Traffic after establishing nested IPsec tunnels........................ 42 A.1 UDP throughput no tunnel.................................... 1 A.2 TCP throughput no tunnel.................................... 1 A.3 UDP throughput with tunnel between RHEL machines .................. 2 A.4 TCP throughput with tunnel between RHEL machines................... 2 A.5 UDP throughput with tunnel between Debian machines.................. 2 A.6 TCP throughput with tunnel between Debian machines.................. 2 A.7 UDP throughput with tunnel between both machines ................... 2 A.8 TCP throughput with tunnel between both machines.................... 3 vii HAPTER C 1 INTRODUCTION n times of information becoming one of the world’s most valuable assets, it has become imper- ative to protect it. IT systems have become increasingly abstract and incomprehensible for I the average user. The creation of a global spanning system requires secure communication, free from eavesdropping or manipulation. Virtual Private Networks (VPN) offer the capability to establish secure channels over an untrusted media, such as the Internet. The previous statement can only be deemed true if VPN devices can assure the correctness of their functionality so the user has a high degree of assurance of their safety. This study attempts to clarify the terminology of trust, since Gollman indicates its multiple definitions, leading to miscommunication, and therefore vulnerable structures [1]. Trust cannot be taken as granted, especially since Edward Snowden revealed large scale digital surveillance of intelligence agencies in the United States of America [2], abusing critical vulnerabilities in a wide span of firewall products. Still, the thorough investigation of the correctness of VPN servers is currently unfeasible, since they consist of a high number of subcomponents. As described in the journal paper of Nemec et al. [3], history has shown that particular flaw in a widely used cryptographic library, distributed on Trusted Platform Modules (TPM) and other carriers, such as ID cards and passports, which resulted in roughly a quarter of vulnerable keys within the test machine available in the study. Using a VPN server that contains a flawed TPM endangers confidentiality, integrity, and availability of the established communication channel. This is an example to show