Protecting the Filesystem Integrity of a Fedora 15 Virtual Machine from Offline Attacks using IMA/EVM Linux Security Summit 8 September 2011



Similar documents
A Virtualized Linux Integrity Subsystem for Trusted Cloud Computing

Software Execution Protection in the Cloud

Patterns for Secure Boot and Secure Storage in Computer Systems

Index. BIOS rootkit, 119 Broad network access, 107

One-Stop Intel TXT Activation Guide

Migrating to ESXi: How To

How to Secure Infrastructure Clouds with Trusted Computing Technologies

One-Stop Intel TXT Activation Guide

How to Install the VMware ESXi Hypervisor on Physical Hardware

A Perspective on the Evolution of Mobile Platform Security Architectures

Hypervisor Software and Virtual Machines. Professor Howard Burpee SMCC Computer Technology Dept.

Establishing and Sustaining System Integrity via Root of Trust Installation

Overview of Windows 10 Requirements for TPM, HVCI and SecureBoot

Cedric Rajendran VMware, Inc. Security Hardening vsphere 5.5

Building Blocks Towards a Trustworthy NFV Infrastructure

HW (Fat001) TPM. Figure 1. Computing Node

Lecture Overview. INF3510 Information Security Spring Lecture 4 Computer Security. Meaningless transport defences when endpoints are insecure

Mobile Platform Security Architectures A perspective on their evolution

Encrypted File Systems. Don Porter CSE 506

Protecting Data with Short- Lived Encryption Keys and Hardware Root of Trust. Dan Griffin DefCon 2013

Virtualization. Michael Tsai 2015/06/08

Securing your Virtual Datacenter. Part 1: Preventing, Mitigating Privilege Escalation

Professional Xen Visualization

Backup Solution Testing on UCS for Small-Medium Range Customers (Disk to Tape) Acronis Advanced Backup Software

A Perspective on the Evolution of Mobile Platform Security Architectures

How to Install Microsoft Windows Server 2008 R2 in VMware ESXi

Virtualization & Cloud Computing (2W-VnCC)

Whitepaper Enhancing BitLocker Deployment and Management with SimplySecure. Addressing the Concerns of the IT Professional Rob Weber February 2015

Remote Installation of VMware ESX Server Software Using Dell Remote Access Controller

Volume 2, Issue 2, February 2014 International Journal of Advance Research in Computer Science and Management Studies

Overview Customer Login Main Page VM Management Creation... 4 Editing a Virtual Machine... 6

vsphere Upgrade vsphere 6.0 EN

vtpm: Virtualizing the Trusted Platform Module

Trusted Virtual Machine Management for Virtualization in Critical Environments

Week Overview. Installing Linux Linux on your Desktop Virtualization Basic Linux system administration

Avnet Integration Services.

Using the TPM to Solve Today s Most Urgent Cybersecurity Problems

Oracle VM Server Recovery Guide. Version 8.2

Management of VMware ESXi. on HP ProLiant Servers

Embedded Trusted Computing on ARM-based systems

EXPLORING LINUX KERNEL: THE EASY WAY!

Install Guide for JunosV Wireless LAN Controller

13.1 Backup virtual machines running on VMware ESXi / ESX Server

Software-based TPM Emulator for Linux

TPM Key Backup and Recovery. For Trusted Platforms

Dell Client BIOS: Signed Firmware Update

How to register. Who should attend Services, both internal HP and external

Security Considerations in Cloud Deployments Matthew Garrett

Using BitLocker As Part Of A Customer Data Protection Program: Part 1

Before we can talk about virtualization security, we need to delineate the differences between the

Bypassing Local Windows Authentication to Defeat Full Disk Encryption. Ian Haken

UNCLASSIFIED Version 1.0 May 2012

A M D DA S 1. 0 For the Manageability, Virtualization and Security of Embedded Solutions

