Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Jorge Salamero Sanz
Lions, Tigers and Deers:
What building zoos
can teach us about
securing microservices?
% whoami
Jorge Salamero Sanz
<jorge.salamero@sysdig.com> @bencerillo
@sysdig
• Working on OSS last 12 years
• Working on OSS+Cloud last 5 years
• Working on monitoring last 3 years
• Technical Marketing geek @sysdig
Sysdig
Open Source system troubleshooting
with native container support
(htop, vmstat, netstat, lsof, tcpdump…)
Monitoring, alerting,
troubleshooting tool for
Docker, Kubernetes, Mesos,
RancherOS, GCE, ECS
Traditional deployment
Full host OS
kernel
systemd
syslogd
App services
MySQL
Nginx
OpenSSL
Java
App A
App B
App C
Ops Devs
Containerized deployment
Full host OS
kernel
+
Docker
MySQL App A
Ops DevOps
Nginx + OpenSSL App B
Java 8.0 build XXX App C
How to secure this?
Containerization is not something new to us...
• Establish trust boundaries
• Identify, minimise, and harden attack surfaces
• Reduce scope and access
• Layer protections and defenses
From Aaron Grattafiori presented “The Golden Ticket: Docker and High Security Microservices
Securing Microservices
Defense in depth Microservices
Single responsibility principle:
• Principle of least privileges
• Principle of least surprise
• Principle of least access
Container Security Techniques
• New workflows (docker pull vs previous apt update/yum update)
• CI/CD Pipeline (Jenkins, Openshift, etc: rebuilds, rolling updates)
• Access management, logging & auditing (Kubernetes, Openshift:
user roles, namespaces, centralized logging, authn & authz, etc)
• Trust boundaries (do you trust entire Docker Hub? Image signing, Docker Notary)
• Simplify container OS, tons of useless stuff (RancherOS, Atomic,
CoreOS, Alpine Linux, etc)
• Network security (Weave, etc)
• Secret management (Vaults instead of environment vars, etc)
Docker Security Techniques
• Drop privileges
• Limit capabilities
• Do not run as root! containers are not VMs!
• cgroups
• Limit resources share, not access restriction
• namespaces
• Useful for not complete security model
• User namespaces
• Kubernetes/Openshift security contexts
• Host security and access (Docker bench, RO access, etc)
Scanning
What are my containers doing?
• Static scanning
• Dynamic scanning
Static Scanning
Yay, this was soo easy to deploy! I Docker Hub!
(your developers too, actually they were already using it :P)
uhm… wait, is someone maintaining this image?
RUN apt-get install -y wget build-essential python python-dev python-pip
python-virtualenv
RUN wget http://nodejs.org/dist/node-latest.tar.gz
RUN tar xvzf node-latest.tar.gz
RUN cd node-v* && ./configure && CXX="g++ -Wno-unused-local-typedefs" make && CXX="g++
-Wno-unused-local-typedefs" make install
• Static Scanning:
• CoreOS Clair, Docker Nautilus, Red Hat CloudForms,
etc
Image Vulnerability Scanning
• Scan contents of images looking for software versions with
known defects
• Container image layering can make this efficient (exploits
immutable nature of images)
Ubuntu: 14.04
Apache: 2.2
Wordpress: 4.6 PHP: 7.0
Image Vulnerability Scanning
• Scan contents of images looking for software versions with
known defects
• Container image layering can make this efficient (exploits
immutable nature of images)
•
Ubuntu: 14.04
Apache: 2.2
Wordpress: 4.6 PHP: 7.0
Image Vulnerability Scanning
• Scan contents of images looking for software versions with
known defects
• Container image layering can make this efficient (exploits
immutable nature of images)
•
Ubuntu: 14.04
Apache: 2.2
Wordpress: 4.6 PHP: 7.0
Image Vulnerability Scanning
• Scan contents of images looking for software versions with
known defects
• Container image layering can make this efficient (exploits
immutable nature of images)
•
Ubuntu: 14.04
Apache: 2.2
Wordpress: 4.6 PHP: 7.0
Container Security Techniques
OK, no known vulnerabilities, still secure?
Containers are black boxes exposing a behaviour, is
something misbehaving?
• Dynamic Scanning:
• Seccomp
• MAC (Mandatory Access Control)
• Behavioral Security Monitoring
Seccomp
• Seccomp: application system call “sandboxing”
• Create filter (BPF program ) with lists of allowed syscalls
• Each syscall matched against filter
• Failures-> log message, error return, and/or kill process
• Docker runs containerized process under a seccomp profile
• Notable disallowed syscalls:
• clone (creating new namespaces)
• reboot (reboot the host)
• setns (change namespaces)
Mandatory Access Control
• SELinux or AppArmor
• Same mechanisms: kernel-level interception/filtering
• features++ && complexity++
• Above syscalls:
• Actors (process)
• Actions (read/write on files/sockets)
• Targets (files, IPs, ports)
• But what if I only want to put some surveillance in?
Behavioral Security Monitoring
• Auditing vs enforcement
• detect intrusions instead of preventing intrusions
• Build rules that define suspicious/anomalous behavior
• Match rules against activity on a system
• Auditd (SELinux logger)
• Falco (with container capabilities)
Sysdig Falco
An anomaly detection system built on
top of the sysdig engine
Sysdig ContainerVision
Kernel
Docker
Container
1
Container
2
Container
3
App App
rkt LXC
Kernel module
Instrumentation
What is Sysdig Falco?
• Detects suspicious activity defined by a set of easy
rules
• Uses sysdig’s flexible and powerful filtering expressions
(in userspace)
• Container support (Docker, Kubernetes, Mesos, etc)
• Flexible notification methods
• Open Source
Quick Examples
A shell is run in a container container.id != host and proc.name = bash
Overwrite system binaries
fd.directory in (/bin, /sbin, /usr/bin,
/usr/sbin) and write
Container namespace change
evt.type = setns and not proc.name in
(docker, sysdig)
Non-device files written in /dev
(evt.type = creat or evt.arg.flags contains
O_CREAT) and proc.name != blkid and
fd.directory = /dev and fd.name != /dev/null
Process tries to access camera
evt.type = open and fd.name = /dev/video0
and not proc.name in (skype, webex)
Falco Rules
• .yaml file containing Macros, Lists, and Rules
- macro: bin_dir
condition: fd.directory in (/bin, /sbin, /usr/bin, /usr/sbin)
- list: package_mgmt_binaries
items: [dpkg, dpkg-preconfigu, rpm, rpmkey, yum, frontend]
- rule: write_binary_dir
desc: an attempt to write to any file below a set of binary directories
condition: bin_dir and evt.dir = < and open_write and not package_mgmt_procs
output: "File below a known binary directory opened for writing
(user=%user.name command=%proc.cmdline file=%fd.name)"
priority: WARNING
Alerts and Outputs
• Events that match filter expression (rule) result in alerts
• output field used to format event into alert message
• Sending to:
• syslog
• file
• stdout
• shell (e.g. mail -s "Falco Notification" alerts@example.com)
• Sysdig Cloud
Falco Demo
Remember
Container behaviour security monitoring
shouldn’t be difficult...
Learn More
Thank You!

