SlideShare a Scribd company logo
@mfdii
Michael Ducy, Sysdig, @mfdii
Securing your
Container Environment
with Open Source
@mfdii
Layers Container Security
Infra, Build, Runtime
Container Security Challenges
Open Source Tools For:
- Infra
- Build
- Runtime
Container Security Architecture
Agenda
@mfdii
Layers of Container Security
Runtime
Build
Infrastructure
@mfdii
Infrastructure
Host Security
Networking
Cluster Security
Container Runtime
@mfdii
Build
Image/Software Provenance
- Signed Images/Layers
- Artifact Signing
Vulnerability Management
- Upstream OS
- Application Vulnerabilities
@mfdii
Runtime
Service/Container Admittance
Secure Secrets
Anomaly Detection
Forensics
@mfdii
Decisions Pushed to Edge
Ephemeral Nature of Containers
Attack Surface
Resource Isolation
Challenges of Container Security
@mfdii
Infrastructure Security
Network Storage
Host
Cluster
Container Runtime
@mfdii
Infrastructure Security
Cluster:
- RBAC, Security Policies, Affinity
Host/Container Runtime:
- Seccomp, SELinux, AppArmor, Resource Constraints
Network:
- Service Mesh, Network Policy, Network Filtering
@mfdii
Security Policies
Security Policies define:
- Access to host resources:
- Filesystem, Host Network, Namespaces
- User/Group of Container
- Read Only Filesystem
- Linux capabilities available:
- http://man7.org/linux/man-pages/man7/capabilities.7.html
- Seccomp, AppArmor, or SELinux profiles
@mfdii
Linux Security Modules
SELinux
System wide execution policy
Apparmor
System wide execution policy, focused on processes
Seccomp
Per process system call isolation
@mfdii
LSMs
$ docker run --security-opt "apparmor=<profile>"
$ docker run --security-opt 
seccomp=/path/to/seccomp/profile.json
@mfdii
Security Policies
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: restricted
annotations:
seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default'
apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default'
seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default'
apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
spec:
privileged: false
# Required to prevent escalations to root.
allowPrivilegeEscalation: false
# This is redundant with non-root + disallow privilege escalation,
# but we can provide it for defense in depth.
requiredDropCapabilities:
- ALL
# Allow core volume types.
volumes:
- 'configMap'
- 'emptyDir'
- 'projected'
- 'secret'
- 'downwardAPI'
# Assume that persistentVolumes set up by the cluster admin are safe to use.
- 'persistentVolumeClaim'
hostNetwork: false
@mfdii
Container Affinity/Constraints
Affinity ensures:
- Containers with sensitive data or data processing routines are
next scheduled next to other containers
Strong labeling schema encouraged/required.
@mfdii
Kubernetes Pod Affinity
apiVersion: v1
kind: Pod
metadata:
name: with-node-affinity
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/e2e-az-name
operator: In
values:
- e2e-az1
- e2e-az2
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: another-node-label-key
operator: In
values:
- another-node-label-value
@mfdii
Host/Container Runtime Security
CIS Benchmarks for Docker Hosts
- https://www.cisecurity.org/benchmark/docker/
- Chef’s Inspec to scan for policy violations
- https://inspec.io
- https://github.com/dev-sec/cis-docker-benchmark
- Docker Bench for Security
- https://github.com/docker/docker-bench-security
@mfdii
Networking
Standard Firewall Rules/Security Groups
- Common exploit point are dashboards or API ports open.
Kubernetes:
- Network Policies, Container Networking Interface
Network Filtering
- Kernel level L3/L4/L7
- Cilium - https://cilium.io/
@mfdii
Cilium
apiVersion: "cilium.io/v2"
kind: CiliumNetworkPolicy
description: "L3-L4 policy to restrict deathstar access to empire ships only"
metadata:
name: "rule1"
spec:
endpointSelector:
matchLabels:
org: empire
class: deathstar
ingress:
- fromEndpoints:
- matchLabels:
org: empire
toPorts:
- ports:
- port: "80"
protocol: TCP
@mfdii
Cilium
@mfdii
Cilium
apiVersion: "cilium.io/v2"
kind: CiliumNetworkPolicy
description: "L7 policy to restrict access to specific HTTP call"
metadata:
name: "rule1"
spec:
endpointSelector:
matchLabels:
org: empire
class: deathstar
ingress:
- fromEndpoints:
- matchLabels:
org: empire
toPorts:
- ports:
- port: "80"
protocol: TCP
rules:
http:
- method: "POST"
path: "/v1/request-landing"
@mfdii
Cilium
@mfdii
Build Security
Network Storage
Host
Cluster
App Code
App Runtime
Libraries
OS
App Code
App Runtime
Libraries
OS
App Code
App Runtime
Libraries
OS
Container Runtime
@mfdii
Build Security
Image/Artifact Provenance:
- Artifact signing, trusted registries, admittance control
Vulnerability Management:
- Image scanning, OS libraries, application libraries
@mfdii
Image Scanning
Clair
- Static analysis of vulnerabilities in application containers.
- Focuses on Operating System packages and libraries
- https://github.com/coreos/clair
Anchore
- Analyzes container images against user defined policies.
- https://github.com/anchore
@mfdii
CoPilot & Openhub
CoPilot
- Open Source Application Dependency Vulnerability Management
- https://copilot.blackducksoftware.com/
- Incorporate into your build process
OpenHub
- Compare open source project usage, and project health
- https://www.openhub.net/
@mfdii
Notary & Portieris
Notary
- Signs collections of digital content (Artifacts)
- Project from Docker - Docker Content Trust
- Implementation of The Update Framework
- https://github.com/theupdateframework/
Portieries
- Kubernetes Admission controller for enforcing Content Trust
- https://github.com/IBM/portieris
- https://schd.ws/hosted_files/kccnceu18/41/kubernetes-notary-tuf.pdf
- https://www.youtube.com/watch?v=JK70k_B87mw
@mfdii
Notary & Portieris
@mfdii
Runtime Security
Network Storage
Host
Cluster
App Code
App Runtime
Libraries
OS
App Code
App Runtime
Libraries
OS
App Code
App Runtime
Libraries
OS
Container Runtime
@mfdii
Runtime Security
Service/Container Admittance
- What’s Allowed to Run/Join a Service
Secure Secrets
- How do applications authenticate
Anomaly Detection
- Is my runtime environment being tampered with?
Forensics
- What happened if something was compromised?
@mfdii
Service Identity
How can you verify a service is who it says it is?
SPIFFE
- Secure Production Identity Framework For Everyone
- Cryptographically verifiable Service IDs
- https://github.com/spiffe/spiffe
@mfdii
Service Identity
@mfdii
Anomaly Detection
- Containers are isolated processes.
- Processes are “scoped” as to what’s expected.
- Container images are immutable, runtime environments
often aren’t.
- How do you detect “abnormal” behavior.
@mfdii
Sysdig Falco
A behavioral activity monitor
•Detects suspicious activity defined by a set of rules
•Uses Sysdig’s flexible and powerful filtering expressions
With full support for containers/orchestration
•Utilizes sysdig’s container & orchestrator support
And flexible notification methods
•Alert to files, standard output, syslog, programs
Open Source
•Anyone can contribute rules or improvements
@mfdii
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 = create 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)
@mfdii
Falco architecture
falco_probe
Kernel
Module
Kernel
User
Syscalls
Sysdig Libraries
`
Events
Alerting
Falco Rules
Suspicious
Events File
Syslog
Stdout
Filter Expression
Shell
@mfdii
Falco Rules
25 common rules available OOTB
Focused on common container best practices:
■ Writing files in bin or etc directories
■ Reading sensitive files
■ Binaries being executed other than CMD/ENTRYPOINT
@mfdii
Falco rules
.yaml file containing Macros, Lists, and Rules
- macro: bin_dir
condition: fd.directory in (/bin, /sbin, /usr/bin, /usr/sbin)
- list: shell_binaries
items: [bash, csh, ksh, sh, tcsh, zsh, dash]
- 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
@mfdii
Active Security with Falco, NATS,
and Kubeless
Falco NATS Kubeless
Detects abnormal event,
Publishes alert to NATS
Subscribers receive
Falco Alert through
NATS Server
Kubeless receives
Falco Alert, firing a
function to delete the
offending Kubernetes
Pod
@mfdii
Join the community
• Website
•http://www.sysdig.org/falco
• Public Slack
•http://slack.sysdig.com/
•https://sysdig.slack.com/messages/falco
• Blog
•https://sysdig.com/blog/tag/falco/
• Sysdig Secure
•http://sysdig.com/product/secure
@mfdii
Learn more
Github
• https://github.com/draios/falco
• Pull Requests welcome!
Wiki
• https://github.com/draios/falco/wiki
Docker Hub
• https://hub.docker.com/r/sysdig/falco/
@mfdii
Thank You.
Questions?
michael@sysdig.com, @mfdii

More Related Content

PPTX
Open source security tools for Kubernetes.
PDF
Automating Security Response with Serverless
PDF
Sysdig Open Source Intro
PDF
Monitoring & Securing Microservices in Kubernetes
PDF
Container Runtime Security with Falco
PDF
DevOps in a Cloud Native World
PDF
5 Ways to Secure Your Containers for Docker and Beyond
PDF
Principles of Monitoring Microservices
Open source security tools for Kubernetes.
Automating Security Response with Serverless
Sysdig Open Source Intro
Monitoring & Securing Microservices in Kubernetes
Container Runtime Security with Falco
DevOps in a Cloud Native World
5 Ways to Secure Your Containers for Docker and Beyond
Principles of Monitoring Microservices

What's hot (20)

PDF
The Future of Security and Productivity in Our Newly Remote World
PDF
Csw2016 wang docker_escapetechnology
PDF
XFLTReat: a new dimension in tunnelling
PDF
Barbican 1.0 - Open Source Key Management for OpenStack
PPTX
Secure Application Development in the Age of Continuous Delivery
PDF
Kubernetes 101 for_penetration_testers_-_null_mumbai
PPTX
Dock ir incident response in a containerized, immutable, continually deploy...
PPT
Container security
PDF
NetDevOps Developer Environments with Vagrant @ SCALE16x
PPTX
Abusing Adobe Reader’s JavaScript APIs by Abdul-Aziz Hariri & Brian Gorenc - ...
PDF
Anatomy of a Cloud Hack
PDF
Useful Python Libraries for Network Engineers - PyOhio 2018
PPTX
360° Kubernetes Security: From Source Code to K8s Configuration Security
PDF
Practical Approaches to Container Security
PDF
Chris Rutter: Avoiding The Security Brick
PPTX
An In-depth look at application containers
PDF
Kali tools list with short description
PPTX
Shamsa altayer 10bg kali linux
PDF
DevSecCon London 2019: A Kernel of Truth: Intrusion Detection and Attestation...
PPTX
Kali Linux - Falconer - ISS 2014
The Future of Security and Productivity in Our Newly Remote World
Csw2016 wang docker_escapetechnology
XFLTReat: a new dimension in tunnelling
Barbican 1.0 - Open Source Key Management for OpenStack
Secure Application Development in the Age of Continuous Delivery
Kubernetes 101 for_penetration_testers_-_null_mumbai
Dock ir incident response in a containerized, immutable, continually deploy...
Container security
NetDevOps Developer Environments with Vagrant @ SCALE16x
Abusing Adobe Reader’s JavaScript APIs by Abdul-Aziz Hariri & Brian Gorenc - ...
Anatomy of a Cloud Hack
Useful Python Libraries for Network Engineers - PyOhio 2018
360° Kubernetes Security: From Source Code to K8s Configuration Security
Practical Approaches to Container Security
Chris Rutter: Avoiding The Security Brick
An In-depth look at application containers
Kali tools list with short description
Shamsa altayer 10bg kali linux
DevSecCon London 2019: A Kernel of Truth: Intrusion Detection and Attestation...
Kali Linux - Falconer - ISS 2014
Ad

Similar to Securing your Container Environment with Open Source (20)

PDF
WTF my container just spawned a shell!
PDF
Lions, Tigers and Deers: What building zoos can teach us about securing micro...
PDF
Securing your Kubernetes applications
ODP
Continuous Security
PDF
CI / CD / CS - Continuous Security in Kubernetes
PDF
Docker Runtime Security
PDF
Implementing Active Security with Sysdig Falco - Barcelona Software Crafters
PDF
Implementing Active Security with Sysdig Falco - Docker Meetup Barcelona
PDF
Supply Chain Security for Containerised Workloads - Lee Chuk Munn
PDF
The Container Security Checklist
PPTX
Csa container-security-in-aws-dw
PPTX
Kubernetes and container security
PPTX
Containers and workload security an overview
PDF
LXC, Docker, security: is it safe to run applications in Linux Containers?
PDF
Securing Containerized Applications: A Primer
PDF
Lines of Defense - Securing your Kubernetes Clusters by Koray Oksay
PDF
How Secure Is Your Container? ContainerCon Berlin 2016
PDF
DevOpsDaysRiga 2017: Chris Van Tuin - A DevOps State of Mind: Continuous Secu...
PDF
Container Security - Let's see Falco and Sysdig in Action by Stefan Trimborn
PDF
Testing Docker Images Security
WTF my container just spawned a shell!
Lions, Tigers and Deers: What building zoos can teach us about securing micro...
Securing your Kubernetes applications
Continuous Security
CI / CD / CS - Continuous Security in Kubernetes
Docker Runtime Security
Implementing Active Security with Sysdig Falco - Barcelona Software Crafters
Implementing Active Security with Sysdig Falco - Docker Meetup Barcelona
Supply Chain Security for Containerised Workloads - Lee Chuk Munn
The Container Security Checklist
Csa container-security-in-aws-dw
Kubernetes and container security
Containers and workload security an overview
LXC, Docker, security: is it safe to run applications in Linux Containers?
Securing Containerized Applications: A Primer
Lines of Defense - Securing your Kubernetes Clusters by Koray Oksay
How Secure Is Your Container? ContainerCon Berlin 2016
DevOpsDaysRiga 2017: Chris Van Tuin - A DevOps State of Mind: Continuous Secu...
Container Security - Let's see Falco and Sysdig in Action by Stefan Trimborn
Testing Docker Images Security
Ad

More from Michael Ducy (20)

PDF
Rethinking Open Source in the Age of Cloud
PDF
Sysdig Tokyo Meetup 2018 02-27
PDF
Survey of Container Build Tools
PDF
Monoliths, Myths, and Microservices - CfgMgmtCamp
PDF
Monoliths, Myths, and Microservices
PPTX
Why Pipelines Matter
PPTX
The Future of Everything
PPTX
Improving Goat Production
PDF
Changing the Way Development and Operations Works
PDF
CloudStack Day 14 - Automation: The Key to Hybrid Cloud
PPTX
The Road to Hybrid Cloud is Paved with Automation
PPTX
The Velocity of Bureaucracy
PPTX
The Goat and the Silo
PPTX
Little Tech, Big Impact - Monktoberfest 2013
PPT
Object, measure thyself
PPTX
DevOps Columbus Meetup Kickoff - Infrastructure as Code
PPTX
DevOpsDays Amsterdam - DudeOps: Why The Big Lebowski is About Your IT Project
PPTX
I've Got 99 Problems But DevOps Ain't One
PPT
DudeOps - Why The Big Lebowski is About Building a Cloud
PPTX
Defrag - How Your Enterprise Software Vendor is Ripping You Off
Rethinking Open Source in the Age of Cloud
Sysdig Tokyo Meetup 2018 02-27
Survey of Container Build Tools
Monoliths, Myths, and Microservices - CfgMgmtCamp
Monoliths, Myths, and Microservices
Why Pipelines Matter
The Future of Everything
Improving Goat Production
Changing the Way Development and Operations Works
CloudStack Day 14 - Automation: The Key to Hybrid Cloud
The Road to Hybrid Cloud is Paved with Automation
The Velocity of Bureaucracy
The Goat and the Silo
Little Tech, Big Impact - Monktoberfest 2013
Object, measure thyself
DevOps Columbus Meetup Kickoff - Infrastructure as Code
DevOpsDays Amsterdam - DudeOps: Why The Big Lebowski is About Your IT Project
I've Got 99 Problems But DevOps Ain't One
DudeOps - Why The Big Lebowski is About Building a Cloud
Defrag - How Your Enterprise Software Vendor is Ripping You Off

Recently uploaded (20)

PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
KodekX | Application Modernization Development
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Machine learning based COVID-19 study performance prediction
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Encapsulation theory and applications.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
cuic standard and advanced reporting.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
KodekX | Application Modernization Development
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Understanding_Digital_Forensics_Presentation.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Machine learning based COVID-19 study performance prediction
Spectral efficient network and resource selection model in 5G networks
Unlocking AI with Model Context Protocol (MCP)
Digital-Transformation-Roadmap-for-Companies.pptx
Encapsulation theory and applications.pdf
Chapter 3 Spatial Domain Image Processing.pdf
cuic standard and advanced reporting.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Approach and Philosophy of On baking technology
Review of recent advances in non-invasive hemoglobin estimation
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf

Securing your Container Environment with Open Source

  • 1. @mfdii Michael Ducy, Sysdig, @mfdii Securing your Container Environment with Open Source
  • 2. @mfdii Layers Container Security Infra, Build, Runtime Container Security Challenges Open Source Tools For: - Infra - Build - Runtime Container Security Architecture Agenda
  • 3. @mfdii Layers of Container Security Runtime Build Infrastructure
  • 5. @mfdii Build Image/Software Provenance - Signed Images/Layers - Artifact Signing Vulnerability Management - Upstream OS - Application Vulnerabilities
  • 7. @mfdii Decisions Pushed to Edge Ephemeral Nature of Containers Attack Surface Resource Isolation Challenges of Container Security
  • 9. @mfdii Infrastructure Security Cluster: - RBAC, Security Policies, Affinity Host/Container Runtime: - Seccomp, SELinux, AppArmor, Resource Constraints Network: - Service Mesh, Network Policy, Network Filtering
  • 10. @mfdii Security Policies Security Policies define: - Access to host resources: - Filesystem, Host Network, Namespaces - User/Group of Container - Read Only Filesystem - Linux capabilities available: - http://man7.org/linux/man-pages/man7/capabilities.7.html - Seccomp, AppArmor, or SELinux profiles
  • 11. @mfdii Linux Security Modules SELinux System wide execution policy Apparmor System wide execution policy, focused on processes Seccomp Per process system call isolation
  • 12. @mfdii LSMs $ docker run --security-opt "apparmor=<profile>" $ docker run --security-opt seccomp=/path/to/seccomp/profile.json
  • 13. @mfdii Security Policies apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: name: restricted annotations: seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default' apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default' seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default' apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default' spec: privileged: false # Required to prevent escalations to root. allowPrivilegeEscalation: false # This is redundant with non-root + disallow privilege escalation, # but we can provide it for defense in depth. requiredDropCapabilities: - ALL # Allow core volume types. volumes: - 'configMap' - 'emptyDir' - 'projected' - 'secret' - 'downwardAPI' # Assume that persistentVolumes set up by the cluster admin are safe to use. - 'persistentVolumeClaim' hostNetwork: false
  • 14. @mfdii Container Affinity/Constraints Affinity ensures: - Containers with sensitive data or data processing routines are next scheduled next to other containers Strong labeling schema encouraged/required.
  • 15. @mfdii Kubernetes Pod Affinity apiVersion: v1 kind: Pod metadata: name: with-node-affinity spec: affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/e2e-az-name operator: In values: - e2e-az1 - e2e-az2 preferredDuringSchedulingIgnoredDuringExecution: - weight: 1 preference: matchExpressions: - key: another-node-label-key operator: In values: - another-node-label-value
  • 16. @mfdii Host/Container Runtime Security CIS Benchmarks for Docker Hosts - https://www.cisecurity.org/benchmark/docker/ - Chef’s Inspec to scan for policy violations - https://inspec.io - https://github.com/dev-sec/cis-docker-benchmark - Docker Bench for Security - https://github.com/docker/docker-bench-security
  • 17. @mfdii Networking Standard Firewall Rules/Security Groups - Common exploit point are dashboards or API ports open. Kubernetes: - Network Policies, Container Networking Interface Network Filtering - Kernel level L3/L4/L7 - Cilium - https://cilium.io/
  • 18. @mfdii Cilium apiVersion: "cilium.io/v2" kind: CiliumNetworkPolicy description: "L3-L4 policy to restrict deathstar access to empire ships only" metadata: name: "rule1" spec: endpointSelector: matchLabels: org: empire class: deathstar ingress: - fromEndpoints: - matchLabels: org: empire toPorts: - ports: - port: "80" protocol: TCP
  • 20. @mfdii Cilium apiVersion: "cilium.io/v2" kind: CiliumNetworkPolicy description: "L7 policy to restrict access to specific HTTP call" metadata: name: "rule1" spec: endpointSelector: matchLabels: org: empire class: deathstar ingress: - fromEndpoints: - matchLabels: org: empire toPorts: - ports: - port: "80" protocol: TCP rules: http: - method: "POST" path: "/v1/request-landing"
  • 22. @mfdii Build Security Network Storage Host Cluster App Code App Runtime Libraries OS App Code App Runtime Libraries OS App Code App Runtime Libraries OS Container Runtime
  • 23. @mfdii Build Security Image/Artifact Provenance: - Artifact signing, trusted registries, admittance control Vulnerability Management: - Image scanning, OS libraries, application libraries
  • 24. @mfdii Image Scanning Clair - Static analysis of vulnerabilities in application containers. - Focuses on Operating System packages and libraries - https://github.com/coreos/clair Anchore - Analyzes container images against user defined policies. - https://github.com/anchore
  • 25. @mfdii CoPilot & Openhub CoPilot - Open Source Application Dependency Vulnerability Management - https://copilot.blackducksoftware.com/ - Incorporate into your build process OpenHub - Compare open source project usage, and project health - https://www.openhub.net/
  • 26. @mfdii Notary & Portieris Notary - Signs collections of digital content (Artifacts) - Project from Docker - Docker Content Trust - Implementation of The Update Framework - https://github.com/theupdateframework/ Portieries - Kubernetes Admission controller for enforcing Content Trust - https://github.com/IBM/portieris - https://schd.ws/hosted_files/kccnceu18/41/kubernetes-notary-tuf.pdf - https://www.youtube.com/watch?v=JK70k_B87mw
  • 28. @mfdii Runtime Security Network Storage Host Cluster App Code App Runtime Libraries OS App Code App Runtime Libraries OS App Code App Runtime Libraries OS Container Runtime
  • 29. @mfdii Runtime Security Service/Container Admittance - What’s Allowed to Run/Join a Service Secure Secrets - How do applications authenticate Anomaly Detection - Is my runtime environment being tampered with? Forensics - What happened if something was compromised?
  • 30. @mfdii Service Identity How can you verify a service is who it says it is? SPIFFE - Secure Production Identity Framework For Everyone - Cryptographically verifiable Service IDs - https://github.com/spiffe/spiffe
  • 32. @mfdii Anomaly Detection - Containers are isolated processes. - Processes are “scoped” as to what’s expected. - Container images are immutable, runtime environments often aren’t. - How do you detect “abnormal” behavior.
  • 33. @mfdii Sysdig Falco A behavioral activity monitor •Detects suspicious activity defined by a set of rules •Uses Sysdig’s flexible and powerful filtering expressions With full support for containers/orchestration •Utilizes sysdig’s container & orchestrator support And flexible notification methods •Alert to files, standard output, syslog, programs Open Source •Anyone can contribute rules or improvements
  • 34. @mfdii 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 = create 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)
  • 36. @mfdii Falco Rules 25 common rules available OOTB Focused on common container best practices: ■ Writing files in bin or etc directories ■ Reading sensitive files ■ Binaries being executed other than CMD/ENTRYPOINT
  • 37. @mfdii Falco rules .yaml file containing Macros, Lists, and Rules - macro: bin_dir condition: fd.directory in (/bin, /sbin, /usr/bin, /usr/sbin) - list: shell_binaries items: [bash, csh, ksh, sh, tcsh, zsh, dash] - 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
  • 38. @mfdii Active Security with Falco, NATS, and Kubeless Falco NATS Kubeless Detects abnormal event, Publishes alert to NATS Subscribers receive Falco Alert through NATS Server Kubeless receives Falco Alert, firing a function to delete the offending Kubernetes Pod
  • 39. @mfdii Join the community • Website •http://www.sysdig.org/falco • Public Slack •http://slack.sysdig.com/ •https://sysdig.slack.com/messages/falco • Blog •https://sysdig.com/blog/tag/falco/ • Sysdig Secure •http://sysdig.com/product/secure
  • 40. @mfdii Learn more Github • https://github.com/draios/falco • Pull Requests welcome! Wiki • https://github.com/draios/falco/wiki Docker Hub • https://hub.docker.com/r/sysdig/falco/