Top Banner
If it’s in a container it’s secure right ? A guide to container security by @scottcoulton
19

If it's in a Container it's Secure Right? Scott Coulton, AutoPilot HQ

Jan 11, 2017

Download

Technology

OpenStack
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: If it's in a Container it's Secure Right? Scott Coulton, AutoPilot HQ

If it’s in a container it’s secure right ?

A guide to container security by @scottcoulton

Page 2: If it's in a Container it's Secure Right? Scott Coulton, AutoPilot HQ

About me. Platform engineering lead @

Page 3: If it's in a Container it's Secure Right? Scott Coulton, AutoPilot HQ

Does the traditional infosectoolchain work efficiently in a world where a container’s average lifespan is 2 days?

Page 4: If it's in a Container it's Secure Right? Scott Coulton, AutoPilot HQ

1. IntroWhat we will cover

➔ How is container security different ?Does traditional security fit ?

➔ How to protect our containerProtecting from the inside out

➔ Security and CD Can the 2 worlds live together

➔ Live demo

Page 5: If it's in a Container it's Secure Right? Scott Coulton, AutoPilot HQ

The way that traditional infosec works is

ReactiveContainers allow you to be

Proactive in your approach to infosec

Page 6: If it's in a Container it's Secure Right? Scott Coulton, AutoPilot HQ

2. ExamplesHere are a few comparable examples:

➔ Traditional Nessus, AV, HIDS

➔ New schoolAppArmor, Clair, Notary

Page 7: If it's in a Container it's Secure Right? Scott Coulton, AutoPilot HQ

The risks.● DoS the host (CPU, Memory or Disk)● Fork Bomb● Kernel modification● Privilege Escalation

Page 9: If it's in a Container it's Secure Right? Scott Coulton, AutoPilot HQ

Some sane defaults.● Don’t run --pid host or --net host (without knowing the

risks)● Don’t bind your daemon to tcp://0.0.0.0:4243● Don’t use aufs as your storage driver● Use TLS for all daemon traffic

Page 10: If it's in a Container it's Secure Right? Scott Coulton, AutoPilot HQ

Just one! That’s all you need. (I am talking about process inside your container !!!)

Page 11: If it's in a Container it's Secure Right? Scott Coulton, AutoPilot HQ

If you know the process then apply AppArmor.

Page 12: If it's in a Container it's Secure Right? Scott Coulton, AutoPilot HQ

AppArmor example.

Page 13: If it's in a Container it's Secure Right? Scott Coulton, AutoPilot HQ

Infosec and continuous delivery. The myth ...

Page 14: If it's in a Container it's Secure Right? Scott Coulton, AutoPilot HQ

Add security to the pipelineEnter

Page 15: If it's in a Container it's Secure Right? Scott Coulton, AutoPilot HQ

Sign our images with Notary.

Page 16: If it's in a Container it's Secure Right? Scott Coulton, AutoPilot HQ

The full continuous delivery pipeline.

Page 17: If it's in a Container it's Secure Right? Scott Coulton, AutoPilot HQ

3. Live DemoWe are going to test what we have learnt today and run a standard Nginx image

We will them use the Dirtyc0w vulnerability to write to a file owned by root, then privilege escalate to root for a standard user :

➔ Without AppArmorAll exploits will work

➔ With AppArmorOur container will be safe

Page 18: If it's in a Container it's Secure Right? Scott Coulton, AutoPilot HQ

The code from the live demo is available @ https://github.com/scotty-c

Page 19: If it's in a Container it's Secure Right? Scott Coulton, AutoPilot HQ

Any Questions ?