Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Build Kali container in LXC
#!/bin/bash
##########################################################################################
# (right now the lxc bridge interface isn't working with this guide)
# (still had to install lxc over this)
# This is for my testing env for building a kali template for LXC
# You may need to install additional packages.
#
##########################################################################################
# Prereqs
sudo apt-get update
sudo apt install -y binfmt-support qemu qemu-user-static bridge-utils \
python3-dev libtool debootstrap autoconf automake \
libcap-dev libcgmanager0 libcgmanager-dev libselinux1-dev\
libapparmor-dev docbook2x git python3-setuptools
# Make & install LXC
git clone https://github.com/binkybear/lxc.git -b kali
cd lxc
./autogen.sh
/configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu --libexecdir=/usr/lib/x86_64-linux-gnu \
--with-rootfs-path=/usr/lib/x86_64-linux-gnu/lxc --sysconfdir=/etc --localstatedir=/var \
--with-config-path=/var/lib/lxc
make && make install
# Template is located @
# /usr/share/lxc/templates/lxc-kali
# Create Kali LXC container
lxc-create -n kali -t kali -- -r kali-rolling
# Start container in background
lxc-start -n kali
# Access kali with console
lxc-console -n kali
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.