Background. TPMs in the real world. Components on TPM chip TPM 101. TCG: Trusted Computing Group. TCG: changes to PC or cell phone

MODULE 3 VIRTUALIZED DATA CENTER COMPUTE

On the security of Virtual Machine migration and related topics

Dell PowerEdge Blades Outperform Cisco UCS in East-West Network Performance

Remote PC Guide Series - Volume 2a

Encrypting with BitLocker for disk volumes under Windows 7

Virtualization. Pradipta De

Cisco Nexus 1000V Virtual Ethernet Module Software Installation Guide, Release 4.0(4)SV1(1)

Converting Linux and Windows Physical and Virtual Machines to Oracle VM Virtual Machines. An Oracle Technical White Paper December 2008

vtpm: Virtualizing the Trusted Platform Module

Technical Brief Distributed Trusted Computing

Answers to Questions Received from Vendors

Data At Rest Protection

Control your corner of the cloud.

Securing sensitive data at Rest ProtectFile, ProtectDb and ProtectV. Nadav Elkabets Presale Consultant

HP VMware ESXi 5.0 and Updates Getting Started Guide

Virtualization System Security

Secure Storage. Lost Laptops

Using the TPM: Data Protection and Storage

Manage Dell Hardware in a Virtual Environment Using OpenManage Integration for VMware vcenter

[VADP OVERVIEW FOR NETBACKUP]

ViPNet ThinClient 3.3. Quick Start

Expert Reference Series of White Papers. VMware vsphere Essentials

Business Process Desktop: Acronis backup & Recovery 11.5 Deployment Guide

Remote PC Guide Series - Volume 2b

Secure Data Management in Trusted Computing

Virtual Machine Security

The more laws and order are made prominent, the more thieves and robbers there will be. Lao Tzu

POD INSTALLATION AND CONFIGURATION GUIDE. EMC CIS Series 1

CS 155 Spring TCG: Trusted Computing Architecture

BitLocker/Active Directory Encryption Procedure Department: Information Security Office Version: 1.0 Last Revised: 09/26/2011

VMware for Bosch VMS. en Software Manual

Dell AppAssure Universal Recovery

IBM Upward Integration Module (UIM) Advanced Technical Sales Wayne Wigley

In addition to their professional experience, students who attend this training should have technical knowledge in the following areas.

Acronis Backup & Recovery 10 Server for Linux. Quick Start Guide

Cautions When Using BitLocker Drive Encryption on PRIMERGY

Installation ServerView ESXi CIM Provider V6.12

Safety measures in Linux

Windows 7. Qing Liu Michael Stevens

Deploying and updating VMware vsphere 5.0 on HP ProLiant Servers

CS 356 Lecture 25 and 26 Operating System Security. Spring 2013

Trusted Virtual Datacenter Radically simplified security management

VMware vsphere 5.0 Boot Camp

Survey of the Operating Landscape Investigating Incidents in the Cloud

Deploy and test ovirt using nested virtualization environments. Mark Wu

End User Devices Security Guidance: Apple OS X 10.10

Transcription:

Protecting the Filesystem Integrity of a Fedora 15 Virtual Machine from Offline Attacks using IMA/EVM Linux Security Summit 8 September 2011 Peter Kruus Peter.Kruus@jhuapl.edu

Agenda Need for integrity protection in virtual machines Use Case: VMware ESXi environment Integrity protection with IMA, IMA Appraise, and EVM Setup and booting in a VM Example attack Next Steps 2

Need for Integrity in a Virtual Environments Problem: Virtual machines (VMs) are vulnerable to integrity attacks when running and while powered off Need: Disk encryption may offer protection while powered off, but may not when VM is powered on Integrity protection for files even when the system is not running and when MAC controls are not effective. Our Approach: Apply IMA Appraisal and Extended Verification Module (EVM) in a VMware VM to protect against offline attacks Illustrate loading EVM keys via initramfs (via dracut patches) 3

