SlideShare a Scribd company logo
APP SEC IN THE TIME OF
DOCKER CONTAINERS
Akash Mahajan - Director Appsecco
C0C0N 2016
SOMETHING ABOUT ME
➤ Director of Appsecco
➤ Appsecco is a specialist application security company
➤ Author of ‘Burp Suite Essentials’
➤ Burp Suite is the most popular software for security testing applications
➤ Community Champion
➤ OWASP Bangalore Chapter Leader
➤ n|u Co-Founder and Community Manager
➤ Co-Trainer of Xtreme Web Hacking Class
➤ Links
➤ @makash | https://linkd.in/webappsecguy | akashm.com
“There is space for only 5 types of security
approaches in this world
-Said no one ever
HOW WE DO APPSEC CURRENTLY?
AUTOMATED WEB APPLICATION SCANNERS
BUG BOUNTY BEGINNERS - WIN SOME - LOSE SOME
BUG BOUNTY/PENTESTERS & EXPERTS MAKE IT LOOK SIMPLE
SECURITY TESTERS PLOD AWAY USING CHECKLISTS & TOOLS
WHAT IS A DOCKER CONTAINER?
A DOCKER CONTAINER?
➤ A container allows a developer
to package up and application
and all of its dependent parts
in a box
➤ This box is basically an
isolated environment and the
application has everything it
needs to run inside of this
environment
CONTAINERS ARE COMING
A value of 100 is the peak popularity for a term
DOCKER IN GOOGLE TRENDS SINCE JUL 2013-PRESENT
IF THE DRY GRAPH WASN’T ENOUGH TO CONVINCE YOU
“Why has this change to docker
become imminent?
-Me, when I started noticing how quickly
the developer world was moving to docker
REPEAT AFTER ME
DEVELOPER PRODUCTIVITY
DEVELOPER PRODUCTIVITY
DEVELOPER PRODUCTIVITY
“Regardless of how much security
folks think their opinion matters,
most of the developers don’t give a
fish about what we think
- Akash Mahajan, learning the truth the
hard way
THIS IS WHAT DEVELOPERS WANT - AN IT FREE WORLD
Attribution pending. Will update the slides once I know where I nicked this from!
BUT ISN’T THIS JUST LIKE CHROOT?
INSTALLING MUTILLIDAE (PHP+APACHE+MYSQL APP)
“If a developer has to choose between
being productive or being secure,
more or less she/he will chose being
productive
- Something I should have said!
WHAT CAN WE DO NOW TO GET ON THE BANDWAGON?
➤ Depends on how you do application security
➤ For testing applications
➤ We usually need the setup running somewhere (testing)
➤ Being able to get the complete setup by just running a
simple command, makes all of us “productive”
➤ For secure development
➤ Pre-configured dockerfiles with selective containers which
allow for secure configuration by default
➤ For secure operations
➤ Running docker in secured, isolated instances
DOES DOCKER PROVIDE ISOLATION FROM THE HOST?
➤ Yes if you practice defence in depth
➤ Follow the CIS Docker Benchmark to get a checklist of things
to do on
➤ Host Configuration (15 list items)
➤ Docker Daemon Configuration (13 list items)
➤ Files, Permissions and configuration files for Docker
Daemon (20 list items)
➤ Container Images (5 list items)
➤ Container Runtime (25 list items)
➤ Follow Docker Security Operations Best Practices
DOCKER HOST AND CONTAINER SECURITY GETTING STARTED
Start by reading Understanding docker security and best practices
https://blog.docker.com/2015/05/understanding-docker-security-and-
best-practices/
Use the Docker Bench Security script to automatically check best
practices as outlined by the CIS Docker Benchmark version 1.11 https://
github.com/docker/docker-bench-security
Play this awesome game to break out of docker containers in your
browser https://contained.af/
Read the full CIS Docker 1.11.0 Benchmark report https://
benchmarks.cisecurity.org/tools2/docker/
CIS_Docker_1.11.0_Benchmark_v1.0.0.pdf
Definitely read if you plan to run docker in prod or are guiding someone
who does http://container-solutions.com/is-docker-safe-for-production/
NEW TOOLS, APPROACHES AND OPPORTUNITIES
The configuration for docker containers will need to be
tested in a continuous manner
Auditing of existing deployments against security
benchmarks like the CIS Docker Benchmark
Following agile practices, dockers build built using CI/CD
tools like Jenkins based on pre-commit and post-commit hooks
Bring in your SAST, DAST, *ST analysis at any point in this
pipeline
Setting up and managing private registries
Also setting up private repositories for nom etc.
TO START WITH, THIS IS WHAT YOU SHOULD DO
Test the application as you normally would
If you find appsec issues report these
Do white box assessment with the docker security checklists
You already have a roadmap as mentioned in slide 21 & 22
Keep track of any privilege escalation bugs in docker daemon
or the underlying hypervisor/VM tech you are using
Understand what is the software supply chain for the
application & pick secure alternatives for orchestration itself
Application containers make it simple for everyone so use
them for training, best practices etc.
DOCKER FAILS
Couple of #devoops moments
TWITTER’S VINE SOURCE CODE DUMP BY @AVICODER
➤ @avicoder a bug bounty hunter, he spoke about this bug at a null/
OWASP/G4H Bangalore meet in June 2016
➤ He found an interesting sub domain for Vine ( A twitter video app)
➤ He had stumbled upon a private docker registry being used
➤ He realised that the version being used didn’t use any
authentication and by querying the API he determined the docker
files being hosted
➤ He did a docker pull of an image that contained the source code for
the Vine App and got $$$$$ bounty
➤ https://avicoder.me/2016/07/22/Twitter-Vine-Source-code-dump/
DOCKER IMAGE INSECURITY
➤ This has been fixed now! Especially from docker version 1.10
➤ Earlier if an image had been compressed with xz (in C so not
safety for memory)
➤ Docker Daemon would exec the xz binary as root user
➤ If there was a single vulnerability in xz, a docker pull could
result in complete compromise
➤ Read more about the vulnerability https://titanous.com/
posts/docker-insecurity
➤ Read more about how this was fixed https://titanous.com/
posts/docker-insecurity
QUESTIONS
@makash | https://linkd.in/webappsecguy | akashm.com

More Related Content

PDF
Embacing service-level-objectives of your microservices in your Cl/CD
PDF
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
PPTX
What it feels like to live in a Security Enabled DevOps World
PDF
Hybrid Cloud Networking
PDF
Hacking into your containers, and how to stop it!
PDF
Red Hat multi-cluster management & what's new in OpenShift
PDF
Policy as code what helm developers need to know about security
PDF
Rugged DevOps: Bridging Security and DevOps
Embacing service-level-objectives of your microservices in your Cl/CD
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
What it feels like to live in a Security Enabled DevOps World
Hybrid Cloud Networking
Hacking into your containers, and how to stop it!
Red Hat multi-cluster management & what's new in OpenShift
Policy as code what helm developers need to know about security
Rugged DevOps: Bridging Security and DevOps

What's hot (20)

PDF
Building security into the pipelines
PDF
Redefining cloud native debugging
PDF
The Future of Security and Productivity in Our Newly Remote World
PDF
Don’t have a Meltdown! Practical Steps for Defending Your Apps
PDF
DevOps Spain 2019. Beatriz Martínez-IBM
PPTX
Secure your applications with Azure AD and Key Vault
PDF
Practical Guide to Securing Kubernetes
PPTX
Thinking about Jenkins Security
PPTX
10 tips for Cloud Native Security
PDF
(SACON) Madhu Akula - Automated Defense Using Cloud Service Aws, Azure, Gcp
PDF
Terrascan - Cloud Native Security Tool
PDF
Webinar: Introduction to CloudBees Jenkins Platform
PDF
Introduction to the DevNet Sandbox and IVT
PDF
Networking in Docker EE 2.0 with Kubernetes and Swarm
PDF
DCSF 19 Mitigating Legacy Windows Operating System Vulnerabilities with Docke...
PDF
Shifting security left simplifying security for k8s open shift environments
PDF
DevSecCon Lightning 2021- Container defaults are a hackers best friend
PPTX
AWS Security Strategy
PDF
Secure your Application with Google cloud armor
PDF
Enterprise Java on Azure: From Java EE to Spring, we have you covered
Building security into the pipelines
Redefining cloud native debugging
The Future of Security and Productivity in Our Newly Remote World
Don’t have a Meltdown! Practical Steps for Defending Your Apps
DevOps Spain 2019. Beatriz Martínez-IBM
Secure your applications with Azure AD and Key Vault
Practical Guide to Securing Kubernetes
Thinking about Jenkins Security
10 tips for Cloud Native Security
(SACON) Madhu Akula - Automated Defense Using Cloud Service Aws, Azure, Gcp
Terrascan - Cloud Native Security Tool
Webinar: Introduction to CloudBees Jenkins Platform
Introduction to the DevNet Sandbox and IVT
Networking in Docker EE 2.0 with Kubernetes and Swarm
DCSF 19 Mitigating Legacy Windows Operating System Vulnerabilities with Docke...
Shifting security left simplifying security for k8s open shift environments
DevSecCon Lightning 2021- Container defaults are a hackers best friend
AWS Security Strategy
Secure your Application with Google cloud armor
Enterprise Java on Azure: From Java EE to Spring, we have you covered
Ad

