Shmoocon 2013 - OpenStack Security Brief

55
Cloud Computing This term means absolutely nothing. $variable + vague generic term "We used to leak kilobytes, then megs, then even gigs. Now, we leak EC2 instances. Someday, we'll leak entire datacenters." - @Dymaxion

description

Slides from talk at Shmoocon 2013 given by Matt Joyce titled "OpenStack Security Brief".

Transcript of Shmoocon 2013 - OpenStack Security Brief

Page 1: Shmoocon 2013 - OpenStack Security Brief

Cloud Computing

This term means absolutely nothing. $variable + vague generic term

"We used to leak kilobytes, then megs, then even gigs. Now, we leak EC2 instances. Someday, we'll leak entire datacenters." - @Dymaxion

Page 2: Shmoocon 2013 - OpenStack Security Brief

OpenStackSecurity Brief

ShmooCon 2013http://www.secstack.org/shmoocon2013.ppt

Page 3: Shmoocon 2013 - OpenStack Security Brief

Yes, this is me.

Page 4: Shmoocon 2013 - OpenStack Security Brief

This is also me.

Page 5: Shmoocon 2013 - OpenStack Security Brief

Part I – OpenStack Structure

Page 6: Shmoocon 2013 - OpenStack Security Brief

Cloud Computing is a terrible term.Investopedia defines it as...

... this is why it was referred to as 'Clown Computing' for a very long time.

Page 7: Shmoocon 2013 - OpenStack Security Brief

A Better Term :Elastic Design

Scale horizontally rather than vertically

Distributed services Standard Orchestration APIs All States are Ephemeral

Page 8: Shmoocon 2013 - OpenStack Security Brief

So.. it's an Open Stack?

Elastic Cloud Open Source ( Apache License ) Open Standards ( Foundation ) Written in Python REST APIs Shared Nothing, Message Oriented

Page 9: Shmoocon 2013 - OpenStack Security Brief

Gaming the FoundationA fun tangent

Gaming the Foundation

https://www.music-piracy.com/?p=750

Page 10: Shmoocon 2013 - OpenStack Security Brief

OpenStack Membership 2011

Page 11: Shmoocon 2013 - OpenStack Security Brief

Top Companies by Commits

Page 12: Shmoocon 2013 - OpenStack Security Brief

Votes by Source

Page 13: Shmoocon 2013 - OpenStack Security Brief

Components of OpenStack( Folsom – 2012.2 )

Nova

Swift

Keystone

Glance

Quantum

Cinder

Horizon

python-novaclient

python-swiftclient

python-keystoneclient

python-glanceclient

python-quantumclient

python-cinderclient

Oslo

Ceilometer

python-ceilometerclient

HEAT API

python-heatclient

python-openstackclient

Core Clients Incubated

Page 14: Shmoocon 2013 - OpenStack Security Brief

Good Reading

Ken Pepple's Folsom Architecture Post http://ken.pepple.info/openstack/2012/09/25/openstack-folsom-architecture/

Page 15: Shmoocon 2013 - OpenStack Security Brief

http://ken.pepple.info/openstack/2012/09/25/openstack-folsom-architecture/

Page 16: Shmoocon 2013 - OpenStack Security Brief

Not getting into hypervisor security.OpenStack supports many hypervisors.

KVM Xen / XCP HyperV VMWare Physical Provisioning ( in Grizzly ) etc, etc, etc. sky's the limit, bob's your uncle.

Some supported hypervisors:

Page 17: Shmoocon 2013 - OpenStack Security Brief
Page 18: Shmoocon 2013 - OpenStack Security Brief

Keystone – Identity Manager

REST API, Admin API Service Catalog Backend to sqlite by default Supports MySQL, LDAP, Active Directory

( with patches ). Token generation and shared

authentication endpoint in OpenStack software.

Page 19: Shmoocon 2013 - OpenStack Security Brief

