1 agenda
play

1 Agenda Docker world Containers VS Virtual machine Security - PowerPoint PPT Presentation

12.03.2019 Docker security 1 Agenda Docker world Containers VS Virtual machine Security concerns Conclusion Whoami M.Sc Computer Security M.Sc Software Development Worked previously as an embedded software developer Actually


  1. 12.03.2019 Docker security 1

  2. Agenda Docker world Containers VS Virtual machine Security concerns Conclusion

  3. Whoami ➔ M.Sc Computer Security ➔ M.Sc Software Development ➔ Worked previously as an embedded software developer ➔ Actually working at ImmunIT ➔ Pentesting ➔ Secure coding training ➔ Security awareness training ➔ Social Engineering ➔ Project Management ➔ R&D developer

  4. Docker security 4

  5. What is docker? Containerization Operating-system-level virtualization Execution environment virtualization

  6. What is docker?

  7. What is docker?

  8. What is docker?

  9. Why using docker? ➔ Isolate services ➔ Simplify micro-services enhancement and maintenance ➔ Avoid dependency issues ➔ Allow to execute untrusted code safely ➔ Reduce risks involved by a compromise ➔ etc

  10. How it works?

  11. Docker basics

  12. Dockerfile & docker-compose Dockerfile ➔ Defines a docker image

  13. Dockerfile & docker-compose Docker-compose ➔ Defines a containers stack ➔ Overwrite Dockerfile behaviors

  14. Orchestration ➔ Automates image buildings ➔ Automates deployment ➔ Resilient ➔ Macro management ➔ Live metrics

  15. Orchestration Orchestrators

  16. Orchestration Registry & rancher

  17. Orchestration Rancher overview

  18. Orchestration Rancher overview

  19. Orchestration Rancher overview

  20. Containers VS Virtual Machine The millennial war Docker security 20

  21. Containers VS Virtual Machine Virtual Machine! Containers!

  22. Containers VS Virtual Machine

  23. Containers VS Virtual Machine

  24. Security concerns Docker security 24

  25. Kernel namespace ➔ Containers process are running in their own kernel namespace ➔ Provides segregation ➔ Decreases risk exposure ➔ Containers get their own network stack

  26. User namespace ➔ Best way to prevent privilege escalation attack ➔ Configured on the host level ➔ Prevent root usage

  27. Tools Docker notary ➔ Verify image signature ➔ Ensure integrity ➔ Avoid backdoors ➔ Cross platform

  28. Tools Docker notary

  29. Tools Docker bench security

  30. Tools Traefik

  31. Tools CoreOS

  32. Tools Dockscan

  33. Container hardening & Access Control Management

  34. Container hardening & Access Control Management Seccomp

  35. Container hardening & Access Control Management SE Linux

  36. Container hardening & Access Control Management App Armor

  37. Flags Volume vs mount vs tmpfs

  38. Flags Winner is volume ➔ Easier to back up ➔ Can be managed through the docker CLI ➔ Cross-platform ➔ Safe sharing ➔ Remote volume ➔ Data encryption (LVM, LUKS)

  39. Flags Winner is volume ➔ Avoid mounting sensitive folder ➔ Use ro flag when needed

  40. Flags Privileged container ➔ Privileged container run as a proper OS --privileged is evil ➔ Can modify interfaces / iptables ➔ Access host devices

  41. Flags Security opt

  42. Flags Network namespace

  43. Flags Network namespace ➔ Use dedicated networks ➔ Isolate containers on separated networks ➔ Create networks for exposed containers ➔ Segregate and segment networks as your own internal network

  44. Ports exposure ➔ Control services exposure ➔ Do not expose unnecessary ports

  45. Ports exposure EXPOSE keyword is overwritten by – p flag at runtime Docker run – rm – it – p 0.0.0.0:1337:80 alpine Docker run – rm – it – p 127.0.0.1:1337:80 alpine

  46. How to avoid Denial of Service attack

  47. How to avoid Denial of Service attacks By default, a container has no resource constraints and can use as much of a given resource as the hosts’s kernel scheduler will allow

  48. How to avoid Denial of Service attacks Memory usage

  49. How to avoid Denial of Service attacks CPU usage

  50. Conclusion Docker security 50

  51. Best practices ➔ Harden your containers ➔ Isolate your containers ➔ Keep up to date the underlying operating system ➔ Use security tool to monitor your containers

  52. Conclusion Consider your containers as any physical machine and ensure their compliance towards your company security policies

  53. Docker security 53

  54. QUESTIONS ? Docker security 54

Recommend


More recommend