SlideShare a Scribd company logo
ยฉ 2015 IBM Corporation
IBM Security Systems โ€“ Cyber Center of Excellence
1
How to make my containers secure?
โ€œSecuring the Infrastructure and the Workloads of Linux Containersโ€,
Workshop on Security and Privacy in the Cloud, Sept. 2015.
Mattetti, M., Shulman-Peleg, A., Allouche, Y., Corradi, A., Dolev, S., Foschini, L.
ยฉ 2015 IBM Corporation
IBM Security Systems โ€“ Cyber Center of Excellence
2
Agenda
1. Introduction to Linux containers
2. Docker technology
3. Container threats
4. LiCShield framework:
โ€ข How it works
โ€ข Performance evaluation
โ€ข Prevention of attacks
5. Conclusion and Future Work
ยฉ 2015 IBM Corporation
IBM Security Systems โ€“ Cyber Center of Excellence
3
Containers - emerging building blocks of clouds
Lightweight OS-level virtualization via grouping resources like
processes, files, and devices into isolated spaces.
Benefits:
โ€ข Portability and easy deployment
โ€ข Application isolation
โ€ข Near native performance
Server
Host OS
Bins
/Libs
Bins/LibsBins
/Libs
App
A
App
B
App
C
App
D
Server
Hypervisor
Host OS
Bins/
Libs
App A App B App C
Guest
OS
Bins/
Libs
Guest
OS
Guest
OS
Bins/
Libs
Containers VMs
ยฉ 2015 IBM Corporation
IBM Security Systems โ€“ Cyber Center of Excellence
4
Container boundaries
- Capabilities
+ Namespaces
+ Cgroups
+ LSMs
+ new Root FS
ยฉ 2015 IBM Corporation
IBM Security Systems โ€“ Cyber Center of Excellence
5
Docker technology
๏‚ง Open-source platform that automates the deployment of
applications within Linux containers
๏‚ง Applications and their dependencies are shipped as one package
that can run on any Linux distribution
https://www.docker.com/
ยฉ 2015 IBM Corporation
IBM Security Systems โ€“ Cyber Center of Excellence
6
Docker Images
A set of read-only layers of a Union File System
๏‚ง Reduces the disk
footprint
๏‚ง Speeds up container
boot time
๏‚ง Copy-on-write (data
volumes for
applications data)
๏‚ง Automated building via
Dockerfile
ยฉ 2015 IBM Corporation
IBM Security Systems โ€“ Cyber Center of Excellence
7
Automating code distribution and deployment with Containers
โ€ข Container cloud (IaaS)
โ€ข Deployment packages (PaaS)
โ€ข 70% of organizations
are evaluating Docker
โ€ข 49% are concerned with
Docker security
Survey of Vmblog.com (745 participants)
http://stackengine.com/infographic-state-containers-2015-docker-adoption/
ยฉ 2015 IBM Corporation
IBM Security Systems โ€“ Cyber Center of Excellence
8
Private/Public cloud
Container threats
Threats
โ€ข Kernel exploits
โ€ข Container engine
โ€ข Shared resources
โ€ข Shared Bins/Libs
โ€ข Mis-configurations
Attack flow:
โ€ข โ€œEscape to hostโ€
โ€ข Propagating to
additional servers
ยฉ 2015 IBM Corporation
IBM Security Systems โ€“ Cyber Center of Excellence
9
Open source Linux tools to the rescue!
Linux Security Modules (LSMs, e.g. AppArmor, SElinux) are lightweight, loadable
kernel modules enforcing access control
Advantages of LSM:
โ€ข Part of Linux distributions
โ€ข Provide mandatory access control (MAC)
Disadvantages of LSMs:
โ€ข Complicated configuration and tuning
Profile to restrict the
Docker daemon
(none exists)
Profiles to restrict
the containers
(limited docker-
default profile)
ยฉ 2015 IBM Corporation
IBM Security Systems โ€“ Cyber Center of Excellence
10
Existing Docker-default profile
Allows any operation on files except
under /proc and /sys file systems
Generic profile to suit the needs of
any container workload
If we know the workload we can do something better!
ยฉ 2015 IBM Corporation
IBM Security Systems โ€“ Cyber Center of Excellence
11
Linux Container Shield
๏‚ง Python framework to protect the infrastructure against attacks
on Docker daemon and containers workloads
๏‚ง A Cloud Provider prospective:
โ€ข hosting service allowing co-locating the Linux containers of
different untrusted customers
โ€ข containers deployment via pre-configured images or via
building them on servers
๏‚ง Operates in a synthetic testing environment
๏‚ง Two steps process:
1. Tracing phase
2. Profiles generation
ยฉ 2015 IBM Corporation
IBM Security Systems โ€“ Cyber Center of Excellence
12
Tracing phase
https://github.com/LinuxContainerSecurity/LiCShield.git
๏‚ง Dockerfile as input
๏‚ง Invokes Docker API
(build/run commands)
๏‚ง Uses a SystemTap script to
monitor the kernel
operations
๏‚ง Stores the collected data in
text file
ยฉ 2015 IBM Corporation
IBM Security Systems โ€“ Cyber Center of Excellence
13
Tracing Files
Structure of a line (million lines file):
๏‚ง probe point name โ€” name of the kernel function probed
๏‚ง control group path โ€” path of the control group to which the
trigger process belongs to
๏‚ง executable path โ€” path of the executable file of the trigger
process
๏‚ง resource path โ€” paths of the resources given as input to the
probed kernel function
๏‚ง mount namespace root โ€” path of the root directory of the
trigger process in the main mount namespace
ยฉ 2015 IBM Corporation
IBM Security Systems โ€“ Cyber Center of Excellence
14
๏‚ง Generates AppArmor rules to confine the executions of Docker
daemon and its containers
๏‚ง Optimizes the learning phase of Host-based Intrusion Detection
Systems, by providing the description of the expected activities
Rules Engine
ยฉ 2015 IBM Corporation
IBM Security Systems โ€“ Cyber Center of Excellence
15
Profiles Technical Insights
๏‚ง Two types:
โ€ข Host profile โ€“ to confine the Docker daemon (hundreds of
rules)
โ€ข Container profile โ€“ to have fine-grained control over the
containers workloads (thousands of rules)
๏‚ง Tuning measures:
โ€ข Host profile โ€“ Read, Write, Lock and Link permissions granted
on /var/lib/docker subtree
โ€ข Container profile โ€“ Read-only and Read-Write permissions
granted under โ€œharmlessโ€ subtrees
ยฉ 2015 IBM Corporation
IBM Security Systems โ€“ Cyber Center of Excellence
16
๏‚ง Strict control on:
โ€ข which library can be loaded
โ€ข which executable file can be run
๏‚ง pivot_root system call as switch point between the Host and the
Container profile
๏‚ง Glob patterns to make profiles suitable for any container
instance spawned from the examined images
โ€“ e.g.* replaces container instance uuid
Profiles Technical Insights (2)
ยฉ 2015 IBM Corporation
IBM Security Systems โ€“ Cyber Center of Excellence
17
Profile distribution and enforcement
โ€ข Construct the security policy once for each image - apply to all
the instances
Server
Host OS
Docker Daemon
My image
Deploy
ยฉ 2015 IBM Corporation
IBM Security Systems โ€“ Cyber Center of Excellence
18
Dataset
Image Workload
Hadoop hadoop-mapreduce-examples-2.6.0.jar in non-distributed mode
Java SPECjvm2008
Node.js 30000 HTTP Get requests sent at a fixed rate of 100 per second
PHP Same of Node.js
Nginix Same of Node.js
MongoDB Mongo-perf
MySQL MySQL benchmark suite
PostgresSQL 4 clients generating 2000 transactions using the pgbench utility
Python Unladen Swallows benchmark suite
Redis 10000 requests sent by 50 parallel clients using the redis-
benchmark utility
ยฉ 2015 IBM Corporation
IBM Security Systems โ€“ Cyber Center of Excellence
19
LiCShield Overhead
๏‚ง Profile generation
โ€ข part of the simulation and testing environment
โ€ข no overhead in the production environment
๏‚ง Profile loading
โ€ข takes a few seconds
โ€ข apparmor_parser utility compiles profiles in a binary
format and stores them in a cache directory reducing time
for subsequent loading requests
MySQL PHP PostgresSQL Node.js Redis Nginx Python Java MongoDB Hadoop
Time in
seconds
584 785 965 437 695 824 842 857 1126 1478
ยฉ 2015 IBM Corporation
IBM Security Systems โ€“ Cyber Center of Excellence
20
LiCShield Overhead (2)
๏‚ง Profile enforcement
Average times over 5 executions of the run operations
Average times over 5 executions of
the build operations
< 3%
No significant change in average
response time and error rate for web
containers (Node.js, PHP, Nginix)
ยฉ 2015 IBM Corporation
IBM Security Systems โ€“ Cyber Center of Excellence
21
LiCShield effectiveness against attacks
๏‚ง Kernel exploits: can not prevent (co-deploy
with HIDS)
๏‚ง Shared resources: container profile stops any
operation not provided (e.g. Shocker attack)
๏‚ง Container engine: exploits simulated by
inserting backdoors (e.g. mistakenly mount
data volumes) in the code of the Docker
daemon; host profile stops any deviation
from the expected set of operations
๏‚ง Container application: prevents attacks
propagation (attacks can not gain more
privileges than those granted to the
applications)
๏‚ง Shared bin/libs: blocks any attempt to
overwrite shared libraries during the
containers executions (write permission on
bin/libs granted only during the build)
ยฉ 2015 IBM Corporation
IBM Security Systems โ€“ Cyber Center of Excellence
22
shared
Shocker attack
Container Processes
Host File System
--cap-add DAC_READ_SEARCH
escape using
open_by_handle_at
The attack:
โ€ข is successful using the Docker default profile
โ€ข fails against the LiCShield profiles since no rule allows the access to
the resolved path (e.g. /shared/etc/shadow)
Shocker code injected by
overwriting the application
startup script
ยฉ 2015 IBM Corporation
IBM Security Systems โ€“ Cyber Center of Excellence
23
Conclusion and Future Work
๏‚ง We presented a framework to secure the engine and the
workloads of Linux containers
๏‚ง Test results show the low overhead introduced by
LiCShield while it proved to be effective in protecting the
system against different types of attack
๏‚ง LiCShield is not a competitor but a supplementary tool to
optimize and complement HIDS
๏‚ง Ongoing work
โ€ข Prove the benefits of the combined architecture of
LiCShiend and HIDS on a production environment
โ€ข Extend container service with a profile management
module
ยฉ 2015 IBM Corporation
IBM Security Systems โ€“ Cyber Center of Excellence
24
Contact info:
Massimiliano Mattetti
massimiliano.mattetti@unibo.it
https://it.linkedin.com/in/massimilianomattetti
IBM Cyber Security Center of Excellence
https://www.research.ibm.com/haifa/ccoe/index.shtml
Thanks for your attention ๏Š
Questions timeโ€ฆ