Security Goals in a VM Monitor file integrity Critical files - executables, config files, libraries While the system is running and protect while powered off Detect file modifications locally at load-time, Before a file is executed, read, mapped to memory Compare measurement against known local golden value Local Enforcement Block access to files based on appraisal results Hardware root of trust Build a root of trust starting in immutable firmware Measure the kernel and initramfs Use TPM/vTPM for immutable integrity protection of measurements 4

Use Case: Virtualization with VMware ESXi VMware ESXi Baremetal PXE booted onto hardware to protect from hardware failure Hardware (TPM support, but ) Dell PowerEdge HP Proliant Blade Server IBM BladeCenter VM images stored on Storage Area Network (SAN) 100 s of VMs Management vcenter Migration between servers for load balancing vcenter Rack Servers SAN Blade Servers Running VM LAN Poweredoff VMs (hundreds) 5

Use Case: ESXi Hardware Platforms Hardware platforms available with TPM support TPM enables a hardware rooted chain of trust 1. Measurements start in immutable BIOS 2. Measure the BIOS then give control to the BIOS 3. Measure the ESXi hypervisor kernel 4.. Measurements extended into the TPM Immutable Preserves integrity for reporting TPM measurements can be reported in vcenter TPM PCRs are populated Unfortunately, TPM is inaccessible to the VMs No vtpm support yet Measurements of VM kernel/initramfs need protection 6

Use Case: Attack Scenarios VMs vulnerable when powered off Virtual disks can be mounted, the file system inspected and modified MAC protections are not effective when system is not running (e.g., SELinux, SMACK) Possible file system attacks Modification of critical files Injection of malicious files Replacing known trusted files with malicious files Cloudburst (CVE-2009-1244) Attack against VMware products to break out of VM and execute arbitrary code on the host Enables attacks against other VMs on the same server SAN Running VM LAN Powered-off VMs 7

Integrity Protection in a VM Integrity kernel patches git://git.kernel.org/pub/scm/linux/ kernel/git/zohar/ima-2.6.git IMA for remote attestation (included since 2.6.30) IMA Appraisal for load time integrity Extended Verification Module (EVM) New key types supported on kernel s key ring can be used by EVM trusted keys sealed to a TPM encrypted keys encrypted by another key (e.g. trusted or user) Our approach Use IMA Appraisal with EVM Use encrypted key type Load keys during initramfs (dracut patches) 8

Review of IMA Appraisal and EVM Local load time integrity measurement, appraisal, and enforcement Hashes added as extended security attributes # file: boot/vmlinuz-3.0.0-rc1+ security.ima=0x0123fef68e5920129b30c80fb6b1987dd58ff3e0a4 security.evm=0x022a27e8166e244ffbc1ad4bf045247a8d493dd567 security.selinux=0x73797374656d5f753a6f626a6563745f723a626f 6f745f743a733000 security.evm boot/vmlinuz-3.0.0-rc1+ boot/vmlinuz-3.0.0-rc1+ security.evm=0x022 security.ima=0x012 security.selinux=0x737973 security.ima : sha1 hash of the file Updated on file write when ima_appraise=fix! Cannot be updated when ima_appraise=enforce! Testable using sha1sum! security.evm : keyed HMAC of selected file attributes security.ima, security.selinux, security.smack64, security.capability Key must be loaded into the kernel to compute HMAC Can can be protected with trusted or encrypted key types security.ima 9

Setup in a VM: First Use Build and install integrity patched kernel CONFIG_IMA=y! CONFIG_IMA_MEASURE_PCR_IDX=10! CONFIG_IMA_AUDIT=y! CONFIG_IMA_LMS_RULES=y! CONFIG_IMA_APPRAISE=y! CONFIG_EVM=y! Reboot into fix mode root (hd0,0) kernel /vmlinuz-3.0.0-rc5+ ro root=/dev/mapper/volgroup-lv_root rd_lvm_lv=volgroup/ lv_root rd_lvm_lv=volgroup/lv_swap ima_tcb ima_appraise=fix evm=fix initrd /initramfs-3.0.0-rc5+.img Generate keys for EVM Label the filesystem LSM labels Integrity labels for IMA Appraisal and EVM find / -fstype ext4 -type f -uid 0 -exec head -n 1 '{}' >/dev/null \;! Rebuild the initramfs with IMA/EVM patches dracut f! 10

