1. 1. Welcome
  2. 2. Introduction
    1. 2.1. Disclaimer
    2. 2.2. Agenda
  3. 3. Environment Setup
    1. 3.1. Importing Virtual Machines
    2. 3.2. SSH into machines from your host
    3. 3.3. Common troubleshooting steps
    4. 3.4. Internet Check
  4. 4. Getting started with docker
    1. 4.1. docker run
    2. 4.2. Dockerfile
    3. 4.3. docker management
  5. 5. Docker Advanced Concepts
    1. 5.1. docker-compose wordpress
    2. 5.2. docker volumes and networks
    3. 5.3. docker swarm
    4. 5.4. Portainer
  6. 6. Attacking Insecure Volume Mounts
    1. 6.1. Scenario
    2. 6.2. Solution
  7. 7. Learning More
    1. 7.1. Namespaces
    2. 7.2. Capabilities
    3. 7.3. Control Groups
  8. 8. Attacking docker misconfiguration
    1. 8.1. Scenario
    2. 8.2. Solution
  9. 9. Auditing Docker containers and images
    1. 9.1. Docker images and containers
    2. 9.2. Scenario
    3. 9.3. Solution
  10. 10. Auditing Docker networks and volumes
    1. 10.1. Docker volumes and networks
    2. 10.2. Scenario
    3. 10.3. Solution
  11. 11. Docker integrity checks
  12. 12. amicontained
  13. 13. Attacking & Auditing Docker Runtime & Registries
    1. 13.1. Docker runtime endpoints
    2. 13.2. Docker registries
  14. 14. Attacking container capabilities
    1. 14.1. Scenario
    2. 14.2. Solution
  15. 15. Linux Security Module: Apparmor
  16. 16. Attacking swarm cluster secrets
    1. 16.1. Scenario
    2. 16.2. Solution
  17. 17. Attacking private registry images
    1. 17.1. Scenario
    2. 17.2. Solution
  18. 18. Docker Bench security audit
  19. 19. Container Security Monitoring
    1. 19.1. Docker logging
    2. 19.2. Docker Events
    3. 19.3. Sysdig Faclo
  20. 20. Kubernetes Environment Setup
    1. 20.1. Cluster Setup
    2. 20.2. Import VM
    3. 20.3. Configure kubectl
    4. 20.4. Vulnerable Apps
  21. 21. Getting Started with Kubernetes
    1. 21.1. The Illustrated Children's Guide to Kubernetes
    2. 21.2. Introduction to Kubernetes
    3. 21.3. Kubernetes Overview
    4. 21.4. Understanding Kubernetes specific technical terms
    5. 21.5. kubectl usage for pentesters
  22. 22. Deploying simple application in Kubernetes Cluster
    1. 22.1. Using yaml manifest
    2. 22.2. Using helm chart
  23. 23. Scenario-1 - Exploiting Private Registry via Misconfiguration
    1. 23.1. Scenario
    2. 23.2. Solution
    3. 23.3. Discussion
  24. 24. Scenario-2 - Attacking Kubernetes Cluster Metadata using SSRF vulnerability
    1. 24.1. Scenario
    2. 24.2. Solution
    3. 24.3. Discussion
  25. 25. Scenario-3 - Testing for the sensitive configurations and secrets in Kubernetes cluster
    1. 25.1. Scenario
    2. 25.2. Solution
    3. 25.3. Discussion
  26. 26. Scenario-4 - Docker escape using Pod Volume Mounts to access the nodes and host systems
    1. 26.1. Scenario
    2. 26.2. Solution
    3. 26.3. Discussion
  27. 27. Scenario-5 - Attacking applications in different namespaces in Kubernetes cluster
    1. 27.1. Scenario
    2. 27.2. Solution
    3. 27.3. Discussion
  28. 28. Scenario-6 - Attacking Helm tiller without RBAC setup
    1. 28.1. Scenario
    2. 28.2. Solution
    3. 28.3. Discussion
  29. 29. Running kube-bench
  30. 30. Running kubesec
  31. 31. Running kube-hunter
  32. 32. Running kubeaudit
  33. 33. Logging and Monitoring
  34. 34. Automated Security Defense using Sysdig Falco
  35. 35. DEMO's
    1. 35.1. CVE-2018-1002105
    2. 35.2. CVE-2019-5736
    3. 35.3. CVE-2019-9901
  36. 36. Fun Learning About Kubernetes
    1. 36.1. Contained.af
    2. 36.2. Play with Docker
    3. 36.3. Katacoda Docker Security
    4. 36.4. Play with Kubernetes
  37. 37. Popular Attacks
    1. 37.1. Dockerhub 190k accounts
    2. 37.2. Cryptojacking using public docker containers
    3. 37.3. Dockerhub known vulnerable images
    4. 37.4. BSidesSF CTF cluster pwn
    5. 37.5. Shopify metadata to cluster pwn
  38. 38. References & Resources
  39. 39. Terminology Glossary
  40. License

Attacking and Auditing Docker Containers and Kubernetes Clusters

References

  • Docker Security
  • Understanding Docker Security and Best Practices
  • CIS Benchmarks Docker
  • Docker Registry
  • Docker Daemon Configuration
  • Understanding and Hardening Linux Containers
  • Abusing Privileged and Unprivileged Linux Containers
  • Security Assurance of Docker Containers
  • Play with Docker
  • Container Security Notes
  • Katacoda
  • Linux Container Security
  • Docker Cheat Sheet
  • Docker content trust
  • Clair
  • Anchore
  • Vuls
  • Docker Runtime Privileges and Capabilities
  • Privileged Container & Capabilities
  • amicontained repository
  • Apparmor Security Profiles on Docker
  • Seccomp Security Profiles on Docker
  • NodeJS Simple RCE
  • Docker Labs Capabilities
  • Practical SELinux and Containers
  • Container Security Notes gist
  • Containers and Operating systems morning paper gist
  • SSRF Bypasses
  • Kubernetes Docs
  • Kubernetes Security Info
  • Kubernetes Webinar series
  • Kubernetes Network Policies
  • Helm Tiller Attack
  • A tool for exploring each layer in a docker image
  • Container Image Linter for Security