Starting point: Included, problem building Alpine

Hello there,

I am currently doing the Included box. Everything is going well until the point that I try to build the lxd Alpine image.

If I try to build. WIth the command: sudo $HOME/go/bin/distrobuilder build-lxd alpine.yaml -o image.release=3.8

I get the following error:

Error: unknown command "build-lxd" for "distrobuilder"

Did you mean this?
        build-lxc

Run 'distrobuilder --help' for usage.
Failed running distrobuilder: unknown command "build-lxd" for "distrobuilder"

Did you mean this?
        build-lxc

So I tried to do it with build-lxc and it will build the image but the exploit doesn’t work that way it will also generate other files then the lxd.tar.xz rootfs.squashfs files that I should upload to the target machine.

Any idea what I am doing wrong or what I could do?

Thank you in advance.

try with another release, 3.9 or some other image

Literally having the same issue all day. I read in one other post that “lxd” is no longer supported or something, and when typing in “./build-alpine”, i get “unsupported architecture: aarch64”. So not sure if it’s an issue because I’m on a Mac host, using Kali as VM?

Not having any success installing an older version of distrobuilder (2.1)

Tried 3.9 image, still nothing.

Still keeping my eyes open but this post is the only one so far that is running to the exact same issue (rather than similar issues in other parts of the box).

** Edit **
I did manage to install Distrobuilder 2.0, which does support build-lxd command. But when trying to proceed with the box, i still get errors. Not sure if it’s some kind of compatibility error?

if you are using apple silicon mac that would be an issue. you need to build for amd64 architecture.
use a docker image to emulate amd64. try with this
docker run -it --rm --privileged --userns=host --platform linux/amd64 kalilinux/kali-rolling
install in container
apt install -y golang-go debootstrap rsync gpg squashfs-tools git make xz-utils
install distrobuilder and build
~/go/bin/distrobuilder build-lxc alpine.yaml -o image.release=3.9
or use pwnbox and if still no success try this…

docker run -it --rm --privileged --userns=host --platform linux/amd64 debian:bullseye
apt install -y golang-go debootstrap rsync gpg squashfs-tools make xz-utils unzip
wget https://github.com/lxc/distrobuilder/archive/refs/tags/distrobuilder-2.0.zip
unzip and make
wget https://raw.githubusercontent.com/lxc/lxc-ci/master/images/alpine.yaml
sed -i 's/incus-agent/lxd-agent/' alpine.yaml
~/go/bin/distrobuilder build-lxd alpine.yaml -o image.release=3.9

I don’t know what prompted you to be so nice to break down every step for me… but using the pwnbox and the commands you provided for it worked AMAZINGLY.

I spent an ungodly amount of time trying to figure it out. I try not to skip it to mimic real world scenario where you can’t just give up on a task. But you also really helped me find out the easiest way to get previous versions of github repositories.

Thank you so much!!!

@Singleday I hope what @hackernotone provided helps you too.

1 Like