Kali 2 Sana Custom ISO Build – Software Defined Radio (SDR) & Wireless Tools

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 update

1_Kali_Sana_Prep_Work_update

1_Kali_Sana_Prep_Work_update

Install live-build

apt-get install git live-build

2_Kali_Sana_Install_Live_Build

2_Kali_Sana_Install_Live_Build

Next you need to create a directory, git clone the live-build-config, change into the directory and then check whats inside

mkdir Kali_2.0_Custom_Build
git clone git://git.kali.org/live-build-config.git
cd live-build-config
ls

3_Kali_Sana_git_clone_live_build

3_Kali_Sana_git_clone_live_build

Now use the editor of your choice for this task and open up the following directory

nano kali-config/variant-xfce/package-lists/kali.list.chroot

4_Kali_Sana_Modify_Packages

4_Kali_Sana_Modify_Packages

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

5_Kali_Sana_Packages_Before_Modification

5_Kali_Sana_Packages_Before_Modification

After it should look like I have it below, so save the file and continue to the next step

6_Kali_Sana_Packages_After_Modification

6_Kali_Sana_Packages_After_Modification

Create a new file called 01-unattended-boot.binary in kali-config/common/hooks/

nano kali-config/common/hooks/01-unattended-boot.binary

Chmod it to make it executable also

chmod +x kali-config/common/hooks/01-unattended-boot.binary

7_Kali_Sana_Unattended_File_Configuration

7_Kali_Sana_Unattended_File_Configuration

Paste in the following:

#!/bin/sh

cat >>binary/isolinux/install.cfg <<END
label install
menu label ^Unattended Install
menu default
linux /install/vmlinuz
initrd /install/initrd.gz
append vga=788 — quiet file=/cdrom/install/preseed.cfg locale=en_US keymap=us hostname=kali domain=local.lan
END

And once again save the file, courtesy of the Kali dojo.

8_Kali_Sana_Unattended_File_Configuration_Created

8_Kali_Sana_Unattended_File_Configuration_Created

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

9_Kali_Sana_Unattended_Preseed_wget

9_Kali_Sana_Unattended_Preseed_wget

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

10_Kali_Sana_Unattended_Desktop_Background

10_Kali_Sana_Unattended_Desktop_Background

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.

11_Kali_Sana_Build_Unattended_ISO_Start

11_Kali_Sana_Build_Unattended_ISO_Start

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

12_Kali_Sana_Build_Unattended_ISO_Finish

12_Kali_Sana_Build_Unattended_ISO_Finish

The ISO will be saved in the /live-build-config/images directory

13_Kali_Sana_Build_Unattended_ISO_File_location

13_Kali_Sana_Build_Unattended_ISO_File_location

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.

14_Kali_Sana_Build_Unattended_ISO_File_Copy_Host

14_Kali_Sana_Build_Unattended_ISO_File_Copy_Host

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!

15_Kali_Sana_Select_Install_to_automatically_install

15_Kali_Sana_Select_Install_to_automatically_install

Log in with
username: root
password: toor

16_Kali_Sana_XFCE_Custom_SDR_WIreless_tools_first_boot

16_Kali_Sana_XFCE_Custom_SDR_WIreless_tools_first_boot

Select the default configuration when prompted

17_Kali_Sana_XFCE_Custom_SDR_WIreless_tools_first_boot_select_default_config

17_Kali_Sana_XFCE_Custom_SDR_WIreless_tools_first_boot_select_default_config

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.

18_Kali_Sana_XFCE_Custom_SDR_WIreless_tools_complete

18_Kali_Sana_XFCE_Custom_SDR_WIreless_tools_complete

You can do all the normal things like install VirtualBox guest additions, for help on this refer to this tutorial

19_Kali_Sana_XFCE_Custom_SDR_WIreless_tools_VirtualBox_Guest_additions_install

19_Kali_Sana_XFCE_Custom_SDR_WIreless_tools_VirtualBox_Guest_additions_install

Have fun building!

 

Leave a Reply