More Related Content

What's hot (20)

PPTX
Virtualization Vs. Containers
actualtechmedia
ย 
PPT
Securing the Cloud
John Kinsella
ย 
PPTX
Why containers
Luca Ravazzolo
ย 
PDF
Application Virtualization Smackdown
C/D/H Technology Consultants
ย 
PDF
5 Ways to Secure Your Containers for Docker and Beyond
Black Duck by Synopsys
ย 
PPTX
vSphere integrated containers
Atul Srivastava
ย 
PDF
UKC - Feb 2013 - Analyzing the security of Windows 7 and Linux for cloud comp...
Vincent Giersch
ย 
PPTX
Scalable, Available and Reliable Cloud Applications with PaaS and Microservices
David Currie
ย 
PDF
Scale 12x Securing Your Cloud with The Xen Hypervisor
The Linux Foundation
ย 
PDF
Using Novell Sentinel Log Manager to Monitor Novell Applications
Novell
ย 
PDF
XPDS16: A Paravirtualized Interface for Socket Syscalls - Dimitri Stiliadis, ...
The Linux Foundation
ย 
PDF
XPDS16: Xen Project Weather Report 2016
The Linux Foundation
ย 
PPTX
OSSEU17: How Open Source Project Xen Puts Security Software Vendors Ahead of ...
The Linux Foundation
ย 
PDF
XPDS16: XSM-Flask, current limitations and Ongoing work. - Anshul Makkar, Ct...
The Linux Foundation
ย 
PPTX
Techdays SE 2016 - Micros.. err Microcosmos
Mike Martin
ย 
PDF
Immutable Infrastructure Security
Ricky Sanders
ย 
PDF
Anatomy of a Build Server Attack
DevOps.com
ย 
PPTX
Scale17x: Thinking outside of the conceived tech comfort zone
The Linux Foundation
ย 
PPTX
V brownbag sept-14-2016
Anthony Chow
ย 
PDF
MR201411 SELinux in Virtualization and Containers
FFRI, Inc.
ย 
Virtualization Vs. Containers
actualtechmedia
ย 
Securing the Cloud
John Kinsella
ย 
Why containers
Luca Ravazzolo
ย 
Application Virtualization Smackdown
C/D/H Technology Consultants
ย 
5 Ways to Secure Your Containers for Docker and Beyond
Black Duck by Synopsys
ย 
vSphere integrated containers
Atul Srivastava
ย 
UKC - Feb 2013 - Analyzing the security of Windows 7 and Linux for cloud comp...
Vincent Giersch
ย 
Scalable, Available and Reliable Cloud Applications with PaaS and Microservices
David Currie
ย 
Scale 12x Securing Your Cloud with The Xen Hypervisor
The Linux Foundation
ย 
Using Novell Sentinel Log Manager to Monitor Novell Applications
Novell
ย 
XPDS16: A Paravirtualized Interface for Socket Syscalls - Dimitri Stiliadis, ...
The Linux Foundation
ย 
XPDS16: Xen Project Weather Report 2016
The Linux Foundation
ย 
OSSEU17: How Open Source Project Xen Puts Security Software Vendors Ahead of ...
The Linux Foundation
ย 
XPDS16: XSM-Flask, current limitations and Ongoing work. - Anshul Makkar, Ct...
The Linux Foundation
ย 
Techdays SE 2016 - Micros.. err Microcosmos
Mike Martin
ย 
Immutable Infrastructure Security
Ricky Sanders
ย 
Anatomy of a Build Server Attack
DevOps.com
ย 
Scale17x: Thinking outside of the conceived tech comfort zone
The Linux Foundation
ย 
V brownbag sept-14-2016
Anthony Chow
ย 
MR201411 SELinux in Virtualization and Containers
FFRI, Inc.
ย 