Booting in a VM Boot into enforce mode root (hd0,0) kernel /vmlinuz-3.0.0-rc1+ ro root=/dev/mapper/volgroup-lv_root rd_lvm_lv=volgroup/lv_root rd_lvm_lv=volgroup/lv_swap ima_tcb initrd /initramfs-3.0.0-rc5+.img Load initramfs (see next slide) Prompt user for password and load EVM keys Load IMA measurement and appraisal policy cat measure.selinux > /sys/kernel/security/ima/ policy! Enable EVM echo "1" > /sys/kernel/security/evm! System boots and logs indicate success 11 Aug 4 01:34:12 localhost kernel: [ 3.551290] IMA: No TPM chip found, activating TPM-bypass!! Aug 4 01:34:12 localhost kernel: [ 0.156071] EVM: security.selinux! Aug 4 01:34:12 localhost kernel: [ 0.156072] EVM: security.ima! Aug 4 01:34:12 localhost kernel: [ 0.156073] EVM: security.capability! Aug 4 01:34:12 localhost kernel: [ 143.190579] EVM: initialized!

Details of initramfs (dracut) 12 1. Prompts for integrity password and load as user key into kernel key ring Dracut 97masterkey 2. Loads encrypted EVM key into kernel as encrypted-key Dracut 97masterkey 3. Kernel decrypts encrypted-key with user-key (password) to recover EVM key 4. EVM key ready for use! 5. Initializes IMA/IMA Appraise policy Dracut 98integrity 6. Initializes EVM Dracut 98integrity 7. Ready for measurement, local appraisal, local enforcement! Session Keyring -3 --alswrv 0 0 keyring: _ses 590585570 --alswrv 0-1 \_ keyring: _uid.0 924524992 --alswrv 0 0 \_ user: kmk-user 407956701 --alswrv 0 0 \_ encrypted: evm-key 1) password entered! 2) user-key = password! user-key! Linux kernel! 3) encrypted blob loaded as encrypted-key! 4) evm-key decrypted! evm-key!

Integrity Protection in Action! Good file with Integrity/LSM Labels # file: boot/vmlinuz-3.0.0-rc1+ security.evm=0x022a27e8166e244ffbc1ad4bf045247a8d493dd567 security.ima=0x0123fef68e5920129b30c80fb6b1987dd58ff3e0a4 security.selinux=0x73797374656d5f753a6f626a6563745f723a626 f6f745f743a733000 Dog Offline attacker modifies file (dog to cat).security labels unchanged..but # file: boot/vmlinuz-3.0.0-rc1+ security.evm=0x022a27e8166e244ffbc1ad4bf045247a8d493dd567 security.ima=0x0123fef68e5920129b30c80fb6b1987dd58ff3e0a4 security.selinux=0x73797374656d5f753a6f626a6563745f723a626 f6f745f743a733000 Measurements taken on file load/execute/mmaped in enforce mode detect changes.access denied! security.evm=0xc1ad4bf04166e244f0fb6b4bf045247a0fb6b32267 security.ima=0x29b30c80f68e592012f5782eab99002346abc51010 Cat 13

Next Steps: Possible improvements Measure VM kernel and initramfs during boot E.g., trusted boot vtpm to protect critical measurements Tie EVM keys to platform state Trusted key type Use vtpm Interim solution Measure VM kernel and initramfs from hypervisor Only boot if measurements attest successfully Ultimate solution! vtpm support in linked to hardware TPM vtpm supported trusted boot 14