Viewers also liked (20)

PPTX
Security in the cloud Workshop HSTC 2014
PPTX
Security Issues in Cloud Computing
PPTX
Cloud computing security issues and challenges
PPTX
Hybrid Cloud Computing - Seccurity Aspects and Challanges
PPT
Startups Security
PPTX
What is cloud ?
PPTX
Cloud Security Issues 1.04.10
PPTX
OWASP AppSec EU - SecDevOps, a view from the trenches - Abhay Bhargav
PPTX
DataSploit - Tool Demo at Null Bangalore - March Meet.
PPTX
AWS Survival Guide
PPTX
Burp Suite Starter
PPTX
DevSecCon Asia 2017 Shannon Lietz: Security is Shifting Left
PPTX
Antifragile, Microservices and DevOps - A Study
PPT
Security Issues of Cloud Computing
PPTX
The Journey to DevSecOps
PDF
Cloud Security - Security Aspects of Cloud Computing
PPTX
Security as Code owasp
PPTX
Cloud Security Essentials 2.0 at RSA
PPTX
Finding Security a Home in a DevOps World
PPTX
DevOOPS: Attacks and Defenses for DevOps Toolchains
Security in the cloud Workshop HSTC 2014
Security Issues in Cloud Computing
Cloud computing security issues and challenges
Hybrid Cloud Computing - Seccurity Aspects and Challanges
Startups Security
What is cloud ?
Cloud Security Issues 1.04.10
OWASP AppSec EU - SecDevOps, a view from the trenches - Abhay Bhargav
DataSploit - Tool Demo at Null Bangalore - March Meet.
AWS Survival Guide
Burp Suite Starter
DevSecCon Asia 2017 Shannon Lietz: Security is Shifting Left
Antifragile, Microservices and DevOps - A Study
Security Issues of Cloud Computing
The Journey to DevSecOps
Cloud Security - Security Aspects of Cloud Computing
Security as Code owasp
Cloud Security Essentials 2.0 at RSA
Finding Security a Home in a DevOps World
DevOOPS: Attacks and Defenses for DevOps Toolchains
Ad

Similar to App sec in the time of docker containers (20)

PDF
Docker Containers Security
PDF
Justin Cormack - The 10 Container Security Tricks That Will Help You Sleep At...
PDF
Dockercon 2015 - Faster Cheaper Safer
PPTX
Docker Docker - Docker Security - Docker
PDF
Why Should Developers Care About Container Security?
PDF
ATO 2022 - Why should devs care about container security.pdf
PDF
Container Stranger Danger - Why should devs care about container security
PDF
Python Web Conference 2022 - Why should devs care about container security.pdf
PPTX
Container security Familiar problems in new technology
PDF
DockerCon SF 2015: Faster, Cheaper, Safer
PDF
Container Security
PDF
How Secure Is Your Container? ContainerCon Berlin 2016
PPTX
Docker Container Security - A Network View
PDF
Container Security: How We Got Here and Where We're Going
PDF
Docker?!?! But I'm a SysAdmin
PDF
Why should developers care about container security?
PDF
Securing Containers From Day One | null Ahmedabad Meetup
PDF
Securing Containers From Day One | null Ahmedabad Meetup
PDF
Containers & CaaS
PDF
Docker London: Container Security
Docker Containers Security
Justin Cormack - The 10 Container Security Tricks That Will Help You Sleep At...
Dockercon 2015 - Faster Cheaper Safer
Docker Docker - Docker Security - Docker
Why Should Developers Care About Container Security?
ATO 2022 - Why should devs care about container security.pdf
Container Stranger Danger - Why should devs care about container security
Python Web Conference 2022 - Why should devs care about container security.pdf
Container security Familiar problems in new technology
DockerCon SF 2015: Faster, Cheaper, Safer
Container Security
How Secure Is Your Container? ContainerCon Berlin 2016
Docker Container Security - A Network View
Container Security: How We Got Here and Where We're Going
Docker?!?! But I'm a SysAdmin
Why should developers care about container security?
Securing Containers From Day One | null Ahmedabad Meetup
Securing Containers From Day One | null Ahmedabad Meetup
Containers & CaaS
Docker London: Container Security

