lxd/lxc Group - Privilege escalation
Last updated
Last updated
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE) Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
If you belong to lxd or lxc group, you can become root
You can install in your machine this distro builder: https://github.com/lxc/distrobuilder (follow the instructions of the github):
Upload the files lxd.tar.xz and rootfs.squashfs, add the image to the repo and create a container:
If you find this error Error: No storage pool found. Please create a new storage pool
Run lxd init
and repeat the previous chunk of commands
Finally you can execute the container and get root:
Build an Alpine image and start it using the flag security.privileged=true
, forcing the container to interact as root with the host filesystem.
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE) Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)