Nova – Elastic Compute ( EC2 ) REST API, Metadata API, EC2 API Integrates with many hypervisors Defaults to libvirt Integrated volume and network

orchestration in Folsom ( deprecated ) Security Groups, Quotas, Zones, Flavors.. Config Drive Ugliest, oldest, most complex code in

project.

Page 20: Shmoocon 2013 - OpenStack Security Brief

Glance – Image Store

REST API Backed my MySQL Stores to local volumes Optionally stores to object storage

Page 21: Shmoocon 2013 - OpenStack Security Brief

Quantum – SDN

Replaces nova-network REST API Can interact directly with hardware Pluggable networking extensions MySQL backend

Page 22: Shmoocon 2013 - OpenStack Security Brief

Cinder – Volumes

Replaces nova-volume REST API MySQL backend LVM management on nova-volume nodes Direct hardware interaction with NAS Direct interaction with soft block stores

Page 23: Shmoocon 2013 - OpenStack Security Brief

Swift – Object Storage ( S3 )

REST API HA-Proxy Load balancer Block Manipulation on Nodes Soft Replication between Nodes

Page 24: Shmoocon 2013 - OpenStack Security Brief

Horizon – Web GUI ( Django )

Integrates with REST APIs Integrates with Client APIs Uses standard Keystone token

authentication Django based Does not use EC2 APIs, solely OpenStack

Page 25: Shmoocon 2013 - OpenStack Security Brief

Message Buses

RabbitMQ ZeroMQ

Page 26: Shmoocon 2013 - OpenStack Security Brief

Development Workflows

Continuous Integration Gerrit Jenkins Launchpad GitHub Packaging

Page 27: Shmoocon 2013 - OpenStack Security Brief

Packaging

Core packages are built from release tarballs

Client packages are built from pypi tarballs Git releases are PGP signed Efforts are being made to ensure all

dependencies are PGP signed properly Ubuntu / RedHat / SuSE among many

vendors with signed releases

Page 28: Shmoocon 2013 - OpenStack Security Brief

Good Reading

China GitHub and Man in the Middlehttps://en.greatfire.org/blog/2013/jan/china-github-and-man-middle

Page 29: Shmoocon 2013 - OpenStack Security Brief

Part II – Targetting OpenStack

Page 30: Shmoocon 2013 - OpenStack Security Brief

Layer 3 Model

Page 31: Shmoocon 2013 - OpenStack Security Brief

Layer 2 Model

Page 32: Shmoocon 2013 - OpenStack Security Brief

Nested Model

Page 33: Shmoocon 2013 - OpenStack Security Brief

The ZeroMQ Message Bus

Fuzzing attacks in 2.1 “ØMQ does not deal with security by

design but concentrates on getting your bytes over the network as fast as possible.”

The question of encrypting 0mq communications is difficult in cloud environments.

Message Signing

Page 34: Shmoocon 2013 - OpenStack Security Brief

Good Reading

Status of Secure Messaginghttp://lists.openstack.org/pipermail/openstack-dev/2013-February/

005614.html

Page 35: Shmoocon 2013 - OpenStack Security Brief

The RabbitMQ Message Bus

Supports SSL Supports Authentication ( SASL ) Public / Private Queues No encryption at rest ( who cares? )

Not as horizontally scalable

Page 36: Shmoocon 2013 - OpenStack Security Brief

The REST APIs and other HTTP Targets

Backend ( wsgi ) Admin ( wsgi ) Client ( requests ) SDKs ( there are many ) Horizon ( django )

Page 37: Shmoocon 2013 - OpenStack Security Brief

Config Drive CVE-2012-3447

https://blueprints.launchpad.net/nova/+spec/config-drive-v2

Compromise of Compute Hosts WITHOUT hypervisor escape possible

Page 38: Shmoocon 2013 - OpenStack Security Brief

Volumes, Block Storage, and Memory

Volume zeroing is a recurring vulnerability Volume encryption coming Shared Memory space presents the

possibility for attackers to sniff memory allocated to other virtual hosts