More from Akash Mahajan (15)

PDF
On Writing Well - A talk given at WinjaBlogs Session
PPTX
Venom vulnerability Overview and a basic demo
ODP
INCOMPLETE - OUTLINE for RootConf 2014 - The little-servcie-which-wasn't-there
PPTX
The real incident of stealing a droid app+data
PPTX
Believe It Or Not SSL Attacks
PPTX
I haz your mouse clicks and key strokes
PPTX
Hackers versus Developers and Secure Web Programming
PPTX
Secure HTTP Headers c0c0n 2011 Akash Mahajan
PPTX
Php security
PPTX
Secure passwords-theory-and-practice
PDF
Top 10 web application security risks akash mahajan
PDF
Web application security
PPTX
Web application security
PPTX
Web application security
PPTX
Secure Programming In Php
On Writing Well - A talk given at WinjaBlogs Session
Venom vulnerability Overview and a basic demo
INCOMPLETE - OUTLINE for RootConf 2014 - The little-servcie-which-wasn't-there
The real incident of stealing a droid app+data
Believe It Or Not SSL Attacks
I haz your mouse clicks and key strokes
Hackers versus Developers and Secure Web Programming
Secure HTTP Headers c0c0n 2011 Akash Mahajan
Php security
Secure passwords-theory-and-practice
Top 10 web application security risks akash mahajan
Web application security
Web application security
Web application security
Secure Programming In Php

Recently uploaded (20)

PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Approach and Philosophy of On baking technology
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Electronic commerce courselecture one. Pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Cloud computing and distributed systems.
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Modernizing your data center with Dell and AMD
PDF
cuic standard and advanced reporting.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Approach and Philosophy of On baking technology
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Electronic commerce courselecture one. Pdf
Network Security Unit 5.pdf for BCA BBA.
The Rise and Fall of 3GPP – Time for a Sabbatical?
Advanced methodologies resolving dimensionality complications for autism neur...
Cloud computing and distributed systems.
MYSQL Presentation for SQL database connectivity
20250228 LYD VKU AI Blended-Learning.pptx
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Modernizing your data center with Dell and AMD
cuic standard and advanced reporting.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
GamePlan Trading System Review: Professional Trader's Honest Take
Spectral efficient network and resource selection model in 5G networks
NewMind AI Weekly Chronicles - August'25 Week I
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Per capita expenditure prediction using model stacking based on satellite ima...
Diabetes mellitus diagnosis method based random forest with bat algorithm

