/--privileged-exploit

A simple exploit to the --privileged flag in docker

Primary LanguageShell

--privileged-exploit

A simple exploit to the --privileged flag in docker. The script verify if the --privileged flag is set in the container. If so, it tries to exploit mounting the filesystem of the host inside the docker container.

When the --privileged flag is set in Docker, it grants the container unrestricted access to the host system's devices and capabilities. This can include accessing the host's drives, modifying kernel parameters, accessing hardware devices, and more. With privileged access, a container could mount the host's drives and access sensitive data or modify critical system files.

image

Verify if the --privileged flag is set

We can verify if the flag is set by listing the /dev directory and running the `cat /proc/1/status | grep -i "seccomp" ` command.