Linux Privilege Escalation with Groups
Contains the details of the topic Privilege Escalation/Linux/Functionality/Groups.
Docker
A Docker socket is a special file that allows us and processes to communicate with the Docker daemon. This communication is done through a Unix socket or a network socket, depending on the configuration of our Docker setup. It acts as a bridge, facilitating communication between the Docker client and the Docker daemon.
Identify where
docker.sock
is found (usually in/var/run
).Check if you have
docker
group, docker with SUID, docker in sudoers ordocker.sock
is writableIf it is not present on the host, upload docker. Download HERE.
LXD / LXC
Linux Containers (LXC
) is an operating system-level virtualization technique that allows multiple Linux systems to run in isolation from each other on a single host, owning their own processes but sharing the host system kernel for them.
Linux Daemon (LXD
) is similar in some aspects, but it is designed to contain a complete operating system. So it is not an application container, but a system container.
We must be in the lxco
lxd
group.
Initialization
Import images (use those on the system or download alpine)
Display imported list
Start a privileged container with the security.privileged
(root user in the container equal to the root user on the host)
Mount the host file system
Generate a shell within the container instance and explore the host file system.
disk
All access in /dev
, debugfs
to access the entire file system
adm
Read sensitive data in /var/log
, cron jobs running, etc.
Last updated