GNU/Linux ◆ screen-256color ◆ bash 316 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.

On Linux, one of the underlying mechanisms commonly used to create a container is cgroups. The /proc/1/cgroup virtual file will give you the control groups of the init process which are generally / for the majority of the controllers by default. However, if you have a look at /proc/1/cgroup from the inside of a container, the result is likely to be different as you can see in the asciicast.

More by skyper

ProbeQuest - Demo 00:30

by skyper

BSFL - Demo 00:29

by skyper

See all