More Related Content

What's hot

Kafka Mirror Tester: Go and Kubernetes Powered Test Suite for Kafka Replicati...
Kafka Mirror Tester: Go and Kubernetes Powered Test Suite for Kafka Replicati...Kafka Mirror Tester: Go and Kubernetes Powered Test Suite for Kafka Replicati...
Kafka Mirror Tester: Go and Kubernetes Powered Test Suite for Kafka Replicati...
Cloud Native Day Tel Aviv
 
DockerCon EU 2015: Docker and PCI-DSS - Lessons learned in a security sensiti...
DockerCon EU 2015: Docker and PCI-DSS - Lessons learned in a security sensiti...DockerCon EU 2015: Docker and PCI-DSS - Lessons learned in a security sensiti...
DockerCon EU 2015: Docker and PCI-DSS - Lessons learned in a security sensiti...
Docker, Inc.
 
A Distributed Malware Analysis System Cuckoo Sandbox
A Distributed Malware Analysis System Cuckoo SandboxA Distributed Malware Analysis System Cuckoo Sandbox
A Distributed Malware Analysis System Cuckoo Sandbox
Andy Lee
 
Troubleshooting Tips from a Docker Support Engineer
Troubleshooting Tips from a Docker Support EngineerTroubleshooting Tips from a Docker Support Engineer
Troubleshooting Tips from a Docker Support Engineer
Jeff Anderson
 
Cgroups, namespaces and beyond: what are containers made from?
Cgroups, namespaces and beyond: what are containers made from?Cgroups, namespaces and beyond: what are containers made from?
Cgroups, namespaces and beyond: what are containers made from?
Docker, Inc.
 
Secure Substrate: Least Privilege Container Deployment
Secure Substrate: Least Privilege Container Deployment Secure Substrate: Least Privilege Container Deployment
Secure Substrate: Least Privilege Container Deployment
Docker, Inc.
 
Containers technologies
Containers technologiesContainers technologies
Containers technologies
Joris Bonnefoy
 
Practical Approaches to Container Security
Practical Approaches to Container SecurityPractical Approaches to Container Security
Practical Approaches to Container Security
Shea Stewart
 
Container Monitoring with Sysdig
Container Monitoring with SysdigContainer Monitoring with Sysdig
Container Monitoring with Sysdig
Sreenivas Makam
 
All Things Open 2017: How to Treat a Network as a Container
All Things Open 2017: How to Treat a Network as a ContainerAll Things Open 2017: How to Treat a Network as a Container
All Things Open 2017: How to Treat a Network as a Container
Rosemary Wang
 
5 Ways to Secure Your Containers for Docker and Beyond
5 Ways to Secure Your Containers for Docker and Beyond5 Ways to Secure Your Containers for Docker and Beyond
5 Ways to Secure Your Containers for Docker and Beyond
Black Duck by Synopsys
 
Securing your Container Environment with Open Source
Securing your Container Environment with Open SourceSecuring your Container Environment with Open Source
Securing your Container Environment with Open Source
Michael Ducy
 
Docker & Daily DevOps
Docker & Daily DevOpsDocker & Daily DevOps
Docker & Daily DevOps
Satria Ady Pradana
 
Security of Linux containers in the cloud
Security of Linux containers in the cloudSecurity of Linux containers in the cloud
Security of Linux containers in the cloud
Dobrica Pavlinušić
 
Breaking the RpiDocker challenge
Breaking the RpiDocker challenge Breaking the RpiDocker challenge
Breaking the RpiDocker challenge
Nicolas De Loof
 
Docker Online Meetup #31: Unikernels
Docker Online Meetup #31: UnikernelsDocker Online Meetup #31: Unikernels
Docker Online Meetup #31: Unikernels
Docker, Inc.
 
Linux Container Technology 101
Linux Container Technology 101Linux Container Technology 101
Linux Container Technology 101
inside-BigData.com
 
Ten layers of container security for CloudCamp Nov 2017
Ten layers of container security  for CloudCamp Nov 2017Ten layers of container security  for CloudCamp Nov 2017
Ten layers of container security for CloudCamp Nov 2017
Gordon Haff
 
DockerCon EU 2015: Docker Networking Deep Dive
DockerCon EU 2015: Docker Networking Deep DiveDockerCon EU 2015: Docker Networking Deep Dive
DockerCon EU 2015: Docker Networking Deep Dive
Docker, Inc.
 
UniK - a unikernel compiler and runtime
UniK - a unikernel compiler and runtimeUniK - a unikernel compiler and runtime
UniK - a unikernel compiler and runtime
Lee Calcote
 

What's hot (20)

