[TuT] Kali Linux Installation Tutorial - HDD, USB, VM, RPi & VPS
Posted 09-07-2022, 04:53 PM
![[Image: mfuNoEa.png]](https://i.imgur.com/mfuNoEa.png)
![[Image: zsBn6iI.gif]](https://i.imgur.com/zsBn6iI.gif)
![[Image: gXRamuy.gif]](https://i.imgur.com/gXRamuy.gif)
Introduction to Kali Linux
The Linux distribution every hacker needs in their life.
The Linux distribution every hacker needs in their life.
![[Image: Khsq7Hx.jpg]](https://i.imgur.com/Khsq7Hx.jpg)
I.) Introduction
Kali Linux (formerly known as BackTrack Linux) is a Debian-derived Linux distribution designed for digital forensics and penetration testing. It is maintained and funded by Offensive Security, the maintainer of the ExploitDB vulnerability database. Kali Linux is specifically geared to meet the requirements of professional penetration testing and security auditing.
Kali Linux is geared towards various information security tasks, such as penetration testing, security research, computer forensics and reverse engineering. You can run Kali Linux on your local HDD, on an external bootable USB, a virtual machine - or better yet on a Raspberry Pi or RDP/VPS. You can find your respective version on at https://www.kali.org/get-kali/ we'll be covering tutorials on all fronts for installation
II.) System Requirements
Kali Linux requires:
- A minimum of 20GB hard disk space for installation depending on the version, Version 2020.2 requires at least 20GB.
- A minimum of 2GB RAM for i386 and AMD64 architectures.
- A bootable CD-DVD drive or a USB stick.
- A minimum of an Intel Core i3 or an AMD E1 processor for good performance.
We recommend going with around 8GB of RAM and at least 40GB of disk space while installing Kali. You may require more disk space if you intend on storing large files, such as wordlists or hash lists.
III.) Local HDD Installation Tutorial
- Download the 32-bit or 64-bit ISO files from the Kali website, and proceed to either burn the ISO to a DVD or a flash drive.
- Proceed to boot via your installation medium to initiate the setup. Select "graphical install" for a GUI-enabled installation.
- Proceed to select your language, location, keyboard mode. You will then be prompted to enter your hostname, domain name and username.
- After you're finalized these, you should be prompted to configure your root password
- You should now be prompted regarding disk partition options. For this tutorial, we shall continue with "Guided - use entire disk"
- You will have to select a local disk that will serve as the main partition for your Kali Linux installation.
- Proceed with the option to "Place all files in the same partition" and finish partitioning.
- Your OS should be installing right now.
- Once you are done with the setup, you should be prompted for further networking options such as proxied communication. If you aren't using a proxy, I recommend skipping this part.
- The final prompt should be the GRUB boot loader installation, proceed by installing it to the master boot record.
- The system will automatically restart and you should be able to access Kali Linux after that.
IV.) External USB Installation Tutorial
- For USBs, Kali Linux “Live” is the default version for operating Kali out of an external USB. However, we will need to enable persistence - the preservation of data on the “Kali Live” USB drive - across reboots of Kali Live.
- With active persistence, you should be able to retain data across different systems as you operate your portable version of Kali Linux from your flash drive.
- To get started with the setup, insert the USB flash drive you'll be installing Kali Linux on. Make sure it's over 8GB in size, preferably 16-32GB. Use a USB 3.0 port for faster read/write speeds.
- Use a tool such as Rufus or Win32 Disk Imager to write the ISO file to your USB. Make sure to select FAT32 as the file system (check the screenshots below).
- Make sure UEFI mode is disabled within the BIOS.
- Install MiniTool Partition Wizard. We will be requiring this tool within the tutorial.
- Locate your USB within Partition Wizard and create a partition within the USB drive.
- Use the following information while making this partition:
Partition Label: Persistence
Create As: Primary
File System: Ext3
- Our final step will involve enabling persistence for our Kali Linux Live instance to be setup, for which, you will need to reboot and boot into your USB.
- Use the following commands to recreate the persistence partition you just created:
Codefdisk -l
mkfs.ext3 -L persistence /dev/sd3
e2label /dev/sd3 persistence
mkdir -p /mnt/my_usb
mount /dev/sd3/mnt/my_usb
- To conclude, add a config file to temporarily store your data and reboot your OS.
Codeecho "/union"> /mnt/my_usb/persistence.conf
umount/dev/sd3&&reboot
- You should be able to access the "Live USB Persistence" mode on Kali Linux Live and operate Kali Linux from your USB drive.
V.) Virtual Machine Installation Tutorial
- Download the latest ISO for Kali Linux VM installations from their website.
- For this tutorial we shall be using Oracle VM VirtualBox but you can use other tools such as VMWare or Citrix DaaS too. Proceed to "Create" a new VM instance
- Once you type "Kali Linux", VMWare will automatically recognize the distribution and autofill the Type & Version by itself.
- Allocate anywhere between 2GB (minimum) to 8GB RAM to your VM. You can allocate more if you have more RAM available.
- Choose to create a new virtual hard disk. You will be prompted for the filetype right after that.
- You can select a fixed or dynamically allocated hard disk storage for your VM as per your personal preference. The fixed format will instantly reserve the specified size on your hard disk while the dynamic format will grow gradually as your data piles up.
- Make sure to allocate a minimum of 20GB to your installation. It's recommended to go with a higher size such as 30-40GB if you intend on using it often.
- Your VM is created. We have one final change before we boot up the VM, head over to "Network" settings and select "Move All" for Promiscuous Mode.
- Open your VM and select your ISO file as the start-up disk.
- You will be greeted by the Kali Linux boot menu. From here, the steps involved shall remain similar to the Local HDD Installation Tutorial. Kindly refer to Section III.) of this thread.
VI.) Linux VPS Installation Tutorial
- You can easily install Kali Linux on common Linux distributions such as Debian or Ubuntu. Within this tutorial, I shall illustrate how to install Kali Linux within your Linux VPS within minutes. This works perfectly combined with the free Azure VPS tutorial I've posted a few days ago.
- After you acquire your Debian/Ubuntu VPS, we will proceed by updating it and installing the latest Kali live-build packages. Run the following commands:
Codesudo apt update
sudo apt -y upgrade
wget https://http.kali.org/pool/main/k/kali-archive-keyring/kali-archive-keyring_2022.1_all.deb
wget https://http.kali.org/pool/main/l/live-build/live-build_20210216kali1_all.deb
sudo apt -y install git live-build cdebootstrap debootstrap curl
sudo dpkg -i kali-archive-keyring_2022.1_all.deb
sudo dpkg -i live-build_20210216kali1_all.deb
cd /usr/share/debootstrap/scripts/ (echo "default_mirror http://http.kali.org/kali"; sed -e "s/debian-archive-keyring.gpg/kali-archive-keyring.gpg/g" sid) > kali sudo ln -s kali kali-rolling cd ~ git clone git://gitlab.com/kalilinux/build-scripts/live-build-config.git cd live-build-config/
- After the live-build packages have been installed and assuming your versions are correct, we will proceed to build the required ISO.
Codesudo ./build.sh --variant light --verbose
sudo apt -y install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils sudo adduser $(id -un) kvm newgrp kvm
qemu-img create -f qcow2 kali-disk.img 100G kvm --name Kali -m 1024 -hda kali-disk.img -cdrom kali-linux-light-rolling-amd64.iso -boot d
- You should be greeted by the familiar Kali Linux boot menu on via QEMU Disk Image Utility:
Codehttps://i.imgur.com/kxG5qLE.png
- Proceed with the same steps as explained within Section III.) of this thread.
- Once you are done with installation, you can boot up Kali Linux on your VPS by using the following command:
Codekvm --name Kali -m 1024 -hda kali-disk.img -boot c
VII.) Raspberry Pi Installation Tutorial
- Download the Raspberry Pi ISO from the official Kali Linux website for this setup. You will need a SD card (recommended 8GB+ space) and preferably a class 10 SD card for faster read/write speeds.
- You will need to decompress the downloaded package using any compression software such as WinRAR, WinZip or 7z.
- Download and install balenaEtcher. We will use it to write the decompressed disk image to our Raspberry Pi.
- Select the decompressed image, your SD card and flash your SD card.
- You can now insert your SD card into to your Raspberry Pi and you successfully have installed it on your RPi. You can proceed to connect display, Ethernet, mouse/keyboard & power supply and Kali Linux will boot up.
- Similarly, you can also run this virtually on your RPi by combining the methods used in VI.) and VII.)
- Your login credentials will be the default credentials on Kali Linux installations. These are
CodeUsername: root
Password: toor