Viewers also liked (17)

PDF
Aux emferordena
Trabajojunta El Foro
ย 
PPSX
ๆ–‡ไปถไผ ่พ“ๆŠ€ๆœฏๅ‘ๅฑ•ไธŽไบงๅ“่ถ‹ๅŠฟ
PMCamp
ย 
PPSX
Daniel Avidor - Deciphering the Viral Code โ€“ The Secrets of Redmatch
MIT Forum of Israel
ย 
PPTX
Sex cake and your business
Graham Brooks
ย 
PDF
ู…ุฑุงุฌุนุฉ ุงู„ุตู ุงู„ุซุงู†ู‰ ุงู„ุงุนุฏุงุฏู‰
Hanaa Ahmed
ย 
DOCX
NdP_Akamon gana el primer premio โ€œWhoโ€™s got gameโ€ como mejor startup de juego...
Akamon Entertainment
ย 
PPT
Bni loan qualification_101
Tom Drasler
ย 
PPTX
Social media ROI
Dr. Khushbu Pandya
ย 
PPTX
Introducciรณn a los Sistemas Operativos
Juan David Pareja Soto
ย 
PDF
The State of Software Quality
Coverity
ย 
PPT
ฮณฮนฮฟฯฯ„ฮฎ ฯ„ฮทฯ‚ ฯƒฮทฮผฮฑฮฏฮฑฯ‚
Maria Rokadaki
ย 
PPT
Chistesvarios8
josemorales
ย 
PPT
I want to visit Austrialia
mliadvisor
ย 
PPT
Usabilidad
Carlos Garcรญa
ย 
PDF
ุงู„ูุตู„ ุงู„ุซุงู„ุซ
Hanaa Ahmed
ย 
ODP
Ailanto 2013 independent living community investment
Hugo Ribadeneira
ย 
PDF
Goal Centre e-bulletin Feb 2015
Nurkhamimi Zainuddin
ย 
Aux emferordena
Trabajojunta El Foro
ย 
ๆ–‡ไปถไผ ่พ“ๆŠ€ๆœฏๅ‘ๅฑ•ไธŽไบงๅ“่ถ‹ๅŠฟ
PMCamp
ย 
Daniel Avidor - Deciphering the Viral Code โ€“ The Secrets of Redmatch
MIT Forum of Israel
ย 
Sex cake and your business
Graham Brooks
ย 
ู…ุฑุงุฌุนุฉ ุงู„ุตู ุงู„ุซุงู†ู‰ ุงู„ุงุนุฏุงุฏู‰
Hanaa Ahmed
ย 
NdP_Akamon gana el primer premio โ€œWhoโ€™s got gameโ€ como mejor startup de juego...
Akamon Entertainment
ย 
Bni loan qualification_101
Tom Drasler
ย 
Social media ROI
Dr. Khushbu Pandya
ย 
Introducciรณn a los Sistemas Operativos
Juan David Pareja Soto
ย 
The State of Software Quality
Coverity
ย 
ฮณฮนฮฟฯฯ„ฮฎ ฯ„ฮทฯ‚ ฯƒฮทฮผฮฑฮฏฮฑฯ‚
Maria Rokadaki
ย 
Chistesvarios8
josemorales
ย 
I want to visit Austrialia
mliadvisor
ย 
Usabilidad
Carlos Garcรญa
ย 
ุงู„ูุตู„ ุงู„ุซุงู„ุซ
Hanaa Ahmed
ย 
Ailanto 2013 independent living community investment
Hugo Ribadeneira
ย 
Goal Centre e-bulletin Feb 2015
Nurkhamimi Zainuddin
ย 
Ad

