Skip to content

Instantly share code, notes, and snippets.

@nethunteros
Last active October 18, 2019 16:45
Show Gist options
  • Save nethunteros/182337ed67b606a4735888bde1941b89 to your computer and use it in GitHub Desktop.
Save nethunteros/182337ed67b606a4735888bde1941b89 to your computer and use it in GitHub Desktop.
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
@reyzalhildha
Copy link

#what do you think about this :
#when use ./autogen.sh

#Output:

  • test -d autom4te.cache
  • libtoolize
    ./autogen.sh: 27: ./autogen.sh: libtoolize: not found
  • exit 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment