Using Hypervisor and Container Technology to Increase Datacenter Security Posture
LinuxCon North America 2016 – Toronto Canada
Increase Datacenter Security Posture LinuxCon North America 2016 - - PowerPoint PPT Presentation
Using Hypervisor and Container Technology to Increase Datacenter Security Posture LinuxCon North America 2016 Toronto Canada #whoami Tim Mackey Current roles: Senior Technical Evangelist; Occasional coder Former XenServer Community
LinuxCon North America 2016 – Toronto Canada
Current roles: Senior Technical Evangelist; Occasional coder
Cool things I’ve done
Find me
In 2015, 89% of data breaches had a financial or espionage motive
Source: Verizon 2016 Data Breach Report
But security investment is often not aligned with actual risks
Potential Attack Iterate Test against platforms Document
Deploy
glibc
Bug Reported
July 2015 Vuln: CVE-2015-7547: glibc getaddrinfo stack-based buffer overflow
glibc
Vuln Introduced
May 2008
glibc
Bug Reported
July 2015
CVE-2015- 7547 CVE Assigned
Feb 16-2016
Low Security Risk
Vuln: CVE-2015-7547: glibc getaddrinfo stack-based buffer overflow
glibc
Vuln Introduced
May 2008
CVE-2015- 7547 CVE Assigned
Feb 16-2016
glibc
Bug Reported
July 2015
National Vulnerability Database
Vuln Published
Feb 18-2016
Moderate Security Risk Low Security Risk
Vuln: CVE-2015-7547: glibc getaddrinfo stack-based buffer overflow
glibc
Vuln Introduced
National Vulnerability Database
Vuln Published You Find It
May 2008
CVE-2015- 7547 CVE Assigned
Feb 16-2016 Feb 18-2016
glibc
Bug Reported
July 2015
Patches Available You Fix It Highest Security Risk Moderate Security Risk Low Security Risk
Vuln: CVE-2015-7547: glibc getaddrinfo stack-based buffer overflow
500 1000 1500 2000 2500 3000 3500 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015
Open Source Vulnerabilities Reported Per Year
BDS-exclusive nvd
Reference: Black Duck Software KnowledgeBase, NVD
Primary goals
Implemented by
Operating System Kernel User Mode Applications
Read Application Memory Write Application Memory Read Kernel Memory Write Kernel Memory Read Kernel Memory Write Kernel Memory Read Application Memory Write Application Memory
mov r8d,2Bh mov ss,r8w mov r9d,dword ptr [r13+3Ch] mov dword ptr [rsp],r9d mov esp,dword ptr [r13+48h] jmp fword ptr [r14] mov r14,rsp mov word ptr [rsp+8],23h mov word ptr [rsp+20h],2Bh mov r8d,dword ptr [r13+44h] and dword ptr [r13+44h],0FFFFFEFFh mov dword ptr [rsp+10h],r8d mov r8d,dword ptr [r13+48h] mov qword ptr [rsp+18h],r8 mov r8d,dword ptr [r13+3Ch] mov qword ptr [rsp],r8
Who changed the world? What in the world changed? When did the change occur? Why did the world change?
Page 0 … Page 13553 Page 13554 … … Page 126 Page 127 … Page 64589 Page 64590 Page 64591 Page 0 … Page 217 … Page 31289 … … Page 78924 … Page 97586 … 0→64589 13553→127 13554→64591 App Memory OS Memory TLB CR3
Virtual Machine
126→31289 127→0 64589→97586 64590→217 64591→78924 Host Memory EPT
Hypervisor
Implementation Overview
assigned permissions in EPT
hypervisor
privs
Protects Against Attack Techniques
VM Kernel Memory Layout
… Kernel Code (R/X) Driver Code (R/X) … Driver Data (R/W) Kernel Code (R/X) Kernel Data (R/W) … 126→31289 (R/X) 127→0 (R/X) 64589→97586 (R/W) 64590→217 (R/X) 64591→78924 (R/W)
EPT#1
126→31289 (+W) 127→0 (+W) 64589→97586 (+X) 64590→217 (+W) 64591→78924 (+X)
EPT#2 (Shadow) Exception Handler
Guest Guest Guest Guest Guest
Critical Memory Access Critical Memory Access Critical Memory Access Critical Memory Access Critical Memory Access
Networking Storage Compute
Xen Project Hypervisor Control Domain (dom0) Security Appliance (domU) Memory Introspection Engine
Direct Inspect APIs
Guest VM SSL access Attack silently blocked Virtual Switch Rules Ingress: HTTPS public Egress: Dynamic port to origin MySQL internal Private CIDR internal Port 22 access
Guest VM SSL access Attack blocked with traffic log Virtual Switch Rules Ingress: HTTPS public Egress: Dynamic port to origin MySQL internal Private CIDR internal Port 22 access
Log SSH Port 22 access Create port mirror for attacker Traffic Monitor Virtual Switch Rules Ingress: HTTPS public Egress: Dynamic port to origin MySQL internal Private CIDR internal Mirror: Port 22 to Traffic Monitor All attacker traffic to monitor
Guest VM
Guest VM SSL access Attack quarantined with full log Virtual Switch Rules Ingress: HTTPS public Egress: Dynamic port to origin MySQL internal Private CIDR internal Port 22 access
Log SSH Port 22 access Create port mirror for attacker Quarantine VM for attacker use Trigger replacement VM for farm Traffic Monitor Virtual Switch Rules Ingress: HTTPS attacker Egress: Dynamic port to origin Mirror: Port 22 to Traffic Monitor All attacker traffic to monitor
Application containers
System containers
MySQL Tomcat nginx Kernel MySQL Tomcat nginx Kernel
Atomic Host Atomic App Atomic App Atomic Nulecule Atomic Nulecule RedHat Registry MySQL Redis Jenkins Docker Hub Docker Container Docker Container Docker Container Docker Container Docker Container Third Party and Custom Problem: Who to trust, and why?
versions (e.g. no yum update)
(monolithic vs micro-services)
Container default is root access
Docker Datacenter
Kubernetes
Docker default network is Linux Bridge Access policy defined in iptables
External communication on by default
Inter container communication on by default
`docker network` command simplifies aspects of network design
Host eth0/10.204.136.1 Container veth0 Container veth1 Container veth2 Container veth3 Container veth4 Container veth5 docker0 NAT/ 172.16.1.0/24 iptables Host docker0 eth0/10.204.136.2 Container veth0 Container veth1 Container veth2 Container veth3 Container veth4 Container veth5 NAT/ 172.16.1.0/24 iptables
Host
Kubernetes Network eth0/10.204.136.20 Pod Container Pause Container Container
veth0/10.204.136.21
Pod Container Pause Container Container
veth0/10.204.136.22
Host Kubernetes Network eth0/10.204.136.10 Pod Container Pause Container Container
veth0/10.204.136.11
Pod Container Pause Container Container
veth0/10.204.136.12
Control Domain Networking Compute Storage Hypervisor Container VM
Minimal OS
Container Container Container
Container VM
Minimal OS
Container Container Container
Security Service
Container
Open source license compliance
Use of vulnerable open source components
Operational risk
7 of the top 10
Software Companies (44 of the top 100)
6 of the top 8
Mobile Handset Vendors
6 of the top 10
Investment Banks
Countries
Employees
Customers
Founded
2002
WEBSITES
BILLION LINES OF CODE
LICENSE TYPES
MILLION PROJECTS
VULNERABILITIES
information in the world.
partnership with Risk Based Security.
and solving open source issues.
Hub Scan
1
File and Directory Signatures
2
Open Source Component Identified
3
Hub Web Application Black Duck KnowledgeBase
On Premises Black Duck Data Center
Knowledge is power
Invest in defense in depth models
Together we can build a more secure data center