Securing Your Cloud with Xen Project s Advanced Security Features



Similar documents
Performance tuning Xen

Xen Project 4.4: Features and Futures. Russell Pavlicek Xen Project Evangelist Citrix Systems

KVM Security Comparison

Virtualization Technology. Zhiming Shen

Date: December 2009 Version: 1.0. How Does Xen Work?

Virtual machines and operating systems

Full and Para Virtualization

Attacking Hypervisors via Firmware and Hardware

Knut Omang Ifi/Oracle 19 Oct, 2015

10 Years of Xen and beyond

Xen: FOSS Hypervisor for the Cloud

Cloud^H^H^H^H^H Virtualization Technology. Andrew Jones May 2011

Virtualization. Types of Interfaces

Virtual Machines. COMP 3361: Operating Systems I Winter

Chapter 5 Cloud Resource Virtualization

Advanced Computer Networks. Network I/O Virtualization

Virtualization in the Cloud: Featuring Xen and XCP

Virtual Switching Without a Hypervisor for a More Secure Cloud

Virtualization Technology

Nested Virtualization

KVM: A Hypervisor for All Seasons. Avi Kivity avi@qumranet.com

Intel s Virtualization Extensions (VT-x) So you want to build a hypervisor?

Enterprise-Class Virtualization with Open Source Technologies

Virtual Machine Security

Uses for Virtual Machines. Virtual Machines. There are several uses for virtual machines:

The QEMU/KVM Hypervisor