Similar to Securing the Infrastructure and the Workloads of Linux Containers (20)

PDF
How Secure Is Your Container? ContainerCon Berlin 2016
Phil Estes
ย 
PDF
Finding Your Way in Container Security
Ksenia Peguero
ย 
PDF
Container Security: How We Got Here and Where We're Going
Phil Estes
ย 
PDF
Docker London: Container Security
Phil Estes
ย 
PDF
Docker Security - Secure Container Deployment on Linux
Michael Boelen
ย 
PDF
Docker Security: Are Your Containers Tightly Secured to the Ship?
Michael Boelen
ย 
PDF
Finding Your Way in Container Security
Ksenia Peguero
ย 
PDF
Is Docker Secure?
Manideep Konakandla
ย 
PPTX
Containers and Security for DevOps
Salesforce Engineering
ย 
PDF
Breaking and fixing_your_dockerized_environments_owasp_appsec_usa2016
Manideep Konakandla
ย 
PDF
Docker Security and Content Trust
ehazlett
ย 
PPTX
Containers and workload security an overview
Krishna-Kumar
ย 
PDF
Container Security
Salman Baset
ย 
PDF
Everything you need to know about containers security
Jose Manuel Ortega Candel
ย 
PDF
Skip the anxiety attack when building secure containerized apps
Haidee McMahon
ย 
PPTX
Secure Application Development in the Age of Continuous Delivery
Tim Mackey
ย 
PDF
Secure Application Development in the Age of Continuous Delivery
Black Duck by Synopsys
ย 
PDF
BSides SF talk on Docker Images Security - Feb 13, 2017
Manideep Konakandla
ย 
PDF
DevOpsDaysRiga 2017: Chris Van Tuin - A DevOps State of Mind: Continuous Secu...
DevOpsDays Riga
ย 
PDF
Docker, Linux Containers (LXC), and security
Jรฉrรดme Petazzoni
ย 
How Secure Is Your Container? ContainerCon Berlin 2016
Phil Estes
ย 
Finding Your Way in Container Security
Ksenia Peguero
ย 
Container Security: How We Got Here and Where We're Going
Phil Estes
ย 
Docker London: Container Security
Phil Estes
ย 
Docker Security - Secure Container Deployment on Linux
Michael Boelen
ย 
Docker Security: Are Your Containers Tightly Secured to the Ship?
Michael Boelen
ย 
Finding Your Way in Container Security
Ksenia Peguero
ย 
Is Docker Secure?
Manideep Konakandla
ย 
Containers and Security for DevOps
Salesforce Engineering
ย 
Breaking and fixing_your_dockerized_environments_owasp_appsec_usa2016
Manideep Konakandla
ย 
Docker Security and Content Trust
ehazlett
ย 
Containers and workload security an overview
Krishna-Kumar
ย 
Container Security
Salman Baset
ย 
Everything you need to know about containers security
Jose Manuel Ortega Candel
ย 
Skip the anxiety attack when building secure containerized apps
Haidee McMahon
ย 
Secure Application Development in the Age of Continuous Delivery
Tim Mackey
ย 
Secure Application Development in the Age of Continuous Delivery
Black Duck by Synopsys
ย 
BSides SF talk on Docker Images Security - Feb 13, 2017
Manideep Konakandla
ย 
DevOpsDaysRiga 2017: Chris Van Tuin - A DevOps State of Mind: Continuous Secu...
DevOpsDays Riga
ย 
Docker, Linux Containers (LXC), and security
Jรฉrรดme Petazzoni
ย 
Ad

Recently uploaded (20)

PDF
Notification System for Construction Logistics Application
Safe Software
ย 
PDF
How AI in Healthcare Apps Can Help You Enhance Patient Care?
Lilly Gracia
ย 
PDF
Code and No-Code Journeys: The Maintenance Shortcut
Applitools
ย 
PPTX
prodad heroglyph crack 2.0.214.2 Full Free Download
cracked shares
ย 
PPTX
PCC IT Forum 2025 - Legislative Technology Snapshot
Gareth Oakes
ย 
PDF
Instantiations Company Update (ESUG 2025)
ESUG
ย 
PDF
Message Level Status (MLS): The Instant Feedback Mechanism for UAE e-Invoicin...
Prachi Desai
ย 
PDF
How to Download and Install ADT (ABAP Development Tools) for Eclipse IDE | SA...
SAP Vista, an A L T Z E N Company
ย 
PDF
Introduction to Apache Icebergโ„ข & Tableflow
Alluxio, Inc.
ย 
PPTX
TexSender Pro 8.9.1 Crack Full Version Download
cracked shares
ย 
PDF
10 Salesforce Consulting Companies in Sydney.pdf
DianApps Technologies
ย 
PDF
Meet in the Middle: Solving the Low-Latency Challenge for Agentic AI
Alluxio, Inc.
ย 
PPTX
Get Started with Maestro: Agent, Robot, and Human in Action โ€“ Session 5 of 5
klpathrudu
ย 
PDF
Show Which Projects Support Your Strategy and Deliver Results with OnePlan df
OnePlan Solutions
ย 
PPTX
ChessBase 18.02 Crack + Serial Key Free Download
cracked shares
ย 
PPTX
Odoo Migration Services by CandidRoot Solutions
CandidRoot Solutions Private Limited
ย 
PPTX
Chess King 25.0.0.2500 With Crack Full Free Download
cracked shares
ย 
PPTX
Operations Profile SPDX_Update_20250711_Example_05_03.pptx
Shane Coughlan
ย 
PDF
SAP GUI Installation Guide for Windows | Step-by-Step Setup for SAP Access
SAP Vista, an A L T Z E N Company
ย 
PDF
Optimizing Tiered Storage for Low-Latency Real-Time Analytics at AI Scale
Alluxio, Inc.
ย 
Notification System for Construction Logistics Application
Safe Software
ย 
How AI in Healthcare Apps Can Help You Enhance Patient Care?
Lilly Gracia
ย 
Code and No-Code Journeys: The Maintenance Shortcut
Applitools
ย 
prodad heroglyph crack 2.0.214.2 Full Free Download
cracked shares
ย 
PCC IT Forum 2025 - Legislative Technology Snapshot
Gareth Oakes
ย 
Instantiations Company Update (ESUG 2025)
ESUG
ย 
Message Level Status (MLS): The Instant Feedback Mechanism for UAE e-Invoicin...
Prachi Desai
ย 
How to Download and Install ADT (ABAP Development Tools) for Eclipse IDE | SA...
SAP Vista, an A L T Z E N Company
ย 
Introduction to Apache Icebergโ„ข & Tableflow
Alluxio, Inc.
ย 
TexSender Pro 8.9.1 Crack Full Version Download
cracked shares
ย 
10 Salesforce Consulting Companies in Sydney.pdf
DianApps Technologies
ย 
Meet in the Middle: Solving the Low-Latency Challenge for Agentic AI
Alluxio, Inc.
ย 
Get Started with Maestro: Agent, Robot, and Human in Action โ€“ Session 5 of 5
klpathrudu
ย 
Show Which Projects Support Your Strategy and Deliver Results with OnePlan df
OnePlan Solutions
ย 
ChessBase 18.02 Crack + Serial Key Free Download
cracked shares
ย 
Odoo Migration Services by CandidRoot Solutions
CandidRoot Solutions Private Limited
ย 
Chess King 25.0.0.2500 With Crack Full Free Download
cracked shares
ย 
Operations Profile SPDX_Update_20250711_Example_05_03.pptx
Shane Coughlan
ย 
SAP GUI Installation Guide for Windows | Step-by-Step Setup for SAP Access
SAP Vista, an A L T Z E N Company
ย 
Optimizing Tiered Storage for Low-Latency Real-Time Analytics at AI Scale
Alluxio, Inc.
ย 

