Security Implications of Different Virtualization Approaches for Secure Cyber Architectures
Total Page:16
File Type:pdf, Size:1020Kb
Security Implications of Different Virtualization Approaches for Secure Cyber Architectures Sanaz Rahimi and Mehdi Zargham Department of Computer Science Southern Illinois University Carbondale, IL Email: {srahimi, mehdi}@cs.siu.edu Abstract—Virtualization is increasingly being used as a monitoring, fault tolerance, intrusion tracking, software component in designing secure cyber architectures. The impact analysis, and execution replay. However different proposed applications include strong isolation, monitoring, virtualization approaches differ considerably in their fault tolerance, execution replay, etc. However, there are various virtualization approaches which differ in their security implications, proper applications, overheads, re- security implications, proper applications, overheads, re- quirements, and threat models. Unfortunately, this simple quirements, and most importantly threat models. Firstly, fact is sometimes ignored when virtualization is used as virtualization solutions range from hardware assisted to a security component. Moreover, as a software system, completely software emulated. They can be further catego- a virtual machine monitor (VMM, a.k.a hypervisor) rized by their abstraction level from hardware virtualiza- tion, to operating system level virtualization (containers), is prone to software flaws and vulnerabilities. Relying to application virtualization. Finally, they differ widely in on a large VMM as an always trusted component is the way they handle I/O; from having a separate I/O no more justified than relying on any other pieces of virtual machine (privileged partition) to hardware assisted software. However, what can potentially be different I/O virtualization (IOMMU). In order to deploy the most is the size of the trusted computing base (TCB) and effective virtualization approach when designing a secure cyber system, it is imperative to fully understand the the abstraction levels when using virtualization as a benefits offered and the trade-offs involved in each method. security component. In order to utilize virtualization In this work, we study the spectrum of virtualization modes effectively one has to understand the trade-offs and se- and discuss their strengths, weaknesses, requirements, and curity implications of different virtualization techniques. threat models. For instance, lightweight paravirtualization In this paper, we study each of these techniques, their with IOMMU can reduce the size of the trusted computing base (TCB) significantly which makes it a proper candidate security implications, and proper applications. We use for high assurance isolation and thin client applications. the size of TCB as a measure of security. Of course On the other hand, containers have the similar TCB size rigorous software/hardware verification techniques can as a full blown operating system, but they preserve the result in fewer flaws and vulnerabilities, but given similar semantic information lost in the lower level virtualizations techniques and limited verification resources, TCB can which makes them suitable for replay and monitoring ap- plications. Moreover, we identify several gaps combinations be a good indicator of how much trust can be placed on that have not been implemented yet, to the best of our a system. In the rest of the paper, the system hardware knowledge which, if available, can be valuable for specific is always part of the TCB unless otherwise stated. applications and assurance requirements. The rest of the paper is organized as follows. Section II describes full and paravirtualization techniques. Section I. INTRODUCTION III explains virtualization in software and hardware. Virtualization is increasingly being used as a compo- The abstraction level of each virtualization techniques nent in designing secure cyber architectures. Although is described in Section IV. Section V studies important it was originally developed decades ago in the early I/O virtualization methods. We describe the entire vir- days of computing as a means of resource sharing, tualization spectrum and its applications in Section VI virtualization has reemerged as a viable solution for before concluding the paper in Section VIII. The security secure and high performance computing in recent years. implications of each approach is discussed in the section With the advent of fast and virtualization extended describing that element and summarized in Section VI. hardware, the performance penalty of virtualization has been reduced significantly enabling a personal computer II. FULL VS. PARAVIRTUALIZATION to run multiple virtual machines (VMs) at the same time. Operating system (OS) virtualization techniques can In the realm of security, virtualization has been used be divided into two large categories: full virtualization in a wide variety of applications including isolation, and paravirtualization. In paravirtualization, an OS kernel must be modified Unmodified OS code translates into complex and large and ported to the application programming interface full virtualization VMMs. In addition, the code scanning (API) of the VMM. The OS kernel consists of virtualiz- and software emulation logic add to the complexity of able and non-virtualizable instructions. The virtualizable the VMM. Among the full virtualization techniques, instructions (non-privileged) are executed directly on the hardware assisted model can achieve the smallest code hardware of the machine. However, the non-virtualizable size and the highest assurance level. (privileged) instructions including memory management, interrupt handling, time keeping, I/O handling require III. SOFTWARE VS.HARDWARE ASSISTED more care. They cannot be executed directly on the VIRTUALIZATION hardware because they may interfere with the other VMs Virtualization can be performed in software or hard- running on the same machine. In the paravirtualization ware. The software based model performs all the virtu- model, these instructions are replaced with calls into alization tasks in software and it can run on commodity the VMM (hypercalls.) In this sense, a paravirtualized processors. operating system is aware of the virtualization layer. As Software based VMMs perform memory and I/O a result, paravirtualization can achieve near hardware virtualization in software. Most OSes support paged performances with minimum overhead. Xen [5] is an virtual memory and manage that by directly accessing example of a paravirtualization VMM. Its downside is the processor memory management unit (MMU), but that it requires access to the source code of the operating direct access to MMU or physical memory by a VM system for porting. can result in an interference with other VMs. Since the Full virtualization, on the other hand, virtualizes the VMM has to isolate different VMs from each other it entire hardware platform (including BIOS, I/O, etc.). has to virtualize the paged memory for the guest OSes. It can virtualize unmodified OS code and it does not This is done by adding an extra address translation step require access to the source code. VMWare Workstation to virtual memory. The VMM manages a data structure [28] is a full virtualization VMM. There are several called a shadow page table which translates a VM’s techniques to deal with non-virtualizable instructions in virtual address (a.k.a guest virtual address) to system full virtualization: software emulation, binary translation physical address. Also software based virtualization has (code scanning), and hardware assisted. The first tech- to emulate the I/O devices for the VMs which adds to nique, emulates the hardware instruction in software, the complexity of the VMM. thus providing the desired effect for the OS. Binary trans- Hardware assisted virtualization simplifies the VMM lation runs the majority of the OS code on the hardware, by supporting many of the tasks in hardware. First, but replaces the binary of the non-virtualizable instruc- hardware assisted virtualization including Intel VT [2] tions by new code sequences to achieve the intended and AMD SVM [1] support two-step address translation effect on the virtual hardware. This is done by scanning in hardware (called Extended Page Table for Intel and the OS code pages in the memory (hence the name Nested Page Table for AMD.) They also virtualize “code scanning”). Finally the hardware assisted model interrupts and I/O (see Section V) which simplifies full uses hardware support to trap privileged instructions and virtualization. Moreover, hardware assisted virtualization call the VMM for proper handling. We explain hardware provides simple instructions to access hidden processor assisted virtualization in more detail in the next section. states (non-software accessible) which facilitates VM en- Full virtualization is in general slower than paravir- try/exits. This feature makes context switching between tualization. Among the full virtualization techniques, VMs very efficient. Finally, registers that are frequently hardware assisted model has the lowest and software accessed by the guest OS (e.g. task priority register) may emulation has the highest overhead. also be shadowed for performance reasons. In paravirtualization, the VMM can avoid virtualizing Hardware assisted virtualization can greatly simplify many of the hardware features (e.g. BIOS) simply by the VMM. In fact, thin hypervisors often use hardware changing the OS privileged instructions. Moreover, by features to avoid software emulation of virtualization placing hypercalls in the OS code, it can also avoid tasks (e.g. SecVisor).