DMA access is a continual source of hypervisor escape attacks

Page 39: Shmoocon 2013 - OpenStack Security Brief

Authentication

Auth Tokens – UUID v4 / dev urandom PKI Certs – Grizzly* Multifactor Auth – Grizzly* Token Sizes... Enormous 40bytes to 3k.

Potential for DDOS and Failure in Horizon Authn/z – Grizzly*

Page 40: Shmoocon 2013 - OpenStack Security Brief

Analysis of Past Vulnerabilities

Page 41: Shmoocon 2013 - OpenStack Security Brief

Lines of Code per Project

Page 42: Shmoocon 2013 - OpenStack Security Brief

Vulnerability Reports by Company

Page 43: Shmoocon 2013 - OpenStack Security Brief

Part III – Defense against the Dark Arts

Page 44: Shmoocon 2013 - OpenStack Security Brief

Intrusion Detection

Page 45: Shmoocon 2013 - OpenStack Security Brief

Intrusion Detection

Security APIs ( ceilometer, marconi? ) - event logging

Precursor Indicators – Homogeneity makes anomalies easy to spot. Standard methods as well.

External Reporting Security Services ( SaaS ) Infrastructure Knowledge ( This Preso )

Page 46: Shmoocon 2013 - OpenStack Security Brief

Intrusion Response

You guys know this better than I Have a plan. Consumers must have a workflow that is

known and supported for response. Disclosure of breach and other issues

should be planned for ahead of time. Don't Panic.

Page 47: Shmoocon 2013 - OpenStack Security Brief

Forensics ( Chain of Custody )

Ephemeral Design means interruption is usually expected as part of SLA

OpenStack has no mechanism for migrating instances between tenants.

You may want to provide SOC teams tenant access to monitor compromised instances.

Instances can be snapshotted and exported for controlled testing in sandbox.

Logs should be isolated in one way DMZ

Page 48: Shmoocon 2013 - OpenStack Security Brief

Reporting to OpenStack

Open a bug in Launchpad and mark it as a 'security bug'. This will make the bug Private and only accessible to the Vulnerability Management Team.

If the issue is extremely sensitive, please send an encrypted email to one of the Team’s members. Their GPG keys can be found below, and are also available from popular public GPG key servers.

http://www.openstack.org/projects/openstack-security/

Page 49: Shmoocon 2013 - OpenStack Security Brief

Good Reads on Inc Response

Handling Compromised Components in an IaaS Cloud Installation

Aryan TaheriMonfared ([email protected])

Martin G Jaatun ([email protected])

http://www.journalofcloudcomputing.com/content/1/1/16/abstract

Page 50: Shmoocon 2013 - OpenStack Security Brief

Object Storage Pain Points

Overwriting Data is Difficult, no stock methods.

In event of aggressive evidence collection, difficulty in identifying physical resources.

Potential loss of data in evidence collection.

Page 51: Shmoocon 2013 - OpenStack Security Brief

TPM + OpenStack = Trusted Pools

Page 52: Shmoocon 2013 - OpenStack Security Brief

Zoned by Exposed Surface Area

SaaS is most secure PaaS less so IaaS least secure

Duh

Page 53: Shmoocon 2013 - OpenStack Security Brief

Good Reading

Trusted Computing Poolshttp://wiki.openstack.org/TrustedComputingPools

Putting Trust in OpenStackhttp://www.openstack.org/summit/san-diego-2012/openstack-summit-

sessions/presentation/putting-trust-in-openstack

Page 54: Shmoocon 2013 - OpenStack Security Brief

Parting thought

Consider public cloud vendors as you would a Chinese fabrication supply chain.

They are cheap. They are untrusted. They are probably going to be around for

the foreseeable future.

Page 55: Shmoocon 2013 - OpenStack Security Brief

Good Reading

A multi-level security model for partitioning workflows over federated clouds

http://www.journalofcloudcomputing.com/content/1/1/15