Towards Trustworthy Virtualisation: Improving the Trusted Virtual Infrastructure
Total Page:16
File Type:pdf, Size:1020Kb
Towards Trustworthy Virtualisation: Improving the Trusted Virtual Infrastructure Carl Gebhardt Technical Report RHUL{MA{2011{10 17 March 2011 Department of Mathematics Royal Holloway, University of London Egham, Surrey TW20 0EX, England http://www.rhul.ac.uk/mathematics/techreports Towards Trustworthy Virtualisation: Improving the Trusted Virtual Infrastructure Carl Gebhardt Thesis submitted to the University of London for the degree of Doctor of Philosophy Information Security Group Department of Mathematics Royal Holloway, University of London October 2010 Declaration These doctoral studies were conducted under the supervision of Dr. Allan Tomlinson. The work presented in this thesis is the result of original research carried out by my- self, in collaboration with others, whilst enrolled in the Department of Mathematics as a candidate for the degree of Doctor of Philosophy. This work has not been submitted for any other degree or award in any other university or educational establishment. Carl Gebhardt October, 2010 2 To everyone who believed in me. 3 Acknowledgements My heartfelt thanks to my supervisor Dr. Allan Tomlinson for his guidance, en- couragement, patience and dedication over the past three years. I found in you an excellent supervisor and also a good friend. I would like to also thank my examiners, Professor Chris Mitchell and Professor Andrew Martin for taking the time to examine my thesis. I gratefully acknowledge the financial support of the ISG and Professor Keith Mar- tin in helping to organise funding. I would like to thank my fellow post-graduate students in the Information Security Group for many helpful discussions. I must also thank Professor Kenny Paterson for his support and guidance. I am also extremely grateful to Adam Davison and Laura Nequest for proof-reading my thesis. Additionally, I would like to thank Chris I. Dalton, Richard Brown, Boris Balacheff and the rest of the System Security Lab for fruitful collaborations during and beyond my time at Hewlett-Packard's System Security Lab. Finally, I would like to thank my family, and especially my parents, for their support and encouragement throughout my education. Thank you for allowing me to be a free spirit and giving me the freedom to pursue my own ideas and goals, even if they seemed dangerous at times. I would also like to thank my girlfriend Amanda Castillo for her patience and support during so many late nights. 4 Abstract Modern commodity platforms have become easy targets, which are increasingly plagued by malware exploiting legacy design weaknesses. Malware often abuses the large and feature-rich computing base, which forms the basis of modern commodity systems and inherently has to be trusted. In recent years, research has suggested employing machine virtualisation technology to provide isolation where commodity systems fail to do so. On one hand, hardware machine virtualisation support on commodity systems is a very recent technology, and with its novel technology al- lows for new creative security solutions. On the other hand, machine virtualisation changes many previous security assumptions about a platform and therefore creates new challenges itself. This thesis investigates machine virtualisation and trusted computing technology and outlines how those technologies could be utilised to move towards a more trust- worthy virtualisation infrastructure. To achieve this, the thesis has been divided into three main parts. In the first part of this thesis, we describe how the hypervisor's Trusted Computing Base could be reduced and, with new hardware advances, could be further strengthened. To achieve this, we reassess the definition of the Trusted Computing Base and illustrate how segregation of different code blocks could be enforced by hardware protection mechanisms. In the second part, we propose a novel scheme to protect the integrity and confi- dentiality of storage in a virtualised infrastructure. We discuss the implementation of a prototype for a secure, flexible and transparent virtual disk image. We base our concepts on trusted computing, utilising the Trusted Platform Module to efficiently deliver integrity assurance to virtual disk images, as well as enabling the owner to retain control over the disk image throughout its life-cycle. 5 In the third part, we present a flexible architecture that enables a platform user to benefit from the advantages of a fast booting system and a full-featured mainstream Operating System at the same time. The prototype builds on newly available machine virtualisation and trusted hardware features increasingly available on commodity systems. Moreover, this design enhances the concept of an instant-on system with secure, trustworthy and policy enforced compartments. In this thesis, we find that a sensible trusted virtualisation layer requires more protection guarantees than simply the combination of Trusted Computing and virtu- alisation building blocks. We therefore start with the basic foundations to increase the trustworthiness of the lower hypervisor level; in the second part we build up on the previous layer to provide trusted storage in a virtualised environment. The final part embraces the preceding concepts and combines the latest hardware ma- chine virtualisation and trust technologies to deliver a more robust virtualisation infrastructure. 6 Contents 1 Introduction 18 1.1 Motivation . 18 1.2 Contribution . 20 1.3 Thesis Organisation . 21 1.4 List of Publications . 23 I Background 24 2 Virtualisation 25 2.1 Introduction . 26 2.2 Historical Overview . 26 2.3 Taxonomy . 29 2.3.1 Emulation, Simulation and Virtualisation . 31 2.3.2 Formal Requirements . 32 2.3.3 Hypervisor and Virtual Machine Monitor . 33 2.4 Machine Virtualisation . 35 2.4.1 Intel x86 Architecture . 36 2.4.2 Hypervisor Implementations . 38 2.4.3 Memory Virtualisation . 40 2.4.4 Device and I/O Virtualisation . 41 2.4.5 Summary . 44 2.5 Security Discussion . 45 2.6 Summary . 48 3 Trusted Platforms 49 3.1 Introduction . 50 3.2 Trusted Computing . 50 3.2.1 Historical Overview . 51 3.2.2 Trusted Platform . 52 7 3.2.3 Trusted Computing Base . 54 3.2.4 Trusted Platform Module . 54 3.2.5 TPM Functional Overview . 61 3.2.6 Static Root of Trust for Measurement . 62 3.2.7 Dynamic Root of Trust for Measurement . 64 3.3 Discussion . 67 3.4 Summary . 71 II Problem Definition and Related Work 72 4 Problem Definition 73 4.1 Trusted Virtualisation . 74 4.1.1 Motivation . 74 4.1.2 Requirements . 76 4.2 Challenges . 78 4.2.1 Isolation Issues . 78 4.2.2 Trusting the Hypervisor . 80 4.2.3 Management Domain . 81 4.2.4 Platform Limitations . 83 4.2.5 I/O Device Sharing . 87 4.2.6 Virtualising the TPM . 88 4.3 Discussion . 91 4.4 Related Work . 94 4.4.1 Virtualisation and Isolation . 94 4.4.2 Trusted Computing . 97 4.5 Summary . 99 III Improving the Trusted Virtual Infrastructure 100 5 Separating Trusted Computing Base with Hardware 101 5.1 Introduction . 102 5.2 Motivation . 103 5.3 Background . 104 5.3.1 Trusted Computing Base . 104 5.3.2 Ring Protection . 105 5.4 Trusted Computing Base for HVMs . 108 5.4.1 HVM Protection Rings . 108 5.4.2 Code Separation . 109 8 5.5 Usage Scenarios . 111 5.5.1 Inter VM Communication . 112 5.5.2 Virtual Private Networks . 113 5.5.3 Legacy Virtualisation . 114 5.5.4 vTPM Implementation . 115 5.5.5 ACPI . 116 5.5.6 Policy Control . 117 5.6 Considerations . 118 5.6.1 Performance . 118 5.6.2 Development Effort . 118 5.6.3 Device Sharing . 119 5.7 Discussion . 119 5.8 Summary . 120 6 Trusted Virtual Disk Images 121 6.1 Introduction . 122 6.2 Motivation . 123 6.3 Security Requirements . 124 6.3.1 Threats . 124 6.3.2 Design Goals . 125 6.4 Trusted Virtual Disk Images . 126 6.4.1 Assumptions . 127 6.4.2 Ensuring Confidentiality . 128 6.4.3 Integrity Protection . 129 6.4.4 Creating Integrity Metrics . 131 6.4.5 Policy Model . 135 6.4.6 Software Enforcement . 135 6.4.7 Metafile . 136 6.5 Life Cycle . 139 6.5.1 Initialisation . 139 6.5.2 Deletion . 139 6.5.3 Backup . 140 6.5.4 Sparse Format . 140 6.5.5 Migration . 141 6.5.6 Snapshots . 141 6.6 Security Analysis . 142 6.7 Considerations . 145 6.7.1 Fragmentation . 145 9 6.7.2 Performance . 146 6.7.3 Swap-space . 146 6.8 Usage Scenario . 146 6.9 Discussion . ..