GNU/Linux ◆ screen-256color ◆ bash 326 views

Container technologies (chroot, LXC, …) are very common these days, especially since the massive adoption of Docker.

One of the use cases of container technologies is to isolate services from each others and from the host system. As a result, in case of an intrusion the attacker is in theory trapped inside a container. From the attacker’s perspective, it is important to be able to detect if a compromised service lives in a restricted environment such as a Docker container or if it runs directly on the host operating system.

When containers are created by a Docker Engine, this last one adds a /.dockerenv file into them. The presence of this file is even used to this date by some underlying components of the Moby project for the exact same purpose, knowing if they run inside a container.

More by skyper

See all