appsec usa 2014 talk by chris swan "implications & opportunities at the bleeding edge of...

29
AppSec USA 2014 Denver, Colorado Implications & Opportunities at the Bleeding Edge of DevOps Chris Swan, CTO CohesiveFT @cpswan

Upload: cohesive-networks

Post on 17-Jul-2015

149 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

AppSec USA 2014Denver, Colorado

Implications & Opportunities at theBleeding Edge of DevOps

Chris Swan, CTO CohesiveFT

@cpswan

Page 2: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

@cpswan

CTO – CohesiveFT

Cloud native networking

Chris Swan – why me?

Introduction

Page 3: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

Dockerfile is awesomely productive

Great for DevOps

Containers don’t contain

At least not yet

Images have a manifest problem

Keep track of your stuff

TL;DR

Page 4: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

What do I mean when I say ‘DevOps’?

Part 1

Page 5: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

Let’s start with a demo

Demo time

Page 6: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

John Boyd’s OODA loop

Page 7: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

Industrial design maturity – the auto example

Design for purpose

Design for manufacture

Design for operations

Page 8: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

Industrial design maturity - software

Design for purpose

Design for manufacture

Design for operations

DevOps is just an artefact

Page 9: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

Containers and containment

Part 2

Page 10: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

Containers don’t contain

With thanks to Dan Walsh @rhatdan

Watch his DockerCon 2014 presentation at http://is.gd/dcrhdw

Page 11: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

Shocker

The issue

The response

http://stealth.openwall.net/xSports/shocker.c

https://news.ycombinator.com/item?id=7910117

Page 12: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

Because containers aren’t VMs

And this has yet to come:

Page 13: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

Possible to have our cake and eat it?

Page 14: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

cgroups

Page 15: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

namespaces

mnt mount points, filesystems

pid processes

net network

ipc inter process communication

uts hostname

device devices

user UIDs

Page 16: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

Fine grained control over ‘root’ privileges:

• deny all "mount" operations;

• deny access to raw sockets (to prevent packet spoofing);

• deny access to some filesystem operations, like creating new device nodes, changing the owner of files, or altering attributes (including the immutable flag);

• deny module loading;

• etc.

capabilities

Page 17: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

AppArmor and SELinux

Mandatory Access Control (MAC)

Page 18: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

• Use of namespaces, capabilities and MAC will improve– Might be a game of ‘whack a mole’

• Hard to tell when we’re done (is @solomonstre’s word going to be enough?)

• Libcontainer can drive other mechanisms– More secure options might come

• Hardware support might come– Existing rings 1 & 2 aren’t used much, but aren’t really suitable

– VT-x introduced ring -1, do we need a ring 0.5?

<optimist>Containers will contain</optimist>

Page 19: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

The manifest problem

Part 3

Page 20: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

My Dockerfile from (much) earlier

Page 21: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

Each active line creates a layer

Page 22: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

An image binds layers together

Page 23: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

The image is the unit of deployment

Page 24: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

Which version of Nginx is that?

Page 25: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

Which version of OpenSSL is installed?

Page 26: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

Whilst we want this to be cached in the short term:

apt-get install nginx

We perhaps don’t want it cached in the long term

What are those durations?

Problem 1 – non determinism

Page 27: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

When I run

apt-get install nginx

I don’t know which version of Nginx I just got

Should I?

nginx –v > some_log.txt

Or maybe?

apt-cache policy nginx > some_log.txt

Problem 2 – the manifest problem

Page 28: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

Dockerfile is awesomely productive

Great for DevOps

Containers don’t contain

At least not yet

Images have a manifest problem

Keep track of your stuff

TL;DR

Page 29: AppSec USA 2014 talk by Chris Swan "Implications & Opportunities at the Bleeding Edge of DevOps"

Questions?

Ask now, or on Twitter: @cpswan

Question time