How To Make A Minecraft Iommus Work On A Linux Kernel (Virtual) With A Virtual Machine (Virtual Machine) And A Powerpoint (Virtual Powerpoint) (Virtual Memory) (Iommu) (Vm) (

RPM Brotherhood: KVM VIRTUALIZATION TECHNOLOGY

Compromise-as-a-Service

Virtualization. Pradipta De

KVM on S390x. Revolutionizing the Mainframe

COS 318: Operating Systems. Virtual Machine Monitors

Virtualization. Dr. Yingwu Zhu

POACHER TURNED GATEKEEPER: LESSONS LEARNED FROM EIGHT YEARS OF BREAKING HYPERVISORS. Rafal Wojtczuk

How to Install Windows on Xen TM 3.0

Hardware Based Virtualization Technologies. Elsie Wahlig Platform Software Architect

Cloud Computing CS

Attacking Hypervisors via Firmware and Hardware

Nested Virtualization

Professional Xen Visualization

BHyVe. BSD Hypervisor. Neel Natu Peter Grehan

Tom Eastep Linuxfest NW April 26-27, 2008 Bellingham, Washington

Virtualization for Cloud Computing

Practical Applications of Virtualization. Mike Phillips IAP 2008 SIPB IAP Series

Security Challenges in Virtualized Environments

Virtualization Technologies

KVM: Kernel-based Virtualization Driver

Virtualization System Vulnerability Discovery Framework. Speaker: Qinghao Tang Title:360 Marvel Team Leader

kvm: Kernel-based Virtual Machine for Linux

Xen and the Art of Virtualization

SUSE Virtualization Technologies Roadmap

KVM KERNEL BASED VIRTUAL MACHINE

Hypervisors. Introduction. Introduction. Introduction. Introduction. Introduction. Credits:

Basics of Virtualisation

Network Functions Virtualization on top of Xen

A quantitative comparison between xen and kvm

Enabling Technologies for Distributed Computing

LinuxCon/CloudOpen 2015

Module I-7410 Advanced Linux FS-11 Part1: Virtualization with KVM

Xen in Embedded Systems. Ray Kinsella Senior Software Engineer Embedded and Communications Group Intel Corporation

VIRTUALIZATION 101. Brainstorm Conference 2013 PRESENTER INTRODUCTIONS

The Microsoft Windows Hypervisor High Level Architecture

Virtualization. ! Physical Hardware. ! Software. ! Isolation. ! Software Abstraction. ! Encapsulation. ! Virtualization Layer. !

Beyond the Hypervisor

Xen Cloud Platform 0.1 User Security

Virtualization and Performance NSRC

9/26/2011. What is Virtualization? What are the different types of virtualization.

Virtualization Management the ovirt way

Virtual Machine Monitors. Dr. Marc E. Fiuczynski Research Scholar Princeton University

Stephen Coty Director, Threat Research

On the Feasibility of Software Attacks on Commodity Virtual Machine Monitors via Direct Device Assignment

Architecture of the Kernel-based Virtual Machine (KVM)

Using Linux as Hypervisor with KVM

A technical review on comparison of Xen and KVM hypervisors: An analysis of virtualization technologies

Chapter 14 Virtual Machines

2972 Linux Options and Best Practices for Scaleup Virtualization

Increasing XenServer s VM density

Windows Server Virtualization & The Windows Hypervisor

How To Create A Cloud Based System For Aaas (Networking)

CPET 581 Cloud Computing: Technologies and Enterprise IT Strategies. Virtualization of Clusters and Data Centers

Application Performance in the Cloud, and its Relationship to QoS

Enabling Technologies for Distributed and Cloud Computing

Hybrid Virtualization The Next Generation of XenLinux

OS Virtualization Frank Hofmann

Introduction to Virtualization & KVM

Virtualization. Explain how today s virtualization movement is actually a reinvention

Virtualization System Security

How To Compare Performance Of A Router On A Hypervisor On A Linux Virtualbox 2.5 (Xen) To A Virtualbox (Xeen) Xen-Virtualization (X

KVM Architecture Overview

GUEST OPERATING SYSTEM BASED PERFORMANCE COMPARISON OF VMWARE AND XEN HYPERVISOR

Masters Project Proposal

A Survey on Virtual Machine Security

Regional SEE-GRID-SCI Training for Site Administrators Institute of Physics Belgrade March 5-6, 2009

Virtual Machines. Virtual Machine (VM) Examples of Virtual Systems. Types of Virtual Machine

Installing & Using KVM with Virtual Machine Manager COSC 495

and Linux Virtualization Solutions

VIRTUALIZATION INTROSPECTION SYSTEM ON KVM-BASED CLOUD COMPUTING PLATFORMS. Advisor: Software Security Lab.

Virtualization. P. A. Wilsey. The text highlighted in green in these slides contain external hyperlinks. 1 / 16

Using IOMMUs for Virtualization in Linux

The NOVA Microhypervisor

Transcription:

Securing Your Cloud with Xen Project s Advanced Security Features Russell Pavlicek, Xen Project Evangelist CloudOpen North America 2013

Who is the Old, Fat Geek Up Front? Xen Project Evangelist Employed by Citrix, focused entirely on the Xen Project History with Open Source begins in 1997 Former columnist with Infoworld, Processor magazines Former panelist on The Linux Show webcast, repeat guest on The Linux Link Tech Show Over 150 pieces published, plus one book on Open Source development and several blogs CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 2 / 32

Introduction: Xen Project and Security Xen Project is an enterprise-grade Type I hypervisor Built for the Cloud before it was called the Cloud A number of advanced security features Driver Domains, Stub Domains, FLASK, and more Most of them are not (or cannot) be turned on by default Although they are simple to use, sometimes they can appear to be complicated CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 3 / 32

Presentation Goals Introduce you to key Xen Project Security Tools Discuss some key Xen security features Get you started in the right direction toward securing your Xen installation CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 4 / 32

Presentation Outline A few thoughts on the problem of securing the Cloud Overview of the Xen architecture Brief introduction to principles of security analysis Consider some attack surfaces and Xen features we can use to mitigate them: Driver Domains PVgrub Stub Domains Paravirtualization (PV) mode vs Hardware Virtualization (HVM) mode FLASK example policy CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 5 / 32

The Cloud Security Conundrum Security: The 800 pound gorilla of the Cloud world Nothing generates more fear in specific, and FUD in general Probably the single greatest barrier to Cloud adoption Immediately behind it is the inability to get out of a 20th century IT mindset (i.e., Change is Bad ) The good news: we don t need to fear it we just need to solve it CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 6 / 32

Cloud Security: New Visibility to Old Problem Security has always been an issue Putting a truly secure system in the open does not reduce its security, just increases the frequency of attack Unfortunately, system security behind the firewall has not always been comprehensive Having solutions in Clouds forces us to solve the security issues we should have already solved Security through obscurity is no longer sufficient CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 7 / 32

Security by Design, not by Wishful Thinking Security by Wishful Thinking is Officially Dead Merely hoping that your firewall holds off the marauding hordes is NOT good enough Addressing security in one area while ignoring others is NOT good enough Saying, We ve never had a problem before is NOT good enough Comprehensive security starts with design It needs to planned and carefully thought through It needs to be implemented at multiple levels It needs components which are themselves securable CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 8 / 32

Xen Project: Security by Design Xen Project was designed for Clouds before the term Cloud was coined in the industry Designers foresaw the day of an infrastructure for wide-area distributed computing which we now call the Cloud http://www.cl.cam.ac.uk/research /srg/netos/xeno/publications.html Xen is designed to thwart attacks from many attack vectors, using different defensive techniques CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 9 / 32

Xen Architecture: A Basic Picture dom 0 device model (qemu) toolstack Hardware Drivers netback blkback Paravirtualized (PV) Domain netfront blkfront Fully Virtualized (HVM) Domain Xen Hypervisor I/O Devices CPU Memory Hardware CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 10 / 32

Security Overview Threat Models: Attacker can access network Attacker controls one Guest VM Security considerations to evaluate: How much code is accessible? What is the interface like? (e.g., pointers vs scalars) Defense-in-depth Then combine security tactics to secure the installation There is no single magic bullet Individual tactics reduce danger; combined tactics go even farther CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 11 / 32

Example System, for our Discussion Hardware setup Two networks: one Control network, one Guest network IOMMU with interrupt remapping (AMD or Intel VT-d v2) to allow for full Hardware Virtualization (HVM) Default configuration Network drivers in the Control Domain (aka Domain 0 or just Dom0 ) Paravirtualized (PV) guests using PyGrub (grub-like boot utility within context of Guest Domain) Hardware Virtualized (HVM) guests using Qemu (as the device model) running in the Control Domain CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 12 / 32

Attack surface: Network path dom 0 toolstack Domain iptables NIC Driver bridge netback netfront Rogue Domain netfront Xen Hypervisor Control NIC Guest NIC Hardware Where might an exploit focus? Bugs in hardware driver Bugs in bridging / filtering Bugs in netback (via the ring protocol) CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 13 / 32

Attack surface: Network path dom 0 toolstack Domain iptables NIC Driver bridge netback netfront Rogue Domain netfront Xen Hypervisor Control NIC Guest NIC Hardware What could a successful exploit yield? Control of Domain 0 kernel Pretty much control of the whole system CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 14 / 32

Security feature: Driver Domains dom 0 toolstack NIC Driver Driver Domain iptables NIC Driver bridge netback Domain netfront Rogue Domain netfront Xen Hypervisor Control NIC Guest NIC Hardware What is a Driver Domain? Unprivileged VM which drives hardware, provides access to guests CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 15 / 32

Security feature: Driver Domains dom 0 toolstack NIC Driver Driver Domain iptables NIC Driver bridge netback Domain netfront Rogue Domain netfront Xen Hypervisor Control NIC Guest NIC Hardware Now a successful exploit could yield: Control of the Driver Domain (PV hypercall interface) Control of that guest s network traffic Control of NIC An opportunity to attack netfront of other guests CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 16 / 32

HowTo: Driver Domains Create a VM with appropriate drivers Use any distribution suitable as a Control Domain Install the Xen-related hotplug scripts Just installing the Xen tools in the VM is usually good enough Give the VM access to the physical NIC with PCI pass-through Configure the network topology in the Driver domain Just like you would for the Control Domain Configure the guest Virtual Network Interface (vif) to use the new domain ID Add backend=domnet to vif declaration vif = [ type=pv, bridge=xenbr0, backend=domnet ] http://wiki.xenproject.org/wiki/driver Domain CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 17 / 32

Attack surface: PyGrub dom 0 toolstack domain builder pygrub Paravirtualized (PV) Domain guest disk Xen Hypervisor What is PyGrub? grub implementation for PV guests Python program running in Control Domain Reads guest filesystem, parses grub.conf, shows menu Passes resulting kernel image to domain builder CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 18 / 32

Attack surface: PyGrub dom 0 toolstack domain builder pygrub Paravirtualized (PV) Domain guest disk Xen Hypervisor Where might an exploit focus? Bugs in file system parser Bugs in menu parser Bugs in domain builder CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 19 / 32

Attack surface: PyGrub dom 0 kernel toolstack domain builder pygrub Paravirtualized (PV) Domain guest disk Xen Hypervisor What could a successful exploit yield? Control of Domain 0 user space Pretty much control of the whole system CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 20 / 32

Security practice: Fixed kernels dom 0 kernel image toolstack domain builder Paravirtualized (PV) Domain guest disk Xen Hypervisor What is a fixed kernel? Passing a known-good kernel from Control Domain Removes attacker avenue to domain builder CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 21 / 32

Security practice: Fixed kernels dom 0 kernel image toolstack domain builder Paravirtualized (PV) Domain guest disk Xen Hypervisor Disadvantages Host admin must keep up with kernel updates Guest admin can t pass kernel parameters, custom kernels, CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 22 / 32

Security feature: PVgrub dom 0 toolstack domain builder pvgrub MiniOS guest disk Xen Hypervisor What is PVgrub? MiniOS + PV port of grub running in a guest context PV equivalent of HVM BIOS + grub Now a successful exploit could yield: Control of the attacked guest domain alone CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 23 / 32

HowTo: PVgrub Make sure that you have the PVgrub image pvgrub-$arch.gz Normally lives in /usr/lib/xen/boot Included in Fedora Xen packages Debian-based: need to build yourself Use appropriate PVgrub as bootloader in guest configuration kernel="/usr/lib/xen/boot/pvgrub-x86_32.gz" http://wiki.xenproject.org/wiki/pvgrub CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 24 / 32

Attack surface: Device model (Qemu) Where might an exploit focus? Bugs in NIC emulator parsing packets Bugs in emulation of virtual devices What could a successful exploit yield? Control Domain privileged userspace Pretty much control of the whole system CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 25 / 32

Security feature: Qemu stub domains What is a stub domain? Stub domain: a small service domain running just one application Qemu stub domain: run each Qemu in its own domain What could a successful exploit yield? Control only of the stub domain VM (which, if FLASK is employed, is a relatively small universe) You need to devise another attack entirely to do anything more significant CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 26 / 32

HowTo: Qemu stub domains Make sure that you have the PVgrub image: ioemu-$arch.gz Normally lives in /usr/lib/xen/boot Included in Fedora Xen packages On Debian (and offshoots), you will need to build it yourself Specify stub domains in your guest config device_model_stubdomain_override = 1 http://wiki.xenproject.org/wiki/device Model Stub Domains CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 27 / 32

Attack Surface: Xen Hypervisor itself Where might an exploit focus? On Paravirtualized (PV) Guests: PV Hypercalls On full Hardware Virtualized (HVM) Guests: HVM hypercalls (Subset of PV hypercalls) Instruction emulation (MMIO, shadow pagetables) Emulated platform devices: APIC, HPET, PIT Nested virtualization Security practice: Use PV VMs whenever possible CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 28 / 32

Security feature: FLASK example policy What is FLASK? Xen Security Module (XSM): Xen equivalent of LSM FLASK: Framework for XSM developed by NSA Xen equivalent of SELinux Uses same concepts and tools as SELinux Allows a policy to restrict hypercalls What can FLASK do? Basic: Restricts hypercalls to those needed by a particular guest Advanced: Allows more fine-grained granting of privileges FLASK example policy This contains example roles for the Control Domain (dom0), User/Guest Domain(domU), stub domains, driver domains, etc. CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 29 / 32

HowTo: Use the example FLASK policy Build Xen with XSM enabled Build the example policy Add the appropriate label to guest config files seclabel=[foo] stubdom label=[foo] Make sure you TEST the example policy in your environment BEFORE putting it into production! NOTE: As an example policy, it is not as rigorously tested as other parts of Xen during release, and it may not be suitable as-is if you are doing unusual things http://wiki.xenproject.org/wiki /Xen Security Modules : XSM-FLASK CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 30 / 32

ARM: Right solution for security Stays in ARM Hypervisor Mode The ARM architecture has separate Hypervisor and Kernel modes Because Xen s architecture maps so well to the ARM architecture, Xen never has to use Kernel mode Other hypervisors have to flip back and forth between modes If a hypervisor has to enter Kernel mode, it loses the security of running in a privileged mode, isolated from the rest of the system This is a non-issue with the Xen Hypervisor on ARM Does not need to use device emulation No emulation means a smaller attack surface for bad guys CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 31 / 32

For More Information... Details at http://wiki.xenproject.org/wiki/securing Xen Thanks to George Dunlap for supplying much of the information presented here, and Stefano Stabellini for ARM information Check out our blog: http://blog.xenproject.org/ Contact me at russell.pavlicek@xenproject.org Thank You! CloudOpen North America 2013 Securing Your Cloud with Xen Project s Advanced Security Features 32 / 32