Introduction to Qubes OS

Similar documents
CS-580K/480K Advanced Topics in Cloud Computing. VM Virtualization II

Module 1: Virtualization. Types of Interfaces

Hypervisor security. Evgeny Yakovlev, DEFCON NN, 2017

Virtual Machines. Part 2: starting 19 years ago. Operating Systems In Depth IX 1 Copyright 2018 Thomas W. Doeppner. All rights reserved.

Virtual Machine Security

Micro VMMs and Nested Virtualization

Spring 2017 :: CSE 506. Introduction to. Virtual Machines. Nima Honarmand

Virtualization. Starting Point: A Physical Machine. What is a Virtual Machine? Virtualization Properties. Types of Virtualization

Virtualization. ! Physical Hardware Processors, memory, chipset, I/O devices, etc. Resources often grossly underutilized


Virtualization. Pradipta De

Advanced Systems Security: Virtual Machine Systems

Advanced Operating Systems (CS 202) Virtualization

Cloud Computing Virtualization

COMPUTER ARCHITECTURE. Virtualization and Memory Hierarchy

Nested Virtualization Update From Intel. Xiantao Zhang, Eddie Dong Intel Corporation

The Challenges of X86 Hardware Virtualization. GCC- Virtualization: Rajeev Wankar 36

Making Nested Virtualization Real by Using Hardware Virtualization Features

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

Virtual Machines. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

Chapter 5 C. Virtual machines

What is KVM? KVM patch. Modern hypervisors must do many things that are already done by OSs Scheduler, Memory management, I/O stacks

CS 550 Operating Systems Spring Introduction to Virtual Machines

CprE Virtualization. Dr. Yong Guan. Department of Electrical and Computer Engineering & Information Assurance Center Iowa State University


Advanced Systems Security: Virtual Machine Systems

CSE543 - Computer and Network Security Module: Virtualization

CSE 120 Principles of Operating Systems

Virtualisation: The KVM Way. Amit Shah

Nested Virtualization and Server Consolidation

4th Generation Intel Core vpro Processors with Intel VMCS Shadowing

CSE543 - Computer and Network Security Module: Virtualization

COSC6376 Cloud Computing Lecture 14: CPU and I/O Virtualization

Virtualization (II) SPD Course 17/03/2010 Massimo Coppola

Virtual Machine Monitors!

CSE543 - Computer and Network Security Module: Virtualization

CS370 Operating Systems

Nested Virtualization Friendly KVM

Virtualization, Xen and Denali

Virtualization. Operating Systems, 2016, Meni Adler, Danny Hendler & Amnon Meisels

Virtualization and memory hierarchy

EE 660: Computer Architecture Cloud Architecture: Virtualization

Virtualization Introduction

CHAPTER 16 - VIRTUAL MACHINES

I/O and virtualization

Xen is not just paravirtualization

Hardware assisted Virtualization in Embedded

OS Security IV: Virtualization and Trusted Computing

Introduction to SGX (Software Guard Extensions) and SGX Virtualization. Kai Huang, Jun Nakajima (Speaker) July 12, 2017

Virtualization with XEN. Trusted Computing CS599 Spring 2007 Arun Viswanathan University of Southern California

Virtually Impossible

Lecture 7. Xen and the Art of Virtualization. Paul Braham, Boris Dragovic, Keir Fraser et al. 16 November, Advanced Operating Systems

Lecture 5: February 3

LINUX Virtualization. Running other code under LINUX

DOUG GOLDSTEIN STAR LAB XEN SUMMIT AUG 2016 ATTACK SURFACE REDUCTION

Secure Containers with EPT Isolation

The only open-source type-1 hypervisor

Introduction Construction State of the Art. Virtualization. Bernhard Kauer OS Group TU Dresden Dresden,

LINUX KVM FRANCISCO JAVIER VARGAS GARCIA-DONAS CLOUD COMPUTING 2017

Virtualization. ...or how adding another layer of abstraction is changing the world. CIS 399: Unix Skills University of Pennsylvania.

CSC 5930/9010 Cloud S & P: Virtualization

I Don't Want to Sleep Tonight:

Multi-Hypervisor Virtual Machines: Enabling An Ecosystem of Hypervisor-level Services

Zdeněk Kubala Senior QA

CS 350 Winter 2011 Current Topics: Virtual Machines + Solid State Drives

Optimizing and Enhancing VM for the Cloud Computing Era. 20 November 2009 Jun Nakajima, Sheng Yang, and Eddie Dong

Computer Architecture Background

About the XenClient Enterprise Solution

Operating system hardening

Virtualization. Adam Belay

A Survey on Security Isolation of Virtualization, Containers, and Unikernels

Lecture 5. KVM for ARM. Christoffer Dall and Jason Nieh. 5 November, Operating Systems Practical. OSP Lecture 5, KVM for ARM 1/42

ACRN: A Big Little Hypervisor for IoT Development

Distributed Systems COMP 212. Lecture 18 Othon Michail

Introduction to Cloud Computing and Virtualization. Mayank Mishra Sujesha Sudevalayam PhD Students CSE, IIT Bombay

Hardware- assisted Virtualization

