Hack Forums
Using Kali Tools (or other specialized distros) on Other Distros - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45)
+--- Forum: Grayhat • Purple Team • Hybrid Security (https://hackforums.net/forumdisplay.php?fid=449)
+---- Forum: Beginner Hacking (https://hackforums.net/forumdisplay.php?fid=4)
+----- Forum: Hacking Tutorials (https://hackforums.net/forumdisplay.php?fid=47)
+----- Thread: Using Kali Tools (or other specialized distros) on Other Distros (/showthread.php?tid=6288556)



Using Kali Tools (or other specialized distros) on Other Distros - DramaKing - Dec 31, 2024

We know that there are plenty of ways for hackers and pentesters to use Kali's excellent suite of prepackaged tools. There's virtualization, containerization, USB boot, WSL, etc. But one simple way is to download an ISO, mount it, mount the filesystem, copy everything to a directory, and chroot into it.

First of all, download the ISO and mount it to a loop device.

Code
sudo mkdir /mnt/iso
sudo mount -t iso9660 -o loop kali-linux-2024.4-installer-amd64.iso /mnt/iso

Install package for working with compressed filesystems.

Code
sudo apt install squashfs-tools

Mount squashfs.

Code
mkdir /tmp/kali
sudo mount --type="squashfs" --options="loop" --source="/mnt/iso/live/filesystem.squashfs" --target="/tmp/kali"
Copy files from mounted squashfs and preserve permissions.

Code
mkdir ~/rootfs
sudo cp -rp /tmp/kali ~/rootfs

Jail yourself in the chroot.

Code
~/rootfs/kali
sudo mount --bind /dev $dir/dev
sudo mount --bind /proc $dir/proc
sudo mount --bind /sys $dir/sys
sudo chroot $dir

You can now run Kali commands in a kernel virtualized environment.

#XmasOrnament2024