sudo apt-get install debootstrap
#Install Ubuntu 18.04 into chroot
mkdir chroot_root
sudo debootstrap --arch amd64 bionic ./chroot_root/
#If you run into this error:
#/usr/sbin/debootstrap: cannot create /media/XXXXX/chroot_root/test-dev-null: #Permission denied
#Try to remount or your block device without noexec and nodev options.
#For example:
#sudo mount -t ext4 -o remount,rw,relatime,uhelper=udisks2 /dev/sda1 /media/MOUNT_POINT
#Or adjust your mount options in "disks"
#Bind nodes:
sudo mount --bind /proc ./chroot_root/proc
sudo mount --bind /dev ./chroot_root/dev
sudo mount --bind /sys ./chroot_root/sys
#ATTENTION: Only run these commands when the dirs are empty.
#Run chroot
sudo chroot ./chroot_root
#Install katoolin
apt update
apt install python git gnupg
git clone https://github.com/LionSec/katoolin.git
cp katoolin/katoolin.py /usr/bin/katoolin
chmod +x /usr/bin/katoolin
katoolin
#Enjoy!
#Backup
sudo tar -czf chroot_root_bak.tar.gz ./chroot_root