VIRTUALIZATION: IBM VM/370 AND XEN

Multiprocessor Scheduling. Multiprocessor Scheduling

IBM Research Report. The Turtles Project: Design and Implementation of Nested Virtualization

Xen VT status and TODO lists for Xen-summit. Arun Sharma, Asit Mallick, Jun Nakajima, Sunil Saxena

Confinement. Steven M. Bellovin November 1,

Dune: Safe User- level Access to Privileged CPU Features

The Price of Safety: Evaluating IOMMU Performance

MultiNyx: A Multi-Level Abstraction Framework for Systematic Analysis of Hypervisors. Pedro Fonseca, Xi Wang, Arvind Krishnamurthy

Virtual machine architecture and KVM analysis D 陳彥霖 B 郭宗倫

IBM Research Report. The Turtles Project: Design and Implementation of Nested Virtualization

RISCV with Sanctum Enclaves. Victor Costan, Ilia Lebedev, Srini Devadas

Xen on ARM. Stefano Stabellini

Hardware Virtualization Trends

Linux Virtualization Update

Programmed I/O accesses: a threat to Virtual Machine Monitors?

CS 470 Spring Virtualization and Cloud Computing. Mike Lam, Professor. Content taken from the following:

Björn Döbel. Microkernel-Based Operating Systems. Exercise 3: Virtualization

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

OS Virtualization. Why Virtualize? Introduction. Virtualization Basics 12/10/2012. Motivation. Types of Virtualization.

1 Virtualization Recap

Course Review. Hui Lu

I/O virtualization. Jiang, Yunhong Yang, Xiaowei Software and Service Group 2009 虚拟化技术全国高校师资研讨班

W11 Hyper-V security. Jesper Krogh.

CLOUD COMPUTING IT0530. G.JEYA BHARATHI Asst.Prof.(O.G) Department of IT SRM University

Transcription:

Introduction to Qubes OS bhyvecon Tokyo 2014 @ntddk

Self-introduction Yuma Kurogome(@ntddk) Takeda Lab @ KEIO Univ. Researching about security in low-layer Participant of Security Camp '11, '13 CTF player @ EpsilonDelta

What is Qubes OS?

What is Qubes OS? Secure VM developing by Invisible Things Lab Security by Isolation Open Source(GPL v2) Based on Xen So today I don't speak about bhyve Wish I could supply some inspiration for you!

Invisible Things Lab

