/ docker

Quickie: Docker - root

Have you ever gave up solving some server problem and gave temporal non-root access to anybody?
Or shared your hosting with some other person, how is not supposed to run sudo?

If you run Docker, it could be potentially dangerous.

  1. Let's assume you were bothered by always having to type sudo when working with Docker.
    So you added your user to docker group (https://askubuntu.com/questions/477551/how-can-i-use-docker-without-sudo#477554).
  2. You probably don't run only custom images, which use by default non-root user.
  3. And you probably also didn't do ns-mapping of UIDs.

So anybody with access to such your user can run something like:

docker run -it -v /etc:/host/etc alpine:stretch sh

And voila, he now has root access to your /etc directory.

Tags:
#docker #root #sudo

TvK

IT and languages. Feel free to be a grammar-nazi and correct my English (or any other language).

Read More