Security Symposium
#SecuritySymposium
Security Symposium
The security implications of running software in containers
Scott McCarty
Principal Technical Product Manager
2020
2
2020 Security Symposium Welcome
Thank you for joining us for two days of security technology conversations.
A few notes:
#SecuritySymposium
3
Scott McCart - Twitter: @fatherlinux
The security implications of running software in containers
4
“Just because you’re paranoid doesn’t mean they aren’t after you.”
― Joseph Heller, Catch-22
Scott McCart - Twitter: @fatherlinux
The problems
The problems
6
Virtualization
Hypervisor
Virtual machine
Kernel space
Move the kernel around or move the user space around:
Containers don’t contain
User space
Containerization
Hypervisor
Container image
Kernel space
User space
Dan Walsh (my shirt is dedicated to you)
Scott McCart - Twitter: @fatherlinux
The problems
7
7
Container images
Developers, operations, middleware, performance, and security specialists all have a role to play.
WordPress (repository)
Registry server
Drupal (repository)
Image layer
WordPress (repository)
Image layer
Joomla (repository)
Image layer
Image layer
Image layer
Image layer
WordPress
Php + fpm + httpd
corebuild
Layers and tags
Registry
Currency for collaboration
Scott McCart - Twitter: @fatherlinux
The problems
8
Code: mysqld
Configuration: /etc/my.cnf
Data: /var/lib/mysql
Hard work
Other stuff
Scott McCart - Twitter: @fatherlinux
New concepts
New concepts
10
CIA
Has data leaked from the container platform?
Confidentiality
Has somebody tampered with the container?
Integrity
Is the container up�and running?
Availability
Not them, but yeah, they might be after you too …
Scott McCart - Twitter: @fatherlinux
New concepts
11
11
Integrity
Container
Virtual server
Container
Virtual server
Container
Virtual server
Scott McCart - Twitter: @fatherlinux
New concepts
12
Defense in depth
The practice of arranging defensive lines or fortifications so that they can defend each other, especially in case of an enemy incursion
Can we harden each layer?
Container platform
Container hosts
Container images
Scott McCart - Twitter: @fatherlinux
New concepts
13
13
The tenancy scale
Process
Container
Virtual server
Physical server
Rack
Datacenter
Scott McCart - Twitter: @fatherlinux
New concepts
14
SELinux
SECCOMP
Security controls
Scott McCart - Twitter: @fatherlinux
New technical controls
New technical controls
16
Bill of materials
Signing
Read-only containers
Podman diff to see what changed in a container
Container images
Our current operating model controls
Containers add the ability to easily apply techniques
Scott McCart - Twitter: @fatherlinux
New technical controls
17
Since containers are just fancy processes with a well-controlled user space, it’s easier to apply techniques like ...
NO_NEW_PRIVS, Read Only Images, –cap-drop=ALL, –user=user
Container host
SECCOMP + sVirt
Hardening:
We apply many of these techniques today:
Scott McCart - Twitter: @fatherlinux
New technical controls
18
Container platform
This layer exists in the world of physical and virtual servers but is typically an administrator-only tool, such as vCenter or HPSA.
In the world of containers, it’s much more common to delegate some access to developers, architects, and application owners.
Scott McCart - Twitter: @fatherlinux
New technical controls
19
Network firewall (possibly layer 7)
Host-based firewall
Kernel quality
CVE database
Well-understood tenancy
Understood remediation and patching
Security scanning
Standard web application
Many security controls are inconvenient
Tripwire, SELinux, SECCOMP usually disabled
Mutable user space
No temporal understanding
No spatial understanding (code, configuration, data)
No platform delegation granularity
Patched infrequently
Benefits
Limitations
Scott McCart - Twitter: @fatherlinux
New technical controls
20
Containerized web application
All tools from standard web application
Read-only containers
Signing
Platform delegation
Spatial and temporal understanding of containers and application
Updates practiced more
Benefits
Limitations
Tenancy not well understood
Shared kernel
Applications hard to break up into code/configuration/data
More infrastructure (platform and management)
Need better understanding of applications
Many security controls are essentially free
Scott McCart - Twitter: @fatherlinux
Questions?
Questions
22
Citations
GitHub: Supply chain demo: http://bit.ly/2aY1WEO
The New Stack: Container defense in depth: http://bit.ly/2buXflB
Red Hat: Architecting containers series: http://red.ht/2aXjVJF
Red Hat: A practical introduction to Docker terminology: http://red.ht/2beXHDD
WhatIs: Confidentiality, Integrity, and Availability: http://bit.ly/2bcStO9
Scott McCart - Twitter: @fatherlinux
Questions
23
Scott McCart - Twitter: @fatherlinux
Security Symposium
#SecuritySymposium
The security implications of running software in containers
Taming container fears
Scott McCarty
Principal Product Manager
Containers: Red Hat Enterprise Linux & Red Hat OpenShift