Summary

  • Using Docker to gain root access to a host system is possible by leveraging the core Linux kernel features of namespaces and cgroups, which allow Docker to effectively isolate and manage resources for containers.
  • However, when these features are used in conjunction with —privileged mode and mounting the host filesystem, it can give the container “god-mode” levels of access to the host.
  • Although this method is a legitimate Linux feature and is not a Docker vulnerability, it effectively bypasses the intended isolation model of Docker and can corrupt the host system if misused.
  • It is advised to utilise Rootless mode and SELinux/AppArmor to provide an extra layer of security and prevent containers from accessing host paths, even with privileged permissions.
  • Unauthorised access to a company’s device can have severe consequences for security, operations, and compliance, so it is crucial to follow best practices to maintain the integrity of the system.

By Bishal Chapagain

Original Article