security best practices for hyper v and server virtualization

45
Security Best Practices for Hyper-V Rohit Gulati | Partner Technical Consultant Microsoft

Upload: rsnarayanan

Post on 10-May-2015

4.749 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Security Best Practices For Hyper V And Server Virtualization

Security Best Practices for Hyper-V

Rohit Gulati | Partner Technical ConsultantMicrosoft

Page 2: Security Best Practices For Hyper V And Server Virtualization

Agenda

Virtualization OverviewHyper-V ArchitectureHyper-V Security OverviewHyper-V Security GuideSummary!

Page 3: Security Best Practices For Hyper V And Server Virtualization

Virtualization TodayMachine virtualization requires control of privileged operations

CPU registers and memory management hardwareHardware devices

Virtualization usually means emulation, but can also mean controlled access to privileged stateThe core virtualization software is called a Virtual Machine Monitor (VMM)There are two approaches to machine virtualization:

Hosted virtualizationHypervisor virtualization

Page 4: Security Best Practices For Hyper V And Server Virtualization

Hosted Virtualization

Examples:VMware Workstation KVMVirtual PC & Virtual Server

Hypervisor Virtualization

Examples:VMware ESXXenHyper-V

Virtual Machine Monitor Arrangements

Host OS VMM

Guest 2

Hardware

Guest 1 Guest 2Guest 1

Hardware

VMM

Page 5: Security Best Practices For Hyper V And Server Virtualization

Monolithic Versus Microkernel Hypervisor

Monolithic Hypervisor

More simple than a modern kernel, but still complexImplements a driver model

Hypervisor

VM 1(Admi

n)VM 2 VM 3

Hardware

Drivers

Virtualization Stack

Hardware

Hypervisor

VM 2(Child)

VM 3(Child)

Virtual-

ization Stack

VM 1(Parent

)

Drivers

Drivers

Drivers

Microkernel Hypervisor

Simple partitioning functionalityIncrease reliability and minimizes TCBNo third-party codeDrivers run within guests

Page 6: Security Best Practices For Hyper V And Server Virtualization

Agenda

Virtualization OverviewHyper-V ArchitectureHyper-V Security OverviewHyper-V Security GuideSummary!

Page 7: Security Best Practices For Hyper V And Server Virtualization

Hyper-V Background

Three major componentsHypervisorVirtualization StackVirtual Devices

Windows based virtualization platformWindows Server 2008 x64 Edition technology (32/64 bit guest support)Standard, Enterprise, and Datacenter EditionsStandards basedPackaged as a Server Role

Requires hardware assisted virtualizationAMD AMD-V Intel VT

Data Execution Prevention (DEP) should be enabled

Page 8: Security Best Practices For Hyper V And Server Virtualization

Hyper-V Architecture

Root

VirtualizationService

Providers(VSPs)

WindowsKernel

Server Core

DeviceDrivers

Windows Hypervisor

Virtualization Stack

VM WorkerProcessesVM

Service

WMI Provider

Guest Partitions

Ring 0: Kernel Mode

Ring 3: User Mode

VirtualizationServiceClients(VSCs)

OSKernel

EnlightenmentsVMBus

Guest Applications

Server Hardware

Provided by:

Windows

ISV

Hyper-V

Partition

Page 9: Security Best Practices For Hyper V And Server Virtualization

HypervisorPartitioning Kernel

Partition is an isolation boundaryFew virtualization functions; relies on virtualization stack

Very thin layer of softwareMicrokernelHighly reliable

No device driversTwo versions, one for Intel and one for AMDDrivers run in the root partitionLeverage the large base of Windows drivers

Well-defined interfaceAllow others to create support for their OSes as guests

Page 10: Security Best Practices For Hyper V And Server Virtualization

Virtualization StackRuns within the root partitionPortion of traditional hypervisor that has been pushed up and out to make a micro-hypervisorManages guest partitionsHandles interceptsEmulates devices

Page 11: Security Best Practices For Hyper V And Server Virtualization

Agenda