Securing the Infrastructure and the Workloads of Linux Containers

  • 1. ยฉ 2015 IBM Corporation IBM Security Systems โ€“ Cyber Center of Excellence 1 How to make my containers secure? โ€œSecuring the Infrastructure and the Workloads of Linux Containersโ€, Workshop on Security and Privacy in the Cloud, Sept. 2015. Mattetti, M., Shulman-Peleg, A., Allouche, Y., Corradi, A., Dolev, S., Foschini, L.
  • 2. ยฉ 2015 IBM Corporation IBM Security Systems โ€“ Cyber Center of Excellence 2 Agenda 1. Introduction to Linux containers 2. Docker technology 3. Container threats 4. LiCShield framework: โ€ข How it works โ€ข Performance evaluation โ€ข Prevention of attacks 5. Conclusion and Future Work
  • 3. ยฉ 2015 IBM Corporation IBM Security Systems โ€“ Cyber Center of Excellence 3 Containers - emerging building blocks of clouds Lightweight OS-level virtualization via grouping resources like processes, files, and devices into isolated spaces. Benefits: โ€ข Portability and easy deployment โ€ข Application isolation โ€ข Near native performance Server Host OS Bins /Libs Bins/LibsBins /Libs App A App B App C App D Server Hypervisor Host OS Bins/ Libs App A App B App C Guest OS Bins/ Libs Guest OS Guest OS Bins/ Libs Containers VMs
  • 4. ยฉ 2015 IBM Corporation IBM Security Systems โ€“ Cyber Center of Excellence 4 Container boundaries - Capabilities + Namespaces + Cgroups + LSMs + new Root FS
  • 5. ยฉ 2015 IBM Corporation IBM Security Systems โ€“ Cyber Center of Excellence 5 Docker technology ๏‚ง Open-source platform that automates the deployment of applications within Linux containers ๏‚ง Applications and their dependencies are shipped as one package that can run on any Linux distribution https://www.docker.com/
  • 6. ยฉ 2015 IBM Corporation IBM Security Systems โ€“ Cyber Center of Excellence 6 Docker Images A set of read-only layers of a Union File System ๏‚ง Reduces the disk footprint ๏‚ง Speeds up container boot time ๏‚ง Copy-on-write (data volumes for applications data) ๏‚ง Automated building via Dockerfile
  • 7. ยฉ 2015 IBM Corporation IBM Security Systems โ€“ Cyber Center of Excellence 7 Automating code distribution and deployment with Containers โ€ข Container cloud (IaaS) โ€ข Deployment packages (PaaS) โ€ข 70% of organizations are evaluating Docker โ€ข 49% are concerned with Docker security Survey of Vmblog.com (745 participants) http://stackengine.com/infographic-state-containers-2015-docker-adoption/
  • 8. ยฉ 2015 IBM Corporation IBM Security Systems โ€“ Cyber Center of Excellence 8 Private/Public cloud Container threats Threats โ€ข Kernel exploits โ€ข Container engine โ€ข Shared resources โ€ข Shared Bins/Libs โ€ข Mis-configurations Attack flow: โ€ข โ€œEscape to hostโ€ โ€ข Propagating to additional servers
  • 9. ยฉ 2015 IBM Corporation IBM Security Systems โ€“ Cyber Center of Excellence 9 Open source Linux tools to the rescue! Linux Security Modules (LSMs, e.g. AppArmor, SElinux) are lightweight, loadable kernel modules enforcing access control Advantages of LSM: โ€ข Part of Linux distributions โ€ข Provide mandatory access control (MAC) Disadvantages of LSMs: โ€ข Complicated configuration and tuning Profile to restrict the Docker daemon (none exists) Profiles to restrict the containers (limited docker- default profile)
  • 10. ยฉ 2015 IBM Corporation IBM Security Systems โ€“ Cyber Center of Excellence 10 Existing Docker-default profile Allows any operation on files except under /proc and /sys file systems Generic profile to suit the needs of any container workload If we know the workload we can do something better!
  • 11. ยฉ 2015 IBM Corporation IBM Security Systems โ€“ Cyber Center of Excellence 11 Linux Container Shield ๏‚ง Python framework to protect the infrastructure against attacks on Docker daemon and containers workloads ๏‚ง A Cloud Provider prospective: โ€ข hosting service allowing co-locating the Linux containers of different untrusted customers โ€ข containers deployment via pre-configured images or via building them on servers ๏‚ง Operates in a synthetic testing environment ๏‚ง Two steps process: 1. Tracing phase 2. Profiles generation
  • 12. ยฉ 2015 IBM Corporation IBM Security Systems โ€“ Cyber Center of Excellence 12 Tracing phase https://github.com/LinuxContainerSecurity/LiCShield.git ๏‚ง Dockerfile as input ๏‚ง Invokes Docker API (build/run commands) ๏‚ง Uses a SystemTap script to monitor the kernel operations ๏‚ง Stores the collected data in text file
  • 13. ยฉ 2015 IBM Corporation IBM Security Systems โ€“ Cyber Center of Excellence 13 Tracing Files Structure of a line (million lines file): ๏‚ง probe point name โ€” name of the kernel function probed ๏‚ง control group path โ€” path of the control group to which the trigger process belongs to ๏‚ง executable path โ€” path of the executable file of the trigger process ๏‚ง resource path โ€” paths of the resources given as input to the probed kernel function ๏‚ง mount namespace root โ€” path of the root directory of the trigger process in the main mount namespace
  • 14. ยฉ 2015 IBM Corporation IBM Security Systems โ€“ Cyber Center of Excellence 14 ๏‚ง Generates AppArmor rules to confine the executions of Docker daemon and its containers ๏‚ง Optimizes the learning phase of Host-based Intrusion Detection Systems, by providing the description of the expected activities Rules Engine
  • 15. ยฉ 2015 IBM Corporation IBM Security Systems โ€“ Cyber Center of Excellence 15 Profiles Technical Insights ๏‚ง Two types: โ€ข Host profile โ€“ to confine the Docker daemon (hundreds of rules) โ€ข Container profile โ€“ to have fine-grained control over the containers workloads (thousands of rules) ๏‚ง Tuning measures: โ€ข Host profile โ€“ Read, Write, Lock and Link permissions granted on /var/lib/docker subtree โ€ข Container profile โ€“ Read-only and Read-Write permissions granted under โ€œharmlessโ€ subtrees
  • 16. ยฉ 2015 IBM Corporation IBM Security Systems โ€“ Cyber Center of Excellence 16 ๏‚ง Strict control on: โ€ข which library can be loaded โ€ข which executable file can be run ๏‚ง pivot_root system call as switch point between the Host and the Container profile ๏‚ง Glob patterns to make profiles suitable for any container instance spawned from the examined images โ€“ e.g.* replaces container instance uuid Profiles Technical Insights (2)
  • 17. ยฉ 2015 IBM Corporation IBM Security Systems โ€“ Cyber Center of Excellence 17 Profile distribution and enforcement โ€ข Construct the security policy once for each image - apply to all the instances Server Host OS Docker Daemon My image Deploy
  • 18. ยฉ 2015 IBM Corporation IBM Security Systems โ€“ Cyber Center of Excellence 18 Dataset Image Workload Hadoop hadoop-mapreduce-examples-2.6.0.jar in non-distributed mode Java SPECjvm2008 Node.js 30000 HTTP Get requests sent at a fixed rate of 100 per second PHP Same of Node.js Nginix Same of Node.js MongoDB Mongo-perf MySQL MySQL benchmark suite PostgresSQL 4 clients generating 2000 transactions using the pgbench utility Python Unladen Swallows benchmark suite Redis 10000 requests sent by 50 parallel clients using the redis- benchmark utility
  • 19. ยฉ 2015 IBM Corporation IBM Security Systems โ€“ Cyber Center of Excellence 19 LiCShield Overhead ๏‚ง Profile generation โ€ข part of the simulation and testing environment โ€ข no overhead in the production environment ๏‚ง Profile loading โ€ข takes a few seconds โ€ข apparmor_parser utility compiles profiles in a binary format and stores them in a cache directory reducing time for subsequent loading requests MySQL PHP PostgresSQL Node.js Redis Nginx Python Java MongoDB Hadoop Time in seconds 584 785 965 437 695 824 842 857 1126 1478
  • 20. ยฉ 2015 IBM Corporation IBM Security Systems โ€“ Cyber Center of Excellence 20 LiCShield Overhead (2) ๏‚ง Profile enforcement Average times over 5 executions of the run operations Average times over 5 executions of the build operations < 3% No significant change in average response time and error rate for web containers (Node.js, PHP, Nginix)
  • 21. ยฉ 2015 IBM Corporation IBM Security Systems โ€“ Cyber Center of Excellence 21 LiCShield effectiveness against attacks ๏‚ง Kernel exploits: can not prevent (co-deploy with HIDS) ๏‚ง Shared resources: container profile stops any operation not provided (e.g. Shocker attack) ๏‚ง Container engine: exploits simulated by inserting backdoors (e.g. mistakenly mount data volumes) in the code of the Docker daemon; host profile stops any deviation from the expected set of operations ๏‚ง Container application: prevents attacks propagation (attacks can not gain more privileges than those granted to the applications) ๏‚ง Shared bin/libs: blocks any attempt to overwrite shared libraries during the containers executions (write permission on bin/libs granted only during the build)
  • 22. ยฉ 2015 IBM Corporation IBM Security Systems โ€“ Cyber Center of Excellence 22 shared Shocker attack Container Processes Host File System --cap-add DAC_READ_SEARCH escape using open_by_handle_at The attack: โ€ข is successful using the Docker default profile โ€ข fails against the LiCShield profiles since no rule allows the access to the resolved path (e.g. /shared/etc/shadow) Shocker code injected by overwriting the application startup script
  • 23. ยฉ 2015 IBM Corporation IBM Security Systems โ€“ Cyber Center of Excellence 23 Conclusion and Future Work ๏‚ง We presented a framework to secure the engine and the workloads of Linux containers ๏‚ง Test results show the low overhead introduced by LiCShield while it proved to be effective in protecting the system against different types of attack ๏‚ง LiCShield is not a competitor but a supplementary tool to optimize and complement HIDS ๏‚ง Ongoing work โ€ข Prove the benefits of the combined architecture of LiCShiend and HIDS on a production environment โ€ข Extend container service with a profile management module
  • 24. ยฉ 2015 IBM Corporation IBM Security Systems โ€“ Cyber Center of Excellence 24 Contact info: Massimiliano Mattetti [email protected] https://it.linkedin.com/in/massimilianomattetti IBM Cyber Security Center of Excellence https://www.research.ibm.com/haifa/ccoe/index.shtml Thanks for your attention ๏Š Questions timeโ€ฆ

