So I have been meaning to do this for ages as who likes configuring a system every time anyway, it’s the definition of insanity doing the same thing again and again so let’s fix that and automate the installation of Kali and modify it along the way so that you only install what you want or need in the process!
First things first you need to update your system with
apt-get install git live-build
Next you need to create a directory, git clone the live-build-config, change into the directory and then check whats inside
git clone git://git.kali.org/live-build-config.git
Now use the editor of your choice for this task and open up the following directory
For the GUI I am going to use kali-desktop-xfce as I like the speed that comes with it as it’s quite basic and light, I don’t really want the full package as I only really use the wireless and plan on using the Software Defined Radio (SDR) tools too so no need to install everything in there (You may be different so decide here what you want or need before you continue).
I will just be removing the hash from the start of kali-linux-sdr and kali-linux-wireless in order to only install those tools.
The kali.list.chroot file will look like this below
After it should look like I have it below, so save the file and continue to the next step
Create a new file called 01-unattended-boot.binary in kali-config/common/hooks/
Chmod it to make it executable also
chmod +x kali-config/common/hooks/01-unattended-boot.binary
Paste in the following:
cat >>binary/isolinux/install.cfg <<END
menu label ^Unattended Install
append vga=788 — quiet file=/cdrom/install/preseed.cfg locale=en_US keymap=us hostname=kali domain=local.lan
And once again save the file, courtesy of the Kali dojo.
When you have this done the next step is to get yourself or create a preseed file so that all the questions will be automatically answered for you, I’m going to pull mine from the kali dojo which the Offensive Security Team use for building their images, you can download it from their website located here.
Pull down the file and save it in the correct directory like this
wget https://www.kali.org/dojo/preseed.cfg -O ./kali-config/common/includes.installer/preseed.cfg
Now we are nearly there but the desktop is going to be bare so find a high quality image of your choosing and modify the output below in order to replace the background image with your own custom one. As I am indecisive though I am going to use the following image once again from the Kali dojo located here.
Make a new directory
mkdir -p kali-config/common/includes.chroot/usr/share/images/desktop-base/
Download and save the image into the newly created directory
wget https://www.kali.org/dojo/wp-blue.png -O kali-config/common/includes.chroot/usr/share/images/desktop-base/kali-wallpaper_1920x1080.png
Start off your new build
./build.sh –variant xfce –distribution sana –verbose
“build.sh” is the script that will be used to build your ISO from your configuration options
“–variant xfce” specifies you want to use the xfce desktop environment
“–distribution sana” selects the correct distribution for Kali Sana 2.0
“–verbose” will give your plenty of output on your screen to stare at for a while as it may take some time, don’t worry about reading everything as everything is parsed to a log file so you can review it all when finished anyway.
Patience at this point as this may take some time, the last time I created a full ISO with everything it took two hours in total to complete. With only the wireless and SDR tools I expect it to take less time to complete (This actually took six hours to complete for me).
When finished it will look like the following below without any errors
The ISO will be saved in the /live-build-config/images directory
At this point I like to copy the ISO out of my VM into my host OS. Depending on your setup this will be different.
Configure VirtualBox to your liking, if your unsure of configuration settings please refer to this tutorial for guidance. When booting just click on “Install” and watch the configuration magic happen all on it’s own!
Log in with
Select the default configuration when prompted
Now you have your own custom built XFCE ISO with only Software Defined Radio (SDR) and wireless related tools that will automatically install for you, cool isn’t it? You can also use it as a live image too without installing it.
You can do all the normal things like install VirtualBox guest additions, for help on this refer to this tutorial
Have fun building!