LIGHTDARK

Weekly Virtual Machines, with Build Scripts

We have always made all our build-scripts public. These are the same set of tools which we use to generate Kali Linux (for each release, or our weekly images). You may have noticed that previously there wasn’t anything about Virtual Machines (VMs). This is because until recently it was a manually done process, which followed our guides (VMware & VirtualBox). We have now upped our DevOps game, and automated the build process! Enter build-scripts/Kali-VM.

Another positive outcome of this is that it allows us to generate weekly VMs now! These images are more up-to-date, meaning less packages need updates out of the box, but the only set of tests run are the automated ones. Our release images have an additional set of Quality Assurance (QA) smoke-tests run against them, with the knowledge of last-snapshot, meaning the packages are in a known state. You have a choice: Stable vs updates!

Let’s start with a quick introduction to the weekly VMs, then we’ll have a glimpse at the Kali-VM build script.

Weekly Kali VMs

You can find these Kali images in the Virtual Machines section of Get Kali. Scroll down a bit, they are just there. At the moment we have weekly images for VMware and VirtualBox.

The VMware weekly image will be no surprise for those who already use the quaterly Kali VMware images: it’s pretty much identical, except that it’s built from the kali-rolling branch. In order to use it you just need to import it in VMware.

However, the VirtualBox weekly image is published in a different format than the one we use for Kali releases. For various reasons, we decided to distribute it in the “native” VirtualBox format, that is: a VDI disk and a .vbox metadata file. Fear not though, because importing this VM in VirtualBox is super easy. If you’re already a user of the VirtualBox image, we’d love to hear your feedback on this new image! Feel free to drop us a word on the Kali-VM GitLab repository.

The Kali-VM build script

For the most demanding users, here’s the good news: we published the build script to generate those images! If you are wondering “Cool, but what can I do with Your Kali-VM repository,” a feature highlight (for the time being):

  • Create VMs for VMware, VirtualBox, QEMU or a single VM which works with all three (aka “generic”)
  • Create VMs for x64 and x86 (sorry, no ARM64 at this point in time!)
  • Create the VMs directly on the host or in a container (Docker or Podman)
  • Select as many (or as little!) tools/metapackages you wish to be included
  • Configure your locale, timezone, username and password

The build script is stable enough that we are using it in production, but its still early days. As a result, there is a roadmap of features we would like to add:

  • ARM64 support
  • Hyper-V support
  • Hook support (allowing you to customize Kali’s settings, such as changing preferences or altering the wallpaper)
  • Many more ideas!

If the above sounds great to you, we would love a hand adding it! We are gladly encouraging merge requests! If you find a bug, great! Let us know as well =)

Now if you are wondering “Okay, this is pretty cool. How do I get started?” please take a look at the README. This will give you a basic idea of what requirements are needed, and how to get started. Then its just a case of looking at the help screen, and customizing the arguments to your needs!

Want some examples to get you going?

$ ./build.sh -v vmware
$ ./build.sh -v virtualbox -a i386 -D kde
$ ./build.sh -v virtualbox -b kali-last-snapshot -D gnome -S everything
$ ./build.sh -v qemu -D headless -S none -P nmap,sqlmap

Happy hacking