App sec in the time of docker containers

  • 1. APP SEC IN THE TIME OF DOCKER CONTAINERS Akash Mahajan - Director Appsecco C0C0N 2016
  • 2. SOMETHING ABOUT ME ➤ Director of Appsecco ➤ Appsecco is a specialist application security company ➤ Author of ‘Burp Suite Essentials’ ➤ Burp Suite is the most popular software for security testing applications ➤ Community Champion ➤ OWASP Bangalore Chapter Leader ➤ n|u Co-Founder and Community Manager ➤ Co-Trainer of Xtreme Web Hacking Class ➤ Links ➤ @makash | https://linkd.in/webappsecguy | akashm.com
  • 3. “There is space for only 5 types of security approaches in this world -Said no one ever
  • 4. HOW WE DO APPSEC CURRENTLY?
  • 6. BUG BOUNTY BEGINNERS - WIN SOME - LOSE SOME
  • 7. BUG BOUNTY/PENTESTERS & EXPERTS MAKE IT LOOK SIMPLE
  • 8. SECURITY TESTERS PLOD AWAY USING CHECKLISTS & TOOLS
  • 9. WHAT IS A DOCKER CONTAINER?
  • 10. A DOCKER CONTAINER? ➤ A container allows a developer to package up and application and all of its dependent parts in a box ➤ This box is basically an isolated environment and the application has everything it needs to run inside of this environment
  • 11. CONTAINERS ARE COMING A value of 100 is the peak popularity for a term DOCKER IN GOOGLE TRENDS SINCE JUL 2013-PRESENT
  • 12. IF THE DRY GRAPH WASN’T ENOUGH TO CONVINCE YOU
  • 13. “Why has this change to docker become imminent? -Me, when I started noticing how quickly the developer world was moving to docker
  • 14. REPEAT AFTER ME DEVELOPER PRODUCTIVITY DEVELOPER PRODUCTIVITY DEVELOPER PRODUCTIVITY
  • 15. “Regardless of how much security folks think their opinion matters, most of the developers don’t give a fish about what we think - Akash Mahajan, learning the truth the hard way
  • 16. THIS IS WHAT DEVELOPERS WANT - AN IT FREE WORLD Attribution pending. Will update the slides once I know where I nicked this from!
  • 17. BUT ISN’T THIS JUST LIKE CHROOT?
  • 19. “If a developer has to choose between being productive or being secure, more or less she/he will chose being productive - Something I should have said!
  • 20. WHAT CAN WE DO NOW TO GET ON THE BANDWAGON? ➤ Depends on how you do application security ➤ For testing applications ➤ We usually need the setup running somewhere (testing) ➤ Being able to get the complete setup by just running a simple command, makes all of us “productive” ➤ For secure development ➤ Pre-configured dockerfiles with selective containers which allow for secure configuration by default ➤ For secure operations ➤ Running docker in secured, isolated instances
  • 21. DOES DOCKER PROVIDE ISOLATION FROM THE HOST? ➤ Yes if you practice defence in depth ➤ Follow the CIS Docker Benchmark to get a checklist of things to do on ➤ Host Configuration (15 list items) ➤ Docker Daemon Configuration (13 list items) ➤ Files, Permissions and configuration files for Docker Daemon (20 list items) ➤ Container Images (5 list items) ➤ Container Runtime (25 list items) ➤ Follow Docker Security Operations Best Practices
  • 22. DOCKER HOST AND CONTAINER SECURITY GETTING STARTED Start by reading Understanding docker security and best practices https://blog.docker.com/2015/05/understanding-docker-security-and- best-practices/ Use the Docker Bench Security script to automatically check best practices as outlined by the CIS Docker Benchmark version 1.11 https:// github.com/docker/docker-bench-security Play this awesome game to break out of docker containers in your browser https://contained.af/ Read the full CIS Docker 1.11.0 Benchmark report https:// benchmarks.cisecurity.org/tools2/docker/ CIS_Docker_1.11.0_Benchmark_v1.0.0.pdf Definitely read if you plan to run docker in prod or are guiding someone who does http://container-solutions.com/is-docker-safe-for-production/
  • 23. NEW TOOLS, APPROACHES AND OPPORTUNITIES The configuration for docker containers will need to be tested in a continuous manner Auditing of existing deployments against security benchmarks like the CIS Docker Benchmark Following agile practices, dockers build built using CI/CD tools like Jenkins based on pre-commit and post-commit hooks Bring in your SAST, DAST, *ST analysis at any point in this pipeline Setting up and managing private registries Also setting up private repositories for nom etc.
  • 24. TO START WITH, THIS IS WHAT YOU SHOULD DO Test the application as you normally would If you find appsec issues report these Do white box assessment with the docker security checklists You already have a roadmap as mentioned in slide 21 & 22 Keep track of any privilege escalation bugs in docker daemon or the underlying hypervisor/VM tech you are using Understand what is the software supply chain for the application & pick secure alternatives for orchestration itself Application containers make it simple for everyone so use them for training, best practices etc.
  • 25. DOCKER FAILS Couple of #devoops moments
  • 26. TWITTER’S VINE SOURCE CODE DUMP BY @AVICODER ➤ @avicoder a bug bounty hunter, he spoke about this bug at a null/ OWASP/G4H Bangalore meet in June 2016 ➤ He found an interesting sub domain for Vine ( A twitter video app) ➤ He had stumbled upon a private docker registry being used ➤ He realised that the version being used didn’t use any authentication and by querying the API he determined the docker files being hosted ➤ He did a docker pull of an image that contained the source code for the Vine App and got $$$$$ bounty ➤ https://avicoder.me/2016/07/22/Twitter-Vine-Source-code-dump/
  • 27. DOCKER IMAGE INSECURITY ➤ This has been fixed now! Especially from docker version 1.10 ➤ Earlier if an image had been compressed with xz (in C so not safety for memory) ➤ Docker Daemon would exec the xz binary as root user ➤ If there was a single vulnerability in xz, a docker pull could result in complete compromise ➤ Read more about the vulnerability https://titanous.com/ posts/docker-insecurity ➤ Read more about how this was fixed https://titanous.com/ posts/docker-insecurity