Virtualization OverviewHyper-V ArchitectureHyper-V Security OverviewHyper-V Security GuideSummary!

Page 12: Security Best Practices For Hyper V And Server Virtualization

VM “Aware” ThreatsNew technologies can introduce new types of attacks

VM Host

SAP Dept File / PrintGuest OS {

Guest VMs can not see/detect threats in the VM host due to the virtualizing behavior of the host.

This attack approach is similar, yet much more insidious, than the approach rootkits take to hide their presence.

Page 13: Security Best Practices For Hyper V And Server Virtualization

Top Virtualization Security ConcernsThe loss of separation of duties for administrative tasks, which can lead to a breakdown of defense in depthPatching, signature updates, and protection from tampering for offline virtual machine and virtual machine appliance imagesPatching and secure confirmation management of VM appliances where the underlying OS and configuration aren’t accessibleLimited visibility into the host OS and virtual network to find vulnerabilities and access correct configurationRestricted view into inter-VM traffic for inspection by intrusion-prevention systemsMobile VMs will require security policy and settings to migrate with themImmature and incomplete security and management tools

Data: Gartner

Page 14: Security Best Practices For Hyper V And Server Virtualization

Security AssumptionsGuests are un-trustedRoot must be trusted by hypervisor; guests must trust the rootCode in guests will run in all available processor modes, rings, and segmentsHypercall interface will be well documented and widely available to attackersAll hypercalls can be attempted by guestsCan detect you are running on a hypervisor

We’ll even give you the versionThe internal design of the hypervisor will be well understood

Page 15: Security Best Practices For Hyper V And Server Virtualization

Security GoalsStrong isolation between partitionsProtect confidentiality and integrity of guest dataSeparation

Unique hypervisor resource pools per guestSeparate per-guest worker processes manage stateGuest-to-root communications over unique channels

Non-interferenceGuests cannot affect the contents of other guests, root, hypervisorGuest computations protected from other guestsGuest-to-guest communications not allowed through VM interfaces

Page 16: Security Best Practices For Hyper V And Server Virtualization

Hyper-V SecurityNo sharing of virtualized devicesSeparate VMBus per guest to the parent No sharing of memory

Each has its own address spaceGuests cannot communicate with each other, except through traditional networkingGuests can’t perform DMA attacks because they’re never mapped to physical devicesNo partition can write into hypervisor memory

Page 17: Security Best Practices For Hyper V And Server Virtualization

Virtualization Attacks

Root Partition

VirtualizationService

Providers(VSPs)

WindowsKernel

Server Core

DeviceDrivers

Virtualization Stack

VM WorkerProcessesVM

Service

WMI Provider

Guest Partitions

Ring 0: Kernel Mode

VirtualizationServiceClients(VSCs)

EnlightenmentsVMBus

Server Hardware

Provided by:

Windows

ISV

Hyper-VGuest Applications

Malicious User

OSKernel

VirtualizationServiceClients(VSCs)

Enlightenments

Ring 3: User Mode

Windows hypervisor

VMBus

Page 18: Security Best Practices For Hyper V And Server Virtualization

Agenda

Virtualization OverviewHyper-V ArchitectureHyper-V Security OverviewHyper-V Security GuideSummary!

Page 19: Security Best Practices For Hyper V And Server Virtualization

Hyper-V Security GuideChapter 1: Hardening Hyper-V

Attack SurfaceServer Role Security ConsiderationsVirtual Machine Configuration Checklist

Chapter 2: Delegating Virtual Machine ManagementUsing Tools to Delegate AccessDelegating Access with Authorization Manager (AzMan)System Center Virtual Machine Manager (SCVMM)

Protecting Virtual MachinesMethods for Protecting Virtual MachinesMaintaining Virtual MachinesBest Practices

Page 20: Security Best Practices For Hyper V And Server Virtualization

Attack SurfaceAdding the Hyper-V role service changes the attack surfaceThe increased attack surface includes:

Installed filesInstalled servicesFirewall rules

The attack surface for Hyper-V is documented

Page 21: Security Best Practices For Hyper V And Server Virtualization

Server Role Security ConfigurationTwo main considerations:

Parent partition (root) securityChild partition (guest, VM) security

Parent partitionDefault installation recommendationsHost network configurationSecure dedicated storage devicesHost management configuration (admin privileges)

Virtual MachinesConfiguration recommendationsHardening the OSChecklist

Page 22: Security Best Practices For Hyper V And Server Virtualization

Architecture of an Enterprise Network

Page 23: Security Best Practices For Hyper V And Server Virtualization

Network Configuration for Multi-tier Web Application

Page 24: Security Best Practices For Hyper V And Server Virtualization

Delegating VM ManagementHyper-V management console

Requires admin accountManage VMs

Authorization Manager (AzMan)Microsoft Management Console snap-inUsers assigned to rolesRoles granted permissions to perform operationsHyper-V defines 33 different operations

System Center Virtual Machine ManagerComprehensive management solution for data centersManage VMware ESX Server3 defined profiles

Page 25: Security Best Practices For Hyper V And Server Virtualization

Hyper-V Ecosystem

Page 26: Security Best Practices For Hyper V And Server Virtualization

Delegating VM Management

Page 27: Security Best Practices For Hyper V And Server Virtualization

What is Authorization Manager?

A Role-Based Access Control (RBAC) framework composed of:

AzMan administration tool (AzMan.msc)Runtime that allows access checks against policy

RBAC specifies access in terms of user roles, which are administrator-definedAuthorization policy is managed separately from application code

Page 28: Security Best Practices For Hyper V And Server Virtualization

AzMan Terminology

• A collection of similar resources with the same authorization policy• Virtual machines; virtual networks

Scope

• A job category or responsibility• “Administrators” or “Self-Service Users” (in SCVMM)

Role

• A collection of operations or other actions• None are defined by default

Task

• A specific action that a user can perform• “Start virtual machine”; “Stop virtual machine”

Operation

Page 29: Security Best Practices For Hyper V And Server Virtualization

Hyper-V and AzMan

One default role defined: AdministratorsDefines specific functions for users or roles

Start, Stop, Allow Input, Allow Output, etc.32 operations are defined in the Auth store

Hyper-V admins do not need Administrator access to parent partition OSDefault authorization data stored in XML:

%ProgramData%\Microsoft\Windows\Hyper-V\InitialStore.xml

Authorization data can be stored in Active Directory

Page 30: Security Best Practices For Hyper V And Server Virtualization

Hyper-V Operations at-a-GlanceVM Management Operations

Read Service Reconfigure Service

Virtual Machine Operations

Allow input to a virtual machine

Allow output from a virtual machine

Create virtual machine

Delete virtual machine

Change virtual machine authorization scope

Stop virtual machine

Start virtual machine

Pause and restart virtual machine

Reconfigure virtual machine

View virtual machine configuration

Page 31: Security Best Practices For Hyper V And Server Virtualization

Hyper-V Operations at-a-GlanceNetworking Operations

Create virtual switch

Delete virtual switch

Create virtual switch port

Delete virtual switch port

Disconnect virtual switch port

Create internal Ethernet port

Delete internal Ethernet port

Bind external Ethernet port

Unbind external Ethernet port

Change VLAN configuration on port

Modify switch settings

Modify switch port settings

View switches View switch ports

View external Ethernet ports

View internal Ethernet ports

View VLAN settings

View LAN endpoints

View virtual switch management service

Modify internal Ethernet port

Page 32: Security Best Practices For Hyper V And Server Virtualization

Hyper-V Authorization Scenarios

Departmental or Service Administrators

A Hyper-V server hosts virtual machines for two different LOB applications.

Admins for each application needs to have full control over their own virtual machines, but should have no access to the other application’s virtual machines, or to Hyper-V.

Page 33: Security Best Practices For Hyper V And Server Virtualization

Hyper-V Authorization Scenarios

Departmental or Service Administrators

The help desk and, after hours, the Operations Center, perform some first level analysis of issues that are called in by end-users.

They need to be able to view virtual machine configuration information and interact virtual machines. They should not be able to start, stop or save any virtual machines or change any configuration information.

Page 34: Security Best Practices For Hyper V And Server Virtualization

Using AD as an Auth Store

AzMan supports other auth stores such as Active Directory and SQL ServerUseful for creating standardized auth policies across several serversUse of AD requires WS 2003 domain functional level or betterAuth policies cannot be created in non-domain partitionsHyper-V host computer accounts require READ access to the auth store

Page 35: Security Best Practices For Hyper V And Server Virtualization

System Center Virtual Machine Manager

Page 36: Security Best Practices For Hyper V And Server Virtualization

Delegation and Self Service

Administrators control access through policies which designate capabilitiesDelegated Administrators

Manage a scoped environmentSelf service user

Web user interface Manage their own VMsQuota to limit VMsScripting through PowerShell

Page 37: Security Best Practices For Hyper V And Server Virtualization

Understanding User RolesMembership

Determines which users are part of a particular user roleMembers may be individual users or groupsMembers may be in multiple user roles including user roles based on different profiles

Profile determinesWhich actions are permittedWhich user interface is accessibleHow the scope is defined

Scope determinesWhich objects a user may take actions on

User Role

Membership

Profile

Scope

Page 38: Security Best Practices For Hyper V And Server Virtualization

Built-In ProfilesAdministrators

Full access to all actions Full access to all objectsCan use the Admin console or PowerShell interface

Delegated AdministratorsFull access to most actions Scope can be limited by host groups and Library serversCan use the Admin console or PowerShell interface

Self-Service UsersLimited access to a subset of actions Scope can be limited by host groups and Library shareCan use the Self-Service Portal or PowerShell interface

Page 39: Security Best Practices For Hyper V And Server Virtualization

Customizing ScopesAdministrators

No scope customization available, Administrators have access to all objects

Delegated AdministratorsCan be limited to one or more host groups including all child objectsCan be limited to one or more Library serversincluding all child objects

Self-Service UsersCan be limited to a single host group wherenew virtual machines may be createdCan be limited to a single Library share where new virtual machines can be storedCan be limited to specific templates to use for new virtual machines

Page 40: Security Best Practices For Hyper V And Server Virtualization

Delegating Administration

Seattle New York

Production Dev/Test

Self ServiceUsers

Self ServiceUsers

Self ServiceUsers

Virtualized Environment

Delegated Administration

Delegated Administration

Page 41: Security Best Practices For Hyper V And Server Virtualization

Protecting Virtual MachinesFile system securityEncryptionAuditingMaintaining virtual machinesBest practices

Page 42: Security Best Practices For Hyper V And Server Virtualization

SummaryVirtualization introduces new security concernsHyper-V was designed to achieve strong security goals Use the Hyper-V Security Guide to:

Install and configure Hyper-V with a strong focus on securityReduce the attack surface of Hyper-V host serversSecure virtual networks and storage devices on a Hyper-V host serverDelegate administrative access to virtual machine resources within an organizationProtect Virtual Machines - via file system permissions, encryption, and auditing

Page 43: Security Best Practices For Hyper V And Server Virtualization

Online Resources

Virtualization Home Page: www.microsoft.com/virtualization

Virtualization Solution Accelerators: www.microsoft.com/vsa

MAP tool : http://microsoft.com/map

Hyper-V Green Tool : http://hyper-green.com

Page 44: Security Best Practices For Hyper V And Server Virtualization

धन्यवा�दઆભા�ર ধন্য�বা�দ

ਧੰ�ਨਵਾ�ਦ

ଧନ୍ୟ�ବା�ଦ

நன்றி�

ధన్య�వాదాలు� ಧನ್ಯ�ವಾ�ದಗಳು

നി�ങ്ങള്‍‌ക്ക്� നിന്ദി�

Page 45: Security Best Practices For Hyper V And Server Virtualization

© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS,

IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.