Invisible Things Lab Founded by Joanna Rutkowska in 2007 Blue Pill Who forced Citrix to publish souces of XenClient Published Blue Pill[SyScan'06] when she were in COSEINC VT based rootkit(hypervisor) Previous rootkit were on Ring 0 Hooking System Call Altering Kernel Structure So we can detect it

Invisible Things Lab VT based rootkit were on Ring -1 So we can hardly detect it *after infection* For now, VT based rootkit is not serious threat

Invisible Things Lab They had been researched about rootkit SMM(System Management Mode) Intel TXT(Trusted Execution Technology) Now they are developing Secure VM focused on mechanism of Xen

Well... What's the difference between Xen and KVM?

Review: difference betwen Xen and KVM Virtualization methods Intrrupt Memory mapping

Review: difference betwen Xen and KVM Xen Para-Virtualized OS Priviledged Domain Para-Virtualized OS Xen Hardware Para-Virtualization Full-Virtualization by Intel VT Full-Virtualized OS

Review: difference betwen Xen and KVM KVM Full-Virtualized OS Full-Virtualized OS Linux + KVM Hardware Full-Virtualization Para-Virtualization by virtio Full-Virtualized OS

Review: difference betwen Xen and KVM Virtualization methods Para-Virtualization Full-Virtualization Modify OS for virtualized environment No need of full hardware emulation No need of modifying OS Inturrupt Xen uses event channnel KVM uses MSI(-X)

Review: difference betwen Xen and KVM Memory mapping KVM Gest-Physical memory space is part of host-virtual memory space of QEMU Xen Mapping Gest-Physical memory space On demand Both use HW-assisted virtualization Intel VT, AMD-V

Well... What is Intel VT?

Review: Intel VT Handling sensitive instructions How to emulate it? Tired to rewriting instrctuions by hand

Review: Intel VT(VMX) 1.Load some settings to VMCS 2.Set CPU to VMCS 3.VMLAUNCH VMEntry, Enter VMX nonroot mode(guest mode) 4.Execute guest environment 5.Cause of trap VMExit, Enter VMX root mode 6.Check VMExit reasons, emulation 7.VMRESUME VMEntry, Enter VMX nonroot mode 4

Review: Intel VT(VMX) What is VMCS? Virtual Machine Control Structure Program Counter Register VM What to trap

Review: Intel VT(EPT) Simplifying Paging Tired to twice translation Shadow Page Table EPT Extended Page Table Address translation by HW Reduction of Overhead

Review: Intel VT(EPT) We can easily make VMM using VT! KVM Xen... Need of HyperCall Full-Virtualization by VT

Xen Virtualization Xen has a Dom0(host) and some DomU(guest) VM(Dom0) Driver Backend Driver VM(DomU 1) VM(DomU 2) Frontend Driver Frontend Driver Xen Hardware

Xen Virtualization Xen hypervisor execute Dom0 before DomU Dom0 manages other DomU Only Privilege Domain is allowed to access all HW DomU ask Dom0 to HW access via Backend/Frontend Driver Qubes OS apply this architecture to security

Concept of Qubes OS

Desktop Environment Qubes OS want to provide strong security to desktop environment Spreadsheet with your company's data Web Browser Mail Client

Desktop Environment People use different applications there Spreadsheet with your company's data Mail Client Web Browser Game

Desktop Environment If this game was malware? Spreadsheet with your company's data Mail Client Information leakage Web Browser Game

Desktop Environment If the Web Browser has vulnerability? Spreadsheet with your company's data Information leakage Web Browser Mail Client

It's Painful!

Two Approaches Security by Correctness Security by Isolation

Security by Correctness Code Auditing Developers education Microsoft Security Development Lifecycle Testing Fuzzing Safe Programming Language It doesn't work in practice!

Security by Isolation We want the OS to provide isolation between various apps If some of them get compromised... Spreadsheet with your company's data Mail Client Web Browser Game Cutoff

Security by Isolation We want to even decompose some apps... e.g. Web Browser Internal Systems Shopping News Googling

Security by Isolation Isolation provided by OSes are not enogh? Address space isolation User accounts isolation ACL Kernel/User space separation chroot systrace SELinux Secure level of BSD They don't work in practice!

Security by Isolation Monolithic kernels are buggy! Hundreds of 3rd-party drivers cannot be made secure! One bug to rule them all!

Then, Qubes OS

Virtualization for rescue!

Melits of virtualization Bug(vuln) is proportional to LOC[SOSP01] Linux: ten of millions LOC! Bare-metal hypervisor: 100k~300k LOC only!

Conceptual Diagram App Domain Strage Domain Network Domain Domain 0 Come true Isolation!!!

Dom0 Provides secure environment and manager Dom0 doesn't contain Network function and Storage function Only 25k LOC!!!!!!!!

Strage Domain Non-privileged VM Only support Storage function

Network Domain Non-privileged VM Only support Network function

AppVM Main Qubes building blocks(cubes) Hosts user applications We can create VM(Domain) depending on their Use Work Shopping Personal Domains are isolated each other SECURE! Created by Template VM(Read Only)

AppVM Disposable VM Lightweight Only supports ONE application If compromised, there are no informations 400MB per VM Centrally Updatable Each app gets a label (VM name + color frame) that is applied by the Window Manager running in Dom0

AppVM Work VM Shopping VM Desktop ハイパーバイザによるIsolation Work VM

Screenshot http://wiki.qubes-os.org/trac/attachment/wiki/qubesscreenshots/r2b2-kde-three-domainsat-work.png 12 10 8 列 1 列 2 列 3 6 4 2 0 行 1 行 2 行 3 行 4

Introducing Qubes OS qubes-intro-apr-2010.pdf GUI Virtualization

VM Protection Research about VM Protections Overshadow[ASPLO08] Get context of Guest OS from VMM Encrypt pages at memory access Show process to not-encrypted memory Need original loader SP3[Vee08] Process memory encyption from VMM Set accsess control per page Has both encrypted page and not-encrypted page Reduction of Overhead

VM Protection Qubes OS uses Intel VT-d and Intel TXT Protecting VM DMA Protection Direct Memory Access R/W memory from HW No need of CPU

DMA Virtualization by Intel VT-d 1.HW DMA Request 2.DMA Remapping Engine refers to Device Assignment Structure 3.Get Address Translation Structure

DMA Virtualization by Intel VT-d Prevents access from the address range other than the VM at address translation At early boot sequense before VT-d initialized, Intel TXT protects VM

Intel TXT Trust All work as expected! Identity and Measurement Establish Trust by RTM(Root of Trust for Measurement) Reliable engine makes a measurement of integrity Root of Trust Chain of Trust

Intel TXT RTM Static RTM RTM cannot measures itself RTM is firmware Building Chain of Trust from booting Dynamic RTM RTM is GETSEC[SENTER] instruction Building Chain of Trust from executing instruction SENTER enable DMA protection so we can protect VM! Kill two birds with one stone

Intel TXT Intel TXT uses both SRTM and DRTM BIOS(chip) (SRTM) bootloader (SRTM) os (DRTM) hypervisor (thx @yuzuhara)

Introducing Qubes OS qubes-intro-apr-2010.pdf Strage

Cross-VM Qubes OS has some Cross-VM functions Clipboard sharing File transfer via virtual disk Cross VM vulnerability is easily targeted Insert rootkit at LiveMigration[BlackHat DC08] Cross VM Side Channel Attack[CCS12] Estimate the access from another VM from response when malicious VM access physical cache continuously Might steal the key

Introducing Qubes OS qubes-intro-apr-2010.pdf Filesystem

Summaly Domain oriented VM Creates Xen's VM per use Seamless operation by GUI virtualization DMA protection by Intel VT-d Strage protection by Intel TXT Filesystem protection by VM-specific key

See qubes-os.org

Q&A?

Thank you!