Editor's Notes

  • #4: In a nutshell isolation less strong than vms
  • #5: Rely on | Cgroups to limit and account resource usage of the processes running inside the containers | Namespaces to provide a different view of the system resources for the process inside the container. Currently we have 6 | IPC | Network | Mount | PID | User | UTS. Not everything can be namespace. Privileged can attack and own the system. Power of super user has been divided into distinct units, known as capabilities, which can be independently enabled and disabled.
  • #6: Linux daemon in charge of managing the lifecycle of containers. Exposes RESTful APIs on a UNIX or HTTP Socket Public repository for container images
  • #13: We chose SystemTap since you can extend its script language using C code. We used this feature to query the kernel to get information about the privileged operation daemon and container processes
  • #16: we can safely grant /tmp directory that contains temporary files /usr/share is the place for manuals, documentations, examples
  • #19: Top 20 of Docker hub
  • #20: It operates in the testing environment so we donโ€™t have overhead on production
  • #22: HIDS should be able to notify abnormal activities like if AppArmor has been disabled Poved to be very effectuve wiht attacks on Since our AppArmor profiles strictly check the mount flags, the execution of the container is blocked during its early stages Can not be written
  • #23: Injected Shocker code by overwriting the application startup script Any attempt to access the host file system triggers a security check with /shared as first level directory