Kafka Mirror Tester: Go and Kubernetes Powered Test Suite for Kafka Replicati...
Kafka Mirror Tester: Go and Kubernetes Powered Test Suite for Kafka Replicati...Kafka Mirror Tester: Go and Kubernetes Powered Test Suite for Kafka Replicati...
Kafka Mirror Tester: Go and Kubernetes Powered Test Suite for Kafka Replicati...
 
DockerCon EU 2015: Docker and PCI-DSS - Lessons learned in a security sensiti...
DockerCon EU 2015: Docker and PCI-DSS - Lessons learned in a security sensiti...DockerCon EU 2015: Docker and PCI-DSS - Lessons learned in a security sensiti...
DockerCon EU 2015: Docker and PCI-DSS - Lessons learned in a security sensiti...
 
A Distributed Malware Analysis System Cuckoo Sandbox
A Distributed Malware Analysis System Cuckoo SandboxA Distributed Malware Analysis System Cuckoo Sandbox
A Distributed Malware Analysis System Cuckoo Sandbox
 
Troubleshooting Tips from a Docker Support Engineer
Troubleshooting Tips from a Docker Support EngineerTroubleshooting Tips from a Docker Support Engineer
Troubleshooting Tips from a Docker Support Engineer
 
Cgroups, namespaces and beyond: what are containers made from?
Cgroups, namespaces and beyond: what are containers made from?Cgroups, namespaces and beyond: what are containers made from?
Cgroups, namespaces and beyond: what are containers made from?
 
Secure Substrate: Least Privilege Container Deployment
Secure Substrate: Least Privilege Container Deployment Secure Substrate: Least Privilege Container Deployment
Secure Substrate: Least Privilege Container Deployment
 
Containers technologies
Containers technologiesContainers technologies
Containers technologies
 
Practical Approaches to Container Security
Practical Approaches to Container SecurityPractical Approaches to Container Security
Practical Approaches to Container Security
 
Container Monitoring with Sysdig
Container Monitoring with SysdigContainer Monitoring with Sysdig
Container Monitoring with Sysdig
 
All Things Open 2017: How to Treat a Network as a Container
All Things Open 2017: How to Treat a Network as a ContainerAll Things Open 2017: How to Treat a Network as a Container
All Things Open 2017: How to Treat a Network as a Container
 
5 Ways to Secure Your Containers for Docker and Beyond
5 Ways to Secure Your Containers for Docker and Beyond5 Ways to Secure Your Containers for Docker and Beyond
5 Ways to Secure Your Containers for Docker and Beyond
 
Securing your Container Environment with Open Source
Securing your Container Environment with Open SourceSecuring your Container Environment with Open Source
Securing your Container Environment with Open Source
 
Docker & Daily DevOps
Docker & Daily DevOpsDocker & Daily DevOps
Docker & Daily DevOps
 
Security of Linux containers in the cloud
Security of Linux containers in the cloudSecurity of Linux containers in the cloud
Security of Linux containers in the cloud
 
Breaking the RpiDocker challenge
Breaking the RpiDocker challenge Breaking the RpiDocker challenge
Breaking the RpiDocker challenge
 
Docker Online Meetup #31: Unikernels
Docker Online Meetup #31: UnikernelsDocker Online Meetup #31: Unikernels
Docker Online Meetup #31: Unikernels
 
Linux Container Technology 101
Linux Container Technology 101Linux Container Technology 101
Linux Container Technology 101
 
Ten layers of container security for CloudCamp Nov 2017
Ten layers of container security  for CloudCamp Nov 2017Ten layers of container security  for CloudCamp Nov 2017
Ten layers of container security for CloudCamp Nov 2017
 
DockerCon EU 2015: Docker Networking Deep Dive
DockerCon EU 2015: Docker Networking Deep DiveDockerCon EU 2015: Docker Networking Deep Dive
DockerCon EU 2015: Docker Networking Deep Dive
 
UniK - a unikernel compiler and runtime
UniK - a unikernel compiler and runtimeUniK - a unikernel compiler and runtime
UniK - a unikernel compiler and runtime
 

Viewers also liked

The Dark Art of Container Monitoring - Spanish
The Dark Art of Container Monitoring - SpanishThe Dark Art of Container Monitoring - Spanish
The Dark Art of Container Monitoring - Spanish
Sysdig
 
Extending Sysdig with Chisel
Extending Sysdig with ChiselExtending Sysdig with Chisel
Extending Sysdig with Chisel
Sysdig
 
Building Trustworthy Containers
Building Trustworthy ContainersBuilding Trustworthy Containers
Building Trustworthy Containers
Sysdig
 
Designing Tracing Tools
Designing Tracing ToolsDesigning Tracing Tools
Designing Tracing Tools
Sysdig
 
A brief history of system calls
A brief history of system callsA brief history of system calls
A brief history of system calls
Sysdig
 
How to Monitor Microservices
How to Monitor MicroservicesHow to Monitor Microservices
How to Monitor Microservices
Sysdig
 
Find the Hacker
Find the HackerFind the Hacker
Find the Hacker
Sysdig
 
Troubleshooting Kubernetes
Troubleshooting KubernetesTroubleshooting Kubernetes
Troubleshooting Kubernetes
Sysdig
 
Stunning Smoky nature scenery
Stunning Smoky nature sceneryStunning Smoky nature scenery
Stunning Smoky nature scenery
DINISHA
 
The most interesting facts about lions you can’t afford to miss!
The most interesting facts about lions you can’t afford to miss!The most interesting facts about lions you can’t afford to miss!
The most interesting facts about lions you can’t afford to miss!
Lisa Mathew
 
The collapse of the universe
The collapse of the universeThe collapse of the universe
The collapse of the universe
Xenia Y
 
Ligers True Or False
Ligers True Or FalseLigers True Or False
Ligers True Or False
Helga
 
Future
FutureFuture
Future
Helga
 
