LXE to root
Last updated
Last updated
There is a technique which we can use to get from LXD to root. First of all on our local machine we will have to download alpine and create a compressed file of the alpine image. To do so we can use the following commands.
A tar.gz file will have been created in the same folder. We must upload it to the server as follows. First, let's run the following command on our local machine in the same folder as the tar.gz.
Then download the image to the server:
We replace the tar name with the one that was built on our own system.
Next, run the following commands to get root.
The above commands will import the image and create a privileged container with it. Next, we mount our host file system to the container, so that when we start an sh
shell in the container, we can access the entire host file system /mnt/root
. Finally, we can navigate to /mnt/root/root/
and read root.txt along with login.sql
, which reveals credentials.