Kali has been built as a highly modular and customizable penetration testing framework and allows for some fairly advanced customization and usage. Customizations can happen at multiple levels, beginning at the source code level. The sources of all Kali packages are publicly available. In this chapter, we will show how you can retrieve packages, modify them, and build your own customized packages out of them. The Linux kernel is somewhat of a special case and as such, it is covered in a dedicated section (Section 9.2, “Recompiling the Linux Kernel”), where we will discuss where to find sources, how to configure the kernel build, and finally how to compile it and how to build the associated kernel packages.
The second level of customization is in the process of building live ISO images. We will show how the
live-build tool offers plenty of hooks and configuration options to customize the resulting ISO image, including the possibility to use custom Debian packages in place of the packages available on mirrors.
We will also discuss how you can create a persistent live ISO built onto a USB key that will preserve files and operating system changes between reboots.
- Modifying Kali Packages
- Recompiling the Linux Kernel
- Building Custom Kali Live ISO Images
- Adding Persistence to the Live ISO
- 9.5. Summary
- Exercise 9-1: Forking a Kali Package
- Exercise 9-2: Updating a Kali Package
- Exercise 9-3: Rebuilding Your Kernel
- Exercise 9-4: Kali live build - right tool for the right job
- Exercise 9-5: Kali live build auto mini-installer
- Exercise 9-6: Live USB with Multiple persistence stores and LUKS Nuke