Heaven's Gate Presentation
Heaven's Gate PresentationHeaven's Gate Presentation
Heaven's Gate Presentation
Daniel Potes
 
Golden Temple (kitchen & food)
Golden Temple (kitchen & food)Golden Temple (kitchen & food)
Golden Temple (kitchen & food)
Nikkitta M
 
Monitoring Docker with ELK
Monitoring Docker with ELKMonitoring Docker with ELK
Monitoring Docker with ELK
Daniel Berman
 
Golden Temple India
Golden Temple IndiaGolden Temple India
Golden Temple India
Helga
 
African lion presentation
African lion presentationAfrican lion presentation
African lion presentation
Darwesh Murad
 
King Of The Jungle
King Of The JungleKing Of The Jungle
King Of The Jungle
downeya
 

Viewers also liked (20)

The Dark Art of Container Monitoring - Spanish
The Dark Art of Container Monitoring - SpanishThe Dark Art of Container Monitoring - Spanish
The Dark Art of Container Monitoring - Spanish
 
Extending Sysdig with Chisel
Extending Sysdig with ChiselExtending Sysdig with Chisel
Extending Sysdig with Chisel
 
Building Trustworthy Containers
Building Trustworthy ContainersBuilding Trustworthy Containers
Building Trustworthy Containers
 
Designing Tracing Tools
Designing Tracing ToolsDesigning Tracing Tools
Designing Tracing Tools
 
A brief history of system calls
A brief history of system callsA brief history of system calls
A brief history of system calls
 
How to Monitor Microservices
How to Monitor MicroservicesHow to Monitor Microservices
How to Monitor Microservices
 
Find the Hacker
Find the HackerFind the Hacker
Find the Hacker
 
Troubleshooting Kubernetes
Troubleshooting KubernetesTroubleshooting Kubernetes
Troubleshooting Kubernetes
 
Stunning Smoky nature scenery
Stunning Smoky nature sceneryStunning Smoky nature scenery
Stunning Smoky nature scenery
 
The most interesting facts about lions you can’t afford to miss!
The most interesting facts about lions you can’t afford to miss!The most interesting facts about lions you can’t afford to miss!
The most interesting facts about lions you can’t afford to miss!
 
The collapse of the universe
The collapse of the universeThe collapse of the universe
The collapse of the universe
 
Ligers True Or False
Ligers True Or FalseLigers True Or False
Ligers True Or False
 
Future
FutureFuture
Future
 
Heaven's Gate Presentation
Heaven's Gate PresentationHeaven's Gate Presentation
Heaven's Gate Presentation
 
Golden Temple (kitchen & food)
Golden Temple (kitchen & food)Golden Temple (kitchen & food)
Golden Temple (kitchen & food)
 
Monitoring Docker with ELK
Monitoring Docker with ELKMonitoring Docker with ELK
Monitoring Docker with ELK
 
Golden Temple India
Golden Temple IndiaGolden Temple India
Golden Temple India
 
African lion presentation
African lion presentationAfrican lion presentation
African lion presentation
 
King Of The Jungle
King Of The JungleKing Of The Jungle
King Of The Jungle
 
Beauties
BeautiesBeauties
Beauties
 

Similar to Lions, Tigers and Deers: What building zoos can teach us about securing microservices?

Road to Opscon (Pisa '15) - DevOoops
Road to Opscon (Pisa '15) - DevOoopsRoad to Opscon (Pisa '15) - DevOoops
Road to Opscon (Pisa '15) - DevOoops
Gianluca Varisco
 
Docker Runtime Security
Docker Runtime SecurityDocker Runtime Security
Docker Runtime Security
Sysdig
 
Dockers zero to hero
Dockers zero to heroDockers zero to hero
Dockers zero to hero
Nicolas De Loof
 
Docker Security
Docker SecurityDocker Security
Docker Security
antitree
 
Containers and security
Containers and securityContainers and security
Containers and security
sriram_rajan
 
The Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote WorldThe Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote World
DevOps.com
 
Securing the Container Pipeline
Securing the Container PipelineSecuring the Container Pipeline
Securing the Container Pipeline
Salesforce Engineering
 
Securing the Container Pipeline at Salesforce by Cem Gurkok
Securing the Container Pipeline at Salesforce by Cem Gurkok   Securing the Container Pipeline at Salesforce by Cem Gurkok
Securing the Container Pipeline at Salesforce by Cem Gurkok
Docker, Inc.
 
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
Codemotion
 
DCSF19 Container Security: Theory & Practice at Netflix
DCSF19 Container Security: Theory & Practice at NetflixDCSF19 Container Security: Theory & Practice at Netflix
DCSF19 Container Security: Theory & Practice at Netflix
Docker, Inc.
 
Container Security
Container SecurityContainer Security
Container Security
Salman Baset
 
Secure container: Kata container and gVisor
Secure container: Kata container and gVisorSecure container: Kata container and gVisor
Secure container: Kata container and gVisor
Ching-Hsuan Yen
 
Unraveling Docker Security: Lessons From a Production Cloud
Unraveling Docker Security: Lessons From a Production CloudUnraveling Docker Security: Lessons From a Production Cloud
Unraveling Docker Security: Lessons From a Production Cloud
Salman Baset
 
Tokyo OpenStack Summit 2015: Unraveling Docker Security
Tokyo OpenStack Summit 2015: Unraveling Docker SecurityTokyo OpenStack Summit 2015: Unraveling Docker Security
Tokyo OpenStack Summit 2015: Unraveling Docker Security
Phil Estes
 
Docker Security: Are Your Containers Tightly Secured to the Ship?
Docker Security: Are Your Containers Tightly Secured to the Ship?Docker Security: Are Your Containers Tightly Secured to the Ship?
Docker Security: Are Your Containers Tightly Secured to the Ship?
Michael Boelen
 
Containers and Security for DevOps
Containers and Security for DevOpsContainers and Security for DevOps
Containers and Security for DevOps
Salesforce Engineering
 
AWS re:Invent 2016: Securing Container-Based Applications (CON402)
AWS re:Invent 2016: Securing Container-Based Applications (CON402)AWS re:Invent 2016: Securing Container-Based Applications (CON402)
AWS re:Invent 2016: Securing Container-Based Applications (CON402)
Amazon Web Services
 
AWS re:Invent 2016: Securing Container-Based Applications (CON402)
AWS re:Invent 2016: Securing Container-Based Applications (CON402)AWS re:Invent 2016: Securing Container-Based Applications (CON402)
AWS re:Invent 2016: Securing Container-Based Applications (CON402)
Amazon Web Services
 
stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...
stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...
stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...
NETWAYS
 
Securing your Kubernetes applications
Securing your Kubernetes applicationsSecuring your Kubernetes applications
Securing your Kubernetes applications
Néstor Salceda
 

Similar to Lions, Tigers and Deers: What building zoos can teach us about securing microservices? (20)

Road to Opscon (Pisa '15) - DevOoops
Road to Opscon (Pisa '15) - DevOoopsRoad to Opscon (Pisa '15) - DevOoops
Road to Opscon (Pisa '15) - DevOoops
 
Docker Runtime Security
Docker Runtime SecurityDocker Runtime Security
Docker Runtime Security
 
Dockers zero to hero
Dockers zero to heroDockers zero to hero
Dockers zero to hero
 
Docker Security
Docker SecurityDocker Security
Docker Security
 
Containers and security
Containers and securityContainers and security
Containers and security
 
The Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote WorldThe Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote World
 
Securing the Container Pipeline
Securing the Container PipelineSecuring the Container Pipeline
Securing the Container Pipeline
 
Securing the Container Pipeline at Salesforce by Cem Gurkok
Securing the Container Pipeline at Salesforce by Cem Gurkok   Securing the Container Pipeline at Salesforce by Cem Gurkok
Securing the Container Pipeline at Salesforce by Cem Gurkok
 
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
 
DCSF19 Container Security: Theory & Practice at Netflix
DCSF19 Container Security: Theory & Practice at NetflixDCSF19 Container Security: Theory & Practice at Netflix
DCSF19 Container Security: Theory & Practice at Netflix
 
Container Security
Container SecurityContainer Security
Container Security
 
Secure container: Kata container and gVisor
Secure container: Kata container and gVisorSecure container: Kata container and gVisor
Secure container: Kata container and gVisor
 
Unraveling Docker Security: Lessons From a Production Cloud
Unraveling Docker Security: Lessons From a Production CloudUnraveling Docker Security: Lessons From a Production Cloud
Unraveling Docker Security: Lessons From a Production Cloud
 
Tokyo OpenStack Summit 2015: Unraveling Docker Security
Tokyo OpenStack Summit 2015: Unraveling Docker SecurityTokyo OpenStack Summit 2015: Unraveling Docker Security
Tokyo OpenStack Summit 2015: Unraveling Docker Security
 
Docker Security: Are Your Containers Tightly Secured to the Ship?
Docker Security: Are Your Containers Tightly Secured to the Ship?Docker Security: Are Your Containers Tightly Secured to the Ship?
Docker Security: Are Your Containers Tightly Secured to the Ship?
 
Containers and Security for DevOps
Containers and Security for DevOpsContainers and Security for DevOps
Containers and Security for DevOps
 
AWS re:Invent 2016: Securing Container-Based Applications (CON402)
AWS re:Invent 2016: Securing Container-Based Applications (CON402)AWS re:Invent 2016: Securing Container-Based Applications (CON402)
AWS re:Invent 2016: Securing Container-Based Applications (CON402)
 
AWS re:Invent 2016: Securing Container-Based Applications (CON402)
AWS re:Invent 2016: Securing Container-Based Applications (CON402)AWS re:Invent 2016: Securing Container-Based Applications (CON402)
AWS re:Invent 2016: Securing Container-Based Applications (CON402)
 
stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...
stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...
stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...
 
Securing your Kubernetes applications
Securing your Kubernetes applicationsSecuring your Kubernetes applications
Securing your Kubernetes applications
 

More from Sysdig

Wordpress y Docker, de desarrollo a produccion
Wordpress y Docker, de desarrollo a produccionWordpress y Docker, de desarrollo a produccion
Wordpress y Docker, de desarrollo a produccion
Sysdig
 
What Prometheus means for monitoring vendors
What Prometheus means for monitoring vendorsWhat Prometheus means for monitoring vendors
What Prometheus means for monitoring vendors
Sysdig
 
15 kubernetes failure points you should watch
15 kubernetes failure points you should watch15 kubernetes failure points you should watch
15 kubernetes failure points you should watch
Sysdig
 
CI / CD / CS - Continuous Security in Kubernetes
CI / CD / CS - Continuous Security in KubernetesCI / CD / CS - Continuous Security in Kubernetes
CI / CD / CS - Continuous Security in Kubernetes
Sysdig
 
Continuous Security
Continuous SecurityContinuous Security
Continuous Security
Sysdig
 
The top 5 Kubernetes metrics to monitor
The top 5 Kubernetes metrics to monitorThe top 5 Kubernetes metrics to monitor
The top 5 Kubernetes metrics to monitor
Sysdig
 
The top 5 Kubernetes metrics to monitor
The top 5 Kubernetes metrics to monitorThe top 5 Kubernetes metrics to monitor
The top 5 Kubernetes metrics to monitor
Sysdig
 

More from Sysdig (7)

Wordpress y Docker, de desarrollo a produccion
Wordpress y Docker, de desarrollo a produccionWordpress y Docker, de desarrollo a produccion
Wordpress y Docker, de desarrollo a produccion
 
What Prometheus means for monitoring vendors
What Prometheus means for monitoring vendorsWhat Prometheus means for monitoring vendors
What Prometheus means for monitoring vendors
 
15 kubernetes failure points you should watch
15 kubernetes failure points you should watch15 kubernetes failure points you should watch
15 kubernetes failure points you should watch
 
CI / CD / CS - Continuous Security in Kubernetes
CI / CD / CS - Continuous Security in KubernetesCI / CD / CS - Continuous Security in Kubernetes
CI / CD / CS - Continuous Security in Kubernetes
 
Continuous Security
Continuous SecurityContinuous Security
Continuous Security
 
The top 5 Kubernetes metrics to monitor
The top 5 Kubernetes metrics to monitorThe top 5 Kubernetes metrics to monitor
The top 5 Kubernetes metrics to monitor
 
The top 5 Kubernetes metrics to monitor
The top 5 Kubernetes metrics to monitorThe top 5 Kubernetes metrics to monitor
The top 5 Kubernetes metrics to monitor
 

Recently uploaded

Future Networking v Energy Limits ICTON 2024 Bari Italy
Future Networking v Energy Limits ICTON 2024 Bari ItalyFuture Networking v Energy Limits ICTON 2024 Bari Italy
Future Networking v Energy Limits ICTON 2024 Bari Italy
University of Hertfordshire
 
Good Energy Haus: PHN Presents Building Electrification, A Passive House Symp...
Good Energy Haus: PHN Presents Building Electrification, A Passive House Symp...Good Energy Haus: PHN Presents Building Electrification, A Passive House Symp...
Good Energy Haus: PHN Presents Building Electrification, A Passive House Symp...
TE Studio
 
2300/2800 series Perkins diesel engine.pdf
2300/2800 series Perkins diesel engine.pdf2300/2800 series Perkins diesel engine.pdf
2300/2800 series Perkins diesel engine.pdf
haytham majed
 
Artificial Intelligence Imaging - medical imaging
Artificial Intelligence Imaging - medical imagingArtificial Intelligence Imaging - medical imaging
Artificial Intelligence Imaging - medical imaging
NeeluPari
 
Numerical comaprison of various order explicit runge kutta methods with matla...
Numerical comaprison of various order explicit runge kutta methods with matla...Numerical comaprison of various order explicit runge kutta methods with matla...
Numerical comaprison of various order explicit runge kutta methods with matla...
DrAzizulHasan1
 
PCI Design Handbook Content and Updates.pptx
PCI Design Handbook Content and Updates.pptxPCI Design Handbook Content and Updates.pptx
PCI Design Handbook Content and Updates.pptx
gunjanatulbansal
 
Failure Engineering - Architecting Resilient API's
Failure Engineering - Architecting Resilient API'sFailure Engineering - Architecting Resilient API's
Failure Engineering - Architecting Resilient API's
Akash Saxena
 
UNIT-1-INTRODUCTION- MECHATRONICS-ENGGINERING
UNIT-1-INTRODUCTION- MECHATRONICS-ENGGINERINGUNIT-1-INTRODUCTION- MECHATRONICS-ENGGINERING
UNIT-1-INTRODUCTION- MECHATRONICS-ENGGINERING
Chandra Kumar S
 
MAJOR ACCIDENTS DUE TO FIRE IN COAL MINES.pptx
MAJOR ACCIDENTS DUE TO FIRE IN COAL MINES.pptxMAJOR ACCIDENTS DUE TO FIRE IN COAL MINES.pptx
MAJOR ACCIDENTS DUE TO FIRE IN COAL MINES.pptx
maniksrikant
 
Fuel-Dlivery-Project PowerPoint presentations
Fuel-Dlivery-Project  PowerPoint presentationsFuel-Dlivery-Project  PowerPoint presentations
Fuel-Dlivery-Project PowerPoint presentations
jithujithin657
 
RAILWAYS, a vital part of our infrastructure, play a crucial role in ensuring...
RAILWAYS, a vital part of our infrastructure, play a crucial role in ensuring...RAILWAYS, a vital part of our infrastructure, play a crucial role in ensuring...
RAILWAYS, a vital part of our infrastructure, play a crucial role in ensuring...
Kiran Kumar Manigam
 
一比一原版(uofs毕业证书)萨省大学毕业证如何办理
一比一原版(uofs毕业证书)萨省大学毕业证如何办理一比一原版(uofs毕业证书)萨省大学毕业证如何办理
一比一原版(uofs毕业证书)萨省大学毕业证如何办理
r07z26xt
 
BLW vocational training mechanical production workshop report.
BLW vocational training mechanical production workshop report.BLW vocational training mechanical production workshop report.
BLW vocational training mechanical production workshop report.
nk3275141
 
一比一原版(surrey毕业证书)英国萨里大学毕业证如何办理
一比一原版(surrey毕业证书)英国萨里大学毕业证如何办理一比一原版(surrey毕业证书)英国萨里大学毕业证如何办理
一比一原版(surrey毕业证书)英国萨里大学毕业证如何办理
g1toa2w
 
Presentation on ergonomics in mining industry
Presentation on ergonomics in mining industryPresentation on ergonomics in mining industry
Presentation on ergonomics in mining industry
praku727
 
Thermal Power Station Ukai Report pdf 24
Thermal Power Station Ukai Report pdf 24Thermal Power Station Ukai Report pdf 24
Thermal Power Station Ukai Report pdf 24
AnishVasava
 
The X Window System Graphical User Interface
The X Window System Graphical User InterfaceThe X Window System Graphical User Interface
The X Window System Graphical User Interface
hindirahuerfano
 
Sea Wave Energy - Renewable Energy Resources
Sea Wave Energy - Renewable Energy ResourcesSea Wave Energy - Renewable Energy Resources
Sea Wave Energy - Renewable Energy Resources
21h16charis
 
buy a fake University of London diploma supplement
buy a fake University of London diploma supplementbuy a fake University of London diploma supplement
buy a fake University of London diploma supplement
GlethDanold
 
Gen AI with LLM for construction technology
Gen AI with LLM for construction technologyGen AI with LLM for construction technology
Gen AI with LLM for construction technology
Tae wook kang
 

Recently uploaded (20)

Future Networking v Energy Limits ICTON 2024 Bari Italy
Future Networking v Energy Limits ICTON 2024 Bari ItalyFuture Networking v Energy Limits ICTON 2024 Bari Italy
Future Networking v Energy Limits ICTON 2024 Bari Italy
 
Good Energy Haus: PHN Presents Building Electrification, A Passive House Symp...
Good Energy Haus: PHN Presents Building Electrification, A Passive House Symp...Good Energy Haus: PHN Presents Building Electrification, A Passive House Symp...
Good Energy Haus: PHN Presents Building Electrification, A Passive House Symp...
 
2300/2800 series Perkins diesel engine.pdf
2300/2800 series Perkins diesel engine.pdf2300/2800 series Perkins diesel engine.pdf
2300/2800 series Perkins diesel engine.pdf
 
Artificial Intelligence Imaging - medical imaging
Artificial Intelligence Imaging - medical imagingArtificial Intelligence Imaging - medical imaging
Artificial Intelligence Imaging - medical imaging
 
Numerical comaprison of various order explicit runge kutta methods with matla...
Numerical comaprison of various order explicit runge kutta methods with matla...Numerical comaprison of various order explicit runge kutta methods with matla...
Numerical comaprison of various order explicit runge kutta methods with matla...
 
PCI Design Handbook Content and Updates.pptx
PCI Design Handbook Content and Updates.pptxPCI Design Handbook Content and Updates.pptx
PCI Design Handbook Content and Updates.pptx
 
Failure Engineering - Architecting Resilient API's
Failure Engineering - Architecting Resilient API'sFailure Engineering - Architecting Resilient API's
Failure Engineering - Architecting Resilient API's
 
UNIT-1-INTRODUCTION- MECHATRONICS-ENGGINERING
UNIT-1-INTRODUCTION- MECHATRONICS-ENGGINERINGUNIT-1-INTRODUCTION- MECHATRONICS-ENGGINERING
UNIT-1-INTRODUCTION- MECHATRONICS-ENGGINERING
 
MAJOR ACCIDENTS DUE TO FIRE IN COAL MINES.pptx
MAJOR ACCIDENTS DUE TO FIRE IN COAL MINES.pptxMAJOR ACCIDENTS DUE TO FIRE IN COAL MINES.pptx
MAJOR ACCIDENTS DUE TO FIRE IN COAL MINES.pptx
 
Fuel-Dlivery-Project PowerPoint presentations
Fuel-Dlivery-Project  PowerPoint presentationsFuel-Dlivery-Project  PowerPoint presentations
Fuel-Dlivery-Project PowerPoint presentations
 
RAILWAYS, a vital part of our infrastructure, play a crucial role in ensuring...
RAILWAYS, a vital part of our infrastructure, play a crucial role in ensuring...RAILWAYS, a vital part of our infrastructure, play a crucial role in ensuring...
RAILWAYS, a vital part of our infrastructure, play a crucial role in ensuring...
 
一比一原版(uofs毕业证书)萨省大学毕业证如何办理
一比一原版(uofs毕业证书)萨省大学毕业证如何办理一比一原版(uofs毕业证书)萨省大学毕业证如何办理
一比一原版(uofs毕业证书)萨省大学毕业证如何办理
 
BLW vocational training mechanical production workshop report.
BLW vocational training mechanical production workshop report.BLW vocational training mechanical production workshop report.
BLW vocational training mechanical production workshop report.
 
一比一原版(surrey毕业证书)英国萨里大学毕业证如何办理
一比一原版(surrey毕业证书)英国萨里大学毕业证如何办理一比一原版(surrey毕业证书)英国萨里大学毕业证如何办理
一比一原版(surrey毕业证书)英国萨里大学毕业证如何办理
 
Presentation on ergonomics in mining industry
Presentation on ergonomics in mining industryPresentation on ergonomics in mining industry
Presentation on ergonomics in mining industry
 
Thermal Power Station Ukai Report pdf 24
Thermal Power Station Ukai Report pdf 24Thermal Power Station Ukai Report pdf 24
Thermal Power Station Ukai Report pdf 24
 
The X Window System Graphical User Interface
The X Window System Graphical User InterfaceThe X Window System Graphical User Interface
The X Window System Graphical User Interface
 
Sea Wave Energy - Renewable Energy Resources
Sea Wave Energy - Renewable Energy ResourcesSea Wave Energy - Renewable Energy Resources
Sea Wave Energy - Renewable Energy Resources
 
buy a fake University of London diploma supplement
buy a fake University of London diploma supplementbuy a fake University of London diploma supplement
buy a fake University of London diploma supplement
 
Gen AI with LLM for construction technology
Gen AI with LLM for construction technologyGen AI with LLM for construction technology
Gen AI with LLM for construction technology
 

Lions, Tigers and Deers: What building zoos can teach us about securing microservices?

  • 1. Jorge Salamero Sanz Lions, Tigers and Deers: What building zoos can teach us about securing microservices?
  • 2. % whoami Jorge Salamero Sanz <jorge.salamero@sysdig.com> @bencerillo @sysdig • Working on OSS last 12 years • Working on OSS+Cloud last 5 years • Working on monitoring last 3 years • Technical Marketing geek @sysdig
  • 3. Sysdig Open Source system troubleshooting with native container support (htop, vmstat, netstat, lsof, tcpdump…) Monitoring, alerting, troubleshooting tool for Docker, Kubernetes, Mesos, RancherOS, GCE, ECS
  • 4. Traditional deployment Full host OS kernel systemd syslogd App services MySQL Nginx OpenSSL Java App A App B App C Ops Devs
  • 5. Containerized deployment Full host OS kernel + Docker MySQL App A Ops DevOps Nginx + OpenSSL App B Java 8.0 build XXX App C
  • 6. How to secure this? Containerization is not something new to us... • Establish trust boundaries • Identify, minimise, and harden attack surfaces • Reduce scope and access • Layer protections and defenses From Aaron Grattafiori presented “The Golden Ticket: Docker and High Security Microservices
  • 7. Securing Microservices Defense in depth Microservices Single responsibility principle: • Principle of least privileges • Principle of least surprise • Principle of least access
  • 8. Container Security Techniques • New workflows (docker pull vs previous apt update/yum update) • CI/CD Pipeline (Jenkins, Openshift, etc: rebuilds, rolling updates) • Access management, logging & auditing (Kubernetes, Openshift: user roles, namespaces, centralized logging, authn & authz, etc) • Trust boundaries (do you trust entire Docker Hub? Image signing, Docker Notary) • Simplify container OS, tons of useless stuff (RancherOS, Atomic, CoreOS, Alpine Linux, etc) • Network security (Weave, etc) • Secret management (Vaults instead of environment vars, etc)
  • 9. Docker Security Techniques • Drop privileges • Limit capabilities • Do not run as root! containers are not VMs! • cgroups • Limit resources share, not access restriction • namespaces • Useful for not complete security model • User namespaces • Kubernetes/Openshift security contexts • Host security and access (Docker bench, RO access, etc)
  • 10. Scanning What are my containers doing? • Static scanning • Dynamic scanning
  • 11. Static Scanning Yay, this was soo easy to deploy! I Docker Hub! (your developers too, actually they were already using it :P) uhm… wait, is someone maintaining this image? RUN apt-get install -y wget build-essential python python-dev python-pip python-virtualenv RUN wget http://nodejs.org/dist/node-latest.tar.gz RUN tar xvzf node-latest.tar.gz RUN cd node-v* && ./configure && CXX="g++ -Wno-unused-local-typedefs" make && CXX="g++ -Wno-unused-local-typedefs" make install • Static Scanning: • CoreOS Clair, Docker Nautilus, Red Hat CloudForms, etc
  • 12. Image Vulnerability Scanning • Scan contents of images looking for software versions with known defects • Container image layering can make this efficient (exploits immutable nature of images) Ubuntu: 14.04 Apache: 2.2 Wordpress: 4.6 PHP: 7.0
  • 13. Image Vulnerability Scanning • Scan contents of images looking for software versions with known defects • Container image layering can make this efficient (exploits immutable nature of images) • Ubuntu: 14.04 Apache: 2.2 Wordpress: 4.6 PHP: 7.0
  • 14. Image Vulnerability Scanning • Scan contents of images looking for software versions with known defects • Container image layering can make this efficient (exploits immutable nature of images) • Ubuntu: 14.04 Apache: 2.2 Wordpress: 4.6 PHP: 7.0
  • 15. Image Vulnerability Scanning • Scan contents of images looking for software versions with known defects • Container image layering can make this efficient (exploits immutable nature of images) • Ubuntu: 14.04 Apache: 2.2 Wordpress: 4.6 PHP: 7.0
  • 16. Container Security Techniques OK, no known vulnerabilities, still secure? Containers are black boxes exposing a behaviour, is something misbehaving? • Dynamic Scanning: • Seccomp • MAC (Mandatory Access Control) • Behavioral Security Monitoring
  • 17. Seccomp • Seccomp: application system call “sandboxing” • Create filter (BPF program ) with lists of allowed syscalls • Each syscall matched against filter • Failures-> log message, error return, and/or kill process • Docker runs containerized process under a seccomp profile • Notable disallowed syscalls: • clone (creating new namespaces) • reboot (reboot the host) • setns (change namespaces)
  • 18. Mandatory Access Control • SELinux or AppArmor • Same mechanisms: kernel-level interception/filtering • features++ && complexity++ • Above syscalls: • Actors (process) • Actions (read/write on files/sockets) • Targets (files, IPs, ports) • But what if I only want to put some surveillance in?
  • 19. Behavioral Security Monitoring • Auditing vs enforcement • detect intrusions instead of preventing intrusions • Build rules that define suspicious/anomalous behavior • Match rules against activity on a system • Auditd (SELinux logger) • Falco (with container capabilities)
  • 20. Sysdig Falco An anomaly detection system built on top of the sysdig engine
  • 22. What is Sysdig Falco? • Detects suspicious activity defined by a set of easy rules • Uses sysdig’s flexible and powerful filtering expressions (in userspace) • Container support (Docker, Kubernetes, Mesos, etc) • Flexible notification methods • Open Source
  • 23. Quick Examples A shell is run in a container container.id != host and proc.name = bash Overwrite system binaries fd.directory in (/bin, /sbin, /usr/bin, /usr/sbin) and write Container namespace change evt.type = setns and not proc.name in (docker, sysdig) Non-device files written in /dev (evt.type = creat or evt.arg.flags contains O_CREAT) and proc.name != blkid and fd.directory = /dev and fd.name != /dev/null Process tries to access camera evt.type = open and fd.name = /dev/video0 and not proc.name in (skype, webex)
  • 24. Falco Rules • .yaml file containing Macros, Lists, and Rules - macro: bin_dir condition: fd.directory in (/bin, /sbin, /usr/bin, /usr/sbin) - list: package_mgmt_binaries items: [dpkg, dpkg-preconfigu, rpm, rpmkey, yum, frontend] - rule: write_binary_dir desc: an attempt to write to any file below a set of binary directories condition: bin_dir and evt.dir = < and open_write and not package_mgmt_procs output: "File below a known binary directory opened for writing (user=%user.name command=%proc.cmdline file=%fd.name)" priority: WARNING
  • 25. Alerts and Outputs • Events that match filter expression (rule) result in alerts • output field used to format event into alert message • Sending to: • syslog • file • stdout • shell (e.g. mail -s "Falco Notification" alerts@example.com) • Sysdig Cloud
  • 27. Remember Container behaviour security monitoring shouldn’t be difficult...