Skip to content

Mount Breakout

yanivyakobovich edited this page Jan 17, 2022 · 1 revision

Requirements:

  1. Running as root in the container, also in the host. By default docker container runs with the same user NS, if the container is running in a different user NS then the root must be mapped to root. If the running user is not Root then the device must have a user option within the /etc/fstab in the root file system device, otherwise, only the root will be able to mount the device
  2. CAP_SYS_ADMIN which allow the mount syscall
  3. Root file system device mounted within the container

Exploit:

  1. Find the root file system device
  2. Mount